memcached not using allocated memory

Marcus Bointon marcus at synchromedia.co.uk
Fri Apr 20 07:18:57 UTC 2007


On 19 Apr 2007, at 22:15, Lewis, Bill wrote:

> Why does a "SERVER_ERROR out of memory" error occur when stats say  
> there is plenty of memory available?  I am loading objects that are  
> all 16394 bytes and using the default growth factor of 1.25.   
> According to the stats the cache is only 55% full.  Where is the  
> other 45%?  Relevant stats below.

I'm not familiar with the internals, but I believe that memory chunks  
are allocated in power-of-2 sized chunks. 16394 is 10 bytes over  
16384, which is 2^14, so your 16394 bytes will be stored in a 32768  
size chunk (2^15), hence the wastage. It's just unfortunate that your  
data is that size - it couldn't get much less efficient! That's my  
theory anyway, could be completely wrong of course!

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info at hand CRM solutions
marcus at synchromedia.co.uk | http://www.synchromedia.co.uk/




More information about the memcached mailing list