Skip to content

Commit

Permalink
Limit max overage to 20% during RDB save
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed May 10, 2022
1 parent f747044 commit 442c3de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev
if (fPreSnapshot)
maxmemory = static_cast<size_t>(maxmemory * 0.9); // derate memory by 10% since we won't be able to free during snapshot
if (g_pserver->FRdbSaveInProgress())
maxmemory = static_cast<size_t>(maxmemory*1.5);
maxmemory = static_cast<size_t>(maxmemory*1.2);

/* We may return ASAP if there is no need to compute the level. */
int return_ok_asap = !maxmemory || mem_reported <= maxmemory;
Expand Down

0 comments on commit 442c3de

Please sign in to comment.