Skip to content

Commit 8f83a6e

Browse files
committed
add comments in redis.conf
1 parent 1139ea3 commit 8f83a6e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

redis.conf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,12 @@ acllog-max-len 128
12091209
# in the system. It's a tradeoff between memory, CPU and latency.
12101210
#
12111211
# active-expire-effort 1
1212-
#
1212+
#
1213+
# It allows the redis to evict keys earlier. The value of this parameter represents
1214+
# percent of the maxmemory value. It means how much memory the redis instance want to hold
1215+
# not to store the data.
1216+
# Default is 0, and the value could be set between 10 to 60.
1217+
#
12131218
# maxmemory-reserved-scale 0
12141219

12151220

src/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2463,7 +2463,7 @@ static int updateReplBacklogSize(const char **err) {
24632463
return 1;
24642464
}
24652465

2466-
static int updateMaxmemoryReserved(const char **err){
2466+
static int updateMaxmemoryReserved(const char **err) {
24672467
UNUSED(err);
24682468
if (server.maxmemory_reserved_scale) {
24692469
if (server.maxmemory_reserved_scale < 10) {

src/evict.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,6 @@ int performEvictions(void) {
564564
int slaves = listLength(server.slaves);
565565
int result = EVICT_FAIL;
566566

567-
//serverLog(LL_WARNING,"-------------------------------------------------");
568-
//serverLog(LL_WARNING,"Current maxmemory reserved scale is: %d",server.maxmemory_reserved_scale);
569-
//serverLog(LL_WARNING,"Current maxmemory reserved size is: %lld",server.maxmemory_reserved);
570-
//serverLog(LL_WARNING,"Current maxmemory is: %lld",server.maxmemory);
571567
if (getMaxmemoryState(&mem_reported,NULL,&mem_tofree,NULL) == C_OK) {
572568
result = EVICT_OK;
573569
goto update_metrics;

0 commit comments

Comments
 (0)