summaryrefslogtreecommitdiff
path: root/storage.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-11-28 18:10:05 -0800
committerdormando <dormando@rydia.net>2017-11-28 18:10:05 -0800
commit2adab846a346a11f23275e2fe82a97b91303945c (patch)
tree1caa6b4d8c653ad060a134f654b9b01371f98044 /storage.c
parent81c83e803d2be797f70147e7214b2382ecadb5fc (diff)
downloadmemcached-2adab846a346a11f23275e2fe82a97b91303945c.tar.gz
extstore: ext_compact_under to control compaction
had a hardcoded value of "start to compact under a slew if more than 3/4ths of pages are used", but this allows it to be set directly. ie; "I have 100 pages but don't want to compact util almost full, and then drop any unread"
Diffstat (limited to 'storage.c')
-rw-r--r--storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage.c b/storage.c
index f2d4263..dfb2025 100644
--- a/storage.c
+++ b/storage.c
@@ -142,7 +142,7 @@ static int storage_compact_check(void *storage, logger *l,
return 0;
// lets pick a target "wasted" value and slew.
- if (st.pages_free > st.page_count / 4)
+ if (st.pages_free > settings.ext_compact_under)
return 0;
// the number of free pages reduces the configured frag limit