Closed GoogleCodeExporter closed 9 years ago
My thoughts:
* Always allocate all memory from the system up front. This makes it easier for
the
end user to see how much memory the server will use...
* If you specify a really low memory limit (so that you cannot satisfy
preallocation
of a slab page to each slab class), disable the preallocation of memory into
each
slab class. Remember to write out a warning to the user that preallocation was
disabled, so that he might get OOM when storing objects.
* If you specify a really high maximum item limit, preallocation of memory into
all
of the different slab classes will eat up _a lot_ of memory (20G if you set
-I100m),
so I think we should disable preallocation of memory if it consumes more than
lets
say 20% of the total memory you gave memcached. (and we should of course warn
the
user)... Why? I believe that most of the objects stored in memcached will most
likely
be relatively equal in size (with some exceptions).
Original comment by trond.no...@gmail.com
on 30 Oct 2009 at 7:36
Trond's first two points mostly reiterate what I said.
I think on the third point... if a user has adjusted -I to be a high number,
and the
prealloc would take over a certain watermark of the memory limit, disable
prealloc...
I played with some numbers and I can see plenty of situations where people can
gum
themselve sup on it.
In the future the slab handler will be better about large items, I think. In the
short term, the safest thing for us to do is disable the alloc reservation (but
otherwise prealloc memory) if you've raised the -I default at all. Lowering it
should
not cause this. This should give the user a more deterministic behavior and
easier to
understand constraints.
So unless someone complaints in the next hour I'll implement just that :)
Original comment by dorma...@rydia.net
on 31 Oct 2009 at 12:03
killing this. plans are going elsewhere anyway.
Original comment by dorma...@rydia.net
on 7 Dec 2011 at 11:50
Original issue reported on code.google.com by
dorma...@rydia.net
on 7 Oct 2009 at 10:54