What I find strange is that the number of items in this bucket oscillates between 5 and 6 M, with a weekly cycle. But if we are not evicting anything (stats zero everywhere) and each deletion due to expiration is followed by a new item being inserted (receive a miss -> fetch the item from a database and re-insert it in cache) , then why is the number of items decreasing? Shouldn’t this be constant or always increasing?
When you store an item into the memcached bucket types it first tries to look at the least recently used objects to see if it is already expired. If that is the case it will grab that object instead of allocating new memory. This will cause the reclaimed counter to increase. If none of the objects in the tail of that list have expired it will try to allocate more memory for the item, but if we’ve already used all of the memory we’re supposed to use it will go back to the tail of the list of the objects and evict one of the objects instead (and that cause the eviction counter to increase).
Thanks for your answer, did not find anything documented about this behavior.
I still do not understand why the number of objects is decreasing, though. if we replace only when we insert, then the number of objects should stay constant. Or is the counter only including unexpired items, by any chance?
We are also seeing same issue of diminishing item counts in CB Admin Console for one of Memcached bucket, Do you happen to figure out root cause for this issue?. That would be great in order for me to investigate on my code.
Thank you paolop, Let me try to check with only insert & read operations against both memcached buckets. What is wondering us is that we have two memcached buckets, one of them displays correct item counts where as second bucket shows items decreasing after expiry time.