Skip to content

Commit

Permalink
add comments in redis.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
hwware committed Jan 24, 2023
1 parent 1139ea3 commit 8f83a6e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 6 additions & 1 deletion redis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,12 @@ acllog-max-len 128
# in the system. It's a tradeoff between memory, CPU and latency.
#
# active-expire-effort 1
#
#
# It allows the redis to evict keys earlier. The value of this parameter represents
# percent of the maxmemory value. It means how much memory the redis instance want to hold
# not to store the data.
# Default is 0, and the value could be set between 10 to 60.
#
# maxmemory-reserved-scale 0


Expand Down
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,7 @@ static int updateReplBacklogSize(const char **err) {
return 1;
}

static int updateMaxmemoryReserved(const char **err){
static int updateMaxmemoryReserved(const char **err) {
UNUSED(err);
if (server.maxmemory_reserved_scale) {
if (server.maxmemory_reserved_scale < 10) {
Expand Down
4 changes: 0 additions & 4 deletions src/evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,6 @@ int performEvictions(void) {
int slaves = listLength(server.slaves);
int result = EVICT_FAIL;

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

0 comments on commit 8f83a6e

Please sign in to comment.