We have a webiste developed in Drupal 7 with more than 27 millions hits per month. We are using memcache, varnish etc.

Newrelic is also configured with the site which shows lot of updae queries on variable table. After investigation i found there is per second calls of class function variable_set in memcache.inc.

Newrelic always shows more than 30% time consuming of variable update. I am still investigating but anyone has same experience and can tell me how to solve/reduce number of calls in memcache.

Here is an example log.

..........................
.............................
Date: 2014-11-12 14:21:36, Vairable Name: cache_content_flush_cache_page, Value: i:1415791296;
Date: 2014-11-12 14:21:36, Vairable Name: cache_content_flush_cache_page, Value: i:1415791296;
Date: 2014-11-12 14:21:36, Vairable Name: cache_temporary_flush_cache_page, Value: i:1415791296;
Date: 2014-11-12 14:21:36, Vairable Name: cache_content_flush_cache_page, Value: i:1415791296;
Date: 2014-11-12 14:21:36, Vairable Name: cache_temporary_flush_cache_page, Value: i:1415791296;
Date: 2014-11-12 14:21:36, Vairable Name: cache_content_flush_cache_page, Value: i:1415791296;
Date: 2014-11-12 14:21:37, Vairable Name: cache_content_flush_cache_block, Value: i:1415791297;
Date: 2014-11-12 14:21:37, Vairable Name: cache_temporary_flush_cache_block, Value: i:1415791297;
Date: 2014-11-12 14:21:37, Vairable Name: cache_temporary_flush_cache_page, Value: i:1415791297;
Date: 2014-11-12 14:21:37, Vairable Name: cache_temporary_flush_cache_page, Value: i:1415791297;
.......................
....................

Comments

jeremy’s picture

Status: Active » Fixed

Why are you flushing your caches so frequently? What's your get/set ratio on those caches? Have you tried with the latest memcache module, there's been some improvements made -- though, if you're aggressively flushing your cache multiple times a second this sounds to be a bug in your logic.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.