memcache use fork or thread? 2011/2/6 dormando <[email protected]>: >> I've found (part of) the answer to my own question - the virtual >> memory comes from the thread stacks. Setting -t 1 reduces the virtual >> memory to around 20MB. >> >> I've read from other posts that it is no longer possible to have a non- >> threaded memcached version. It appears on my system that the stack >> size being used is 10MB. This is almost certainly way too large. Is >> there any way to conveniently (i.e. without major edits to the source >> code) set the thread stack size for the threads that memcached uses, >> e.g. through a macro setting? > > There's some amount of overhead with pre-allocating the hash table and > this and that... that'll show up as virtual memory until data's written > into it. Also note that memcached will lazily allocate one slab per slab > class, so even if you set -m 12 you'll end up using 50+ megs of ram if you > put one item in each slab class. > > You could also use -I to lower the max item size and reduce some overhead. > > Don't think it explicitly sets the thread stack size, and I forget how to > tweak that offhand, I think google will tell you :P >
-- Roberto Spadim Spadim Technology / SPAEmpresarial
