> First, we wanted to solve the slab-ghetto problem. That is the > situation where one slab is forcing out hot keys for lack of memory > while another slab holds onto stale objects.
Just wanted to give a +1 that this is an issue for others as well. At AdMob, this has been a pretty serious inconvenience in one of our subsystems. We've used two workarounds to date: (1) Bounce memcache every so often to get a clean set of slabs. (2) Run multiple memcache instances and segregate objects appropriately. Half our cached data is generally bounded in total size, critical, and expensive to generate; the other half is generally unbounded (with slow growth), not quite critical, and fairly cheap to generate. They also inconveniently tend to live in separate slabs. Together in one instance, this can generate very painful cache churn. Neither of these workarounds is ideal. Bouncing caches is unpleasant and can require manual attention, and having different memcache instances has a small but noticeable perf impact in the critical path. It would be awesome to have a proper solution to this problem. -josh
