Hi all,
  I just push a new feature to release the memory of memcached back to 
system. https://github.com/memcached/memcached/pull/93.
  The feature that support release memory back to system. If the ratio of 
used items in a slab is less than release_mem_start(default is 50%), then 
start release memory; If the ratio of used items greater than 
release_mem_stop(default is 80%), then stop release memory.
  It is not complicated because it base on the slab_reassign(auto move) 
function. The different is that the picked page is not assign to other 
slab, but freed. And it also depend on the lru_crawler to clear the expired 
items.
  The feature is useful in my case. I use a cache cluster to support a lot 
of services(or application). I assign each service several cache instance 
in fixed size(say 4GB) randomly among cache servers(it's memory is 32GB or 
64GB). Most of the time the service just used a few memory of their caches, 
and only reach the peak of memory usage at certain time. What is worse is 
that some services just don't know how much memory they need, so they 
required a lot of memory for 'safety'. With this feature, I can support 
more services using the current cache servers.
   In fact, I also try the solution that dynamically reassign cache 
instances to server, but the key distribution will change a lot and the 
hit-rate is much lower.
  Does anyone has a better solution?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to