Memcached Cache Size - is bigger better?


(James) #1

Hi,

 

Any idea what a good setting for Memcached Cache and Session cache size would be?  We have on average about 60-80 concurrent users, a moderately sized site with less than 2000 pages and plenty of memory on the server. 

 

Currently we have:

CACHESIZE = 1024 for cache

CACHESIZE = 128 for sessions

 

But after a few days these have reached the size limits of 1GB and 128M  (as seen with top command) - presumably they purge themselves of the oldest entries?

 

The real reason I ask is some things actually seem faster when memcache 'cache' is cleared by restarting the process.  Our search is quicker search for example on searching new words?

 

Also memcached-sessions process size never reduces even when most are logged out, such as late at night?  Should I set up a cron to restart the memcached processes periodically?

 

Could too large a value for memcached sessions or memcached cache be a bad thing?

 

Thanks in advance.