MyBB Community Forums

Full Version: memcache performance
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I just tested to change db cache to memcache on two forums. Somewhy query count increased from 16 to 34 (index) and 18 to 35 (forumdisplay).
Memory usage dropped(6.25MB to 6MB index, 7.75MB to 5MB forumdisplay). Page generation time increased a little.
I'm on a VPS/VPD with 6 cores and 16GB RAM.

I'm looking to lower the CPU usage - posibly increasing RAM usage.
That's odd and certainly shouldn't be happening. Query count should actually drop as the query to the datacache table shouldn't be occurring. Stupid question, but did you try refreshing? There may be a spike in queries the first load as memcache is populated but it should decrease thereafter.
Rebuilt PHP just in case.
Forced refresh twice:

Example of query differences between cachers

db cache:
SELECT title,cache FROM mybb_datacache

memcache:
SELECT title,cache FROM mybb_datacache WHERE title='internal_settings'
SELECT title,cache FROM mybb_datacache WHERE title='version'
SELECT title,cache FROM mybb_datacache WHERE title='plugins'
SELECT title,cache FROM mybb_datacache WHERE title='usergroups'

there are a lot more like these with memcache, but I suppose you get the point.
Hm. Seems like there's possibly a problem with the memcache configuration as the cache is not being loaded from it at all. Are you sure you've set it all up correctly?
I've installed memcache from WHM
enabled memcache in PHP (from WHM)
rebuild PHP
changed in config.php
$config['cache_store'] = 'memcache';
Have you double checked the port and IP settings for memcache. Are you also sure the memcache server is running?
config.php:
$config['memcache']['host'] = 'localhost';
$config['memcache']['port'] = 11211;

phpinfo:
memcache

memcache support	enabled
Active persistent connections	0
Version	2.2.7
Revision	$Revision: 327750 $

Directive	Local Value	Master Value
memcache.allow_failover	1	1
memcache.chunk_size	8192	8192
memcache.default_port	11211	11211
Looks like it should work then. Are you sure the memcache server is running? If you're running debian, try entering this command:

sudo /etc/init.d/memcache restart

(I think that should work - i haven't used memcache in a while as I prefer APC)

You could also possibly try changing the host to 127.0.0.1 and see if that helps.
Thanks. I didn't try the 127.0.0.1 yet, but I'm using CentOS. How can I restart memcache?
Try running the same command. I don't tend to use RHEL derivatives.
Pages: 1 2