diff options
author | antirez <antirez@gmail.com> | 2014-11-17 15:10:03 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-11-17 15:10:03 +0100 |
commit | 01671edccabb072116ccf700d8e172e6f7107ff1 (patch) | |
tree | 1db879e62a39a0d5f400bcd4e1ea33928006fa27 /src/redis.h | |
parent | 5f185413df212d17ae5f877c92a379d1e8596d66 (diff) | |
download | redis-rssmaxmemory.tar.gz |
RSS aware maxmemory: algorith #1 implemented.rssmaxmemory
Diffstat (limited to 'src/redis.h')
-rw-r--r-- | src/redis.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/redis.h b/src/redis.h index b047c13a4..b396eb70e 100644 --- a/src/redis.h +++ b/src/redis.h @@ -121,6 +121,7 @@ typedef long long mstime_t; /* millisecond time type. */ #define REDIS_DEFAULT_REPL_DISABLE_TCP_NODELAY 0 #define REDIS_DEFAULT_MAXMEMORY 0 #define REDIS_DEFAULT_MAXMEMORY_SAMPLES 5 +#define REDIS_DEFAULT_MAXMEMORY_FRAG_GUESS 1.4 #define REDIS_DEFAULT_RSS_AWARE_MAXMEMORY 0 #define REDIS_DEFAULT_AOF_FILENAME "appendonly.aof" #define REDIS_DEFAULT_AOF_NO_FSYNC_ON_REWRITE 0 @@ -840,14 +841,10 @@ struct redisServer { unsigned long long maxmemory; /* Max number of memory bytes to use */ int maxmemory_policy; /* Policy for key eviction */ int maxmemory_samples; /* Pricision of random sampling */ - /* RSS aware maxmemory additional state: - * the adjusted maxmemory is adjusted for fragmentation, however we - * enforce maxmemory_enforced instead, which follows the adjusted value - * in small steps at eviction cycle to avoid too fast changes in the - * enforced maxmemory value. */ + /* RSS aware maxmemory additional state. */ int rss_aware_maxmemory; /* Non zero if enabled. */ - unsigned long long maxmemory_adjusted; /* Maxmemory adjusted for frag. */ unsigned long long maxmemory_enforced; /* Currently enforced maxmemory. */ + float maxmemory_frag_guess; /* Guessed fragmentation. */ /* Blocked clients */ unsigned int bpop_blocked_clients; /* Number of clients blocked by lists */ list *unblocked_clients; /* list of clients to unblock before next loop */ |