Hi folks
We are trying to determine how to size memcached (how much memory should we allocate). The easiest way seemed to be:
. start a memcached
. keep writing items (that effectively do not expire) into the memcached till you start seeing evictions.
This would give us how many objects a given size store from which we can extrapolate.
When running such an experiment, I see the following stats after some time.
stats
STAT pid 5728
STAT uptime 2076
STAT time 1253483475
STAT version 1.2.6
STAT pointer_size 32
STAT curr_items 7497
STAT total_items 58725
STAT bytes 14178576
STAT curr_connections 7
STAT total_connections 8
STAT connection_structures 8
STAT cmd_get 0
STAT cmd_set 58725
STAT get_hits 0
STAT get_misses 0
STAT evictions 0
STAT bytes_read 110475920
STAT bytes_written 27168152
STAT limit_maxbytes 67108864
STAT threads 1
----
My question is why is curr_items so much less than total_items.? If the cache was bounced just before the experiment (which is the case here), should I consider total_items as the items stored in the cache? My sense from reading some other posts is that curr_items is not kept up to date due to efficiency reasons.
My guess in the above example is that this cache has total of 58725 items occupying 14178576 bytes.
Is this correct?
In general are there any articles on how to size memcached?
I saw some articles at
http://code.google.com/p/memcached/wiki/HowTo but none seem to cover the right way of sizing memcached.
In our specific case we have just one type of object being stored in memcached - which means we may be able to store them more efficiently by following guidelines in articles dealing with storing "small" objects.
Thank you!