summaryrefslogtreecommitdiff
path: root/slabs.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-12-18 23:29:47 -0800
committerdormando <dormando@rydia.net>2017-12-18 23:29:47 -0800
commit97b52b18667cfce5d23234a421130c6f1b616b7a (patch)
treedea83c8acca64969b5796f24cc29736bfa0b9b7f /slabs.h
parentd15f8712272f356b63ef42130175bc4a9d0729c5 (diff)
downloadmemcached-97b52b18667cfce5d23234a421130c6f1b616b7a.tar.gz
extstore: prefill global page pool with extstore
the slab page mover algo would fill memory to evicting for a few seconds before jumping to life and shoveling some pages into the global pool. swore I was going to fix this post-release, but I had a moment of inspiration after finding some code from another branch that did half the work. After a bunch of stupid bugs it seems to work. -o slab_automove_freeratio=0.N is now an option. This is *percentage of total memory*, so don't set it too high.
Diffstat (limited to 'slabs.h')
-rw-r--r--slabs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/slabs.h b/slabs.h
index 447033c..1516f86 100644
--- a/slabs.h
+++ b/slabs.h
@@ -10,6 +10,8 @@
*/
void slabs_init(const size_t limit, const double factor, const bool prealloc, const uint32_t *slab_sizes);
+/** Call only during init. Pre-allocates all available memory */
+void slabs_prefill_global(void);
/**
* Given object size, return id to use when allocating/freeing memory for object