Hi Carlos, thanx for your answer!
I'm already using this option (-M - return error on memory exhausted (rather than removing items)), it's working fine. Cheers, Martin On Sat, Mar 13, 2010 at 3:03 PM, Carlos Alvarez <cbalva...@gmail.com> wrote: > On Fri, Mar 12, 2010 at 8:56 PM, Martin Grotzke > <martin.grot...@googlemail.com> 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. > -- Martin Grotzke http://www.javakaffee.de/blog/