Running Drupal 6.26 (without pressflow), on an Ubuntu 12.04 instance hosted on Amazon EC2. I have boost, APC and memcache installed and working. Using Memcache API to cache within drupal. Memcache is performing poorly. Here is my current setup in settings:

$conf = array(
	'cache_inc'        => './sites/all/modules/memcache/memcache.inc',
	'session_inc'      => './sites/all/modules/memcache/memcache-session.inc',
	'lock_inc'         => './sites/all/modules/memcache/memcache-lock.inc',
	'memcache_servers' => array(
	'127.0.0.1:11211' => 'default',
	'127.0.0.1:11212' => 'block',
	'127.0.0.1:11213' => 'content',
	'127.0.0.1:11214' => 'filter',
	'127.0.0.1:11215' => 'form',
	'127.0.0.1:11216' => 'menu',
	'127.0.0.1:11217' => 'page',
	'127.0.0.1:11218' => 'update',
	'127.0.0.1:11219' => 'views',
	'127.0.0.1:11221' => 'session',
	'127.0.0.1:11222' => 'users'
),
	'memcache_bins' => array(
	'cache' => 'default',
	'cache_block' => 'block',
	'cache_content' => 'content',
	'cache_filter' => 'filter',
	'cache_form' => 'form',
	'cache_menu' => 'menu',
	'cache_page' => 'page',
	'cache_update' => 'update',
	'cache_views' => 'views',
	'session' => 'session',
	'users' => 'users'
),
);

in apache2 php.ini:

extension=memcache.so
memcache.hash_strategy="consistent"
extension=apc.so
extension=uploadprogress.so
apc.shm_segments=1
apc.shm_size=128
apc.stat=1
apc.ttl=0
apc.user_ttl = 0
apc.gc_ttl = 3600
apc.cache_by_default = 1
apc.max_file_size = 1M
apc.rfc1867 = 1
apc.rfc1867_prefix = "upload_"
apc.rfc1867_name = "APC_UPLOAD_PROGRESS"
apc.rfc1867_freq = 0
apc.rfc1867_ttl = 3600

Cron report:

PHP Warning:  Module 'apc' already loaded in Unknown on line 0
PHP Warning:  Module 'memcache' already loaded in Unknown on line 0

APC misses about 2 - 3% with very little fragmentation.

Memcache for default bin is as follows:

Sets 0.07/s; 332 sets (29.70%) of 1,118 commands
Gets 1.97/s; 786 gets (70.30%); 575 hits (73.16%) 211 misses (26.84%)
2.24 MB:4.14 MB (54.19% to cache)

page bin as follows:

Sets 0.02/s; 4 sets (10.81%) of 37 commands
Gets 0.05/s; 33 gets (89.19%); 2 hits (6.06%) 31 misses (93.94%)
27.97 KB:13.35 KB (209.53% to cache)

Any help would be greatly appreciated.

CommentFileSizeAuthor
stats.jpg233.72 KBwildguy

Comments

wildguy’s picture

Adjusted memory to 128 for all bins, problem still persists

erikwebb’s picture

Status: Active » Postponed (maintainer needs more info)

Can you be more specific as to if there are particular keys that are consistently missing?

rooby’s picture

I know this is old, but in case this still helps anyone,

the errors

PHP Warning: Module 'apc' already loaded in Unknown on line 0
PHP Warning: Module 'memcache' already loaded in Unknown on line 0

Are usually there because the system is trying to load these two modules twice.

For example, if you have installed the php5-memcache package, then memcache will automatically be loaded. Then if you add

extension=memcache.so

to your php.ini it will try to load it a second time.

This is because when you install php5-memcache it adds it's own memcache.ini file which is set to load that extension already.

So in that case, just remove the loading of the extension from your php.ini.

Presumably it is a similar problem with APC.

erikwebb’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)