On Fri, Mar 12, 2010 at 8:56 PM, Martin Grotzke
<[email protected]> wrote:
> Hi Brian,
> you're making a very clear point. However it would be nice if you'd provide
> concrete answers to concrete questions. I want to get a better understanding
> of memcached's memory model and I'm thankful for any help I'm getting here
> on this list. If my intro was not supporting this please forgive me...
> Cheers,
> Martin
Well, you asked "how do I ..." and the answer was "you can't". It
sounds quite concrete to me. :-)
Anyway, if you want to try (you'll face risk and your solution will be
error prone, don't forget that) I remember lurking around the code and
seeing an option of 'no evictions': ie when there is not enough memory
the set/add fails. I don't know if it this option is fully functional,
but the code is there.
if (settings.evict_to_free == 0) {
itemstats[id].outofmemory++;
return NULL;
}
In this case, when you run out of memory to store sessions, you'll
notice in the 'overflow' session and not in a older one (I would
prefer that).
Anyway, remember that evictions is not the only cause of not being
able to retrieve previously stored items.
Carlos.