I have a large website that uses memcached. All users of the website are authenticated (no anonymous users). In addition to users always being authenticated, the content they see is very customized based on user (profile) fields and properties; like social media sites including facebook, linkedin, etc. Also, this site has several thousand users.
I also have New Relic Service set up for the site. Which alerted me to how much time is being spent in memcached. > 800 ms. Total page load times are consistently above 1 sec. Disabling memcached improves performance a little instead spending extra time communicating with the database and PHP processing.
My site is configured as follows...
$conf['cache_backends'] = 'sites/all/modules/contrib/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'ccprod';
$conf['memcache_servers'] = array(
'127.0.0.1:11211' => 'default',
$conf['memcache_bins'] = array(
'cache' => 'default',
I have a Gigabyte configured for memcached (but the site typically uses about 250mb of that).
Much of the contextualized data displayed on the site (which is just about everything) is filtered using a custom views handler/filter. After writing this custom filter I then just add it to each view that needs it.
I'm wondering if memcached is ineffective because the queries vary so much due to contextualization. Or if I'm not taking something into account that I should be. Perhaps the way memcached is configured, or the way my queries are constructed (as a custom view filter).
Does anyone have thoughts on ways I can improve my usage of memcached?
Thanks so much!