Expiration Behavior
Timo Ewalds
timo at tzc.com
Wed May 9 07:38:04 UTC 2007
>> There was talk of adding a new statistic to capture information about
>> the number of items pushed from cache before their expiration time;
>> that would also give you the same information.
>>
>> I'm not sure if there was a patch for that, or if it is in the
>> current release.
>>
That stat is in 1.2.2 if I'm not mistake, and it will indeed tell you if
you don't have enough space, but it won't tell you if you have too much,
and could be using that ram for other purposes.
> Would it be possible to force a discard of the LRU on all inserts,
> regardless of memory used if the LRU is expired?
>
> If your dataset to cache is "only" 10GB, and expires after 1 hour,
> then on a 30GB memcached install it would only use ~10GB of memory,
> rather than all 30GB with ~20GB of stale data. Is that a fair assessment?
That would likely slow down memcache quite significantly, which I would
rather avoid. By making it a command to be used only very very rarely
while the slowness of it is irrelevant, it shouldn't affect the runtime
performance at all.
Timo
More information about the memcached
mailing list