summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2019-11-10 09:38:50 +0200
committerOran Agra <oran@redislabs.com>2019-11-12 15:05:29 +0200
commit0bc3dab0954e481b882a722f768ec0a5a7f725ae (patch)
tree8acf166e6d17a00c653be321061ce5b471126478 /src/server.h
parent0f026af185e918a9773148f6ceaa1b084662be88 (diff)
downloadredis-0bc3dab0954e481b882a722f768ec0a5a7f725ae.tar.gz
Adjustments for active defrag defaults and tuning
Reduce default minimum effort, so that when fragmentation is just detected, the impact on the latency will be minor. Reduce the default maximum effort, mainly to prevent a case were a sudden massive deletions, won't trigger an aggressive defrag that will cause latency. When activedefrag is disabled mid-run, reset the 'running' info field, and clear the scan cursor, so that when it'll be re-enabled, a new fresh scan will start. Clearing the 'running' variable is important since lowering the defragger tunables mid-scan won't help, the defragger only considers new threshold when a new scan starts, and during a scan it can only become more aggressive, (when more severe fragmentation is detected), it'll never go less aggressive. So by temporarily disabling activedefrag, one can lower th the tunables. Removing the experimantal warning.
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.h b/src/server.h
index a2c94a22a..cff45b5f5 100644
--- a/src/server.h
+++ b/src/server.h
@@ -174,8 +174,8 @@ typedef long long ustime_t; /* microsecond time type. */
#define CONFIG_DEFAULT_DEFRAG_THRESHOLD_LOWER 10 /* don't defrag when fragmentation is below 10% */
#define CONFIG_DEFAULT_DEFRAG_THRESHOLD_UPPER 100 /* maximum defrag force at 100% fragmentation */
#define CONFIG_DEFAULT_DEFRAG_IGNORE_BYTES (100<<20) /* don't defrag if frag overhead is below 100mb */
-#define CONFIG_DEFAULT_DEFRAG_CYCLE_MIN 5 /* 5% CPU min (at lower threshold) */
-#define CONFIG_DEFAULT_DEFRAG_CYCLE_MAX 75 /* 75% CPU max (at upper threshold) */
+#define CONFIG_DEFAULT_DEFRAG_CYCLE_MIN 1 /* 1% CPU min (at lower threshold) */
+#define CONFIG_DEFAULT_DEFRAG_CYCLE_MAX 25 /* 25% CPU max (at upper threshold) */
#define CONFIG_DEFAULT_DEFRAG_MAX_SCAN_FIELDS 1000 /* keys with more than 1000 fields will be processed separately */
#define CONFIG_DEFAULT_PROTO_MAX_BULK_LEN (512ll*1024*1024) /* Bulk request max size */
#define CONFIG_DEFAULT_TRACKING_TABLE_MAX_FILL 10 /* 10% tracking table max fill. */