revert
This commit is contained in:
parent
4ab128b86a
commit
e029c40fdb
@ -1145,9 +1145,8 @@ acllog-max-len 128
|
|||||||
#
|
#
|
||||||
# active-expire-effort 1
|
# active-expire-effort 1
|
||||||
|
|
||||||
# Force evictions when remaining total system memory reaches this percent.
|
# Force evictions when RSS memory reaches this percent of total system memory.
|
||||||
# System memory is measured against RSS memory, not used memory. This is
|
# This is useful as a safeguard to prevent OOM kills when RSS overhead is
|
||||||
# useful as a safeguard to prevent OOM kills when RSS overhead is
|
|
||||||
# significant (0 to disable).
|
# significant (0 to disable).
|
||||||
#
|
#
|
||||||
# force-eviction-percent 0
|
# force-eviction-percent 0
|
||||||
|
@ -425,10 +425,10 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev
|
|||||||
if (g_pserver->FRdbSaveInProgress())
|
if (g_pserver->FRdbSaveInProgress())
|
||||||
maxmemory = static_cast<size_t>(maxmemory*1.2);
|
maxmemory = static_cast<size_t>(maxmemory*1.2);
|
||||||
|
|
||||||
/* If there is less than a configurable percent of free system memory, force eviction */
|
/* If rss memory exceeds configurable percent of system memory, force eviction */
|
||||||
bool mem_rss_max_exceeded;
|
bool mem_rss_max_exceeded;
|
||||||
if (g_pserver->force_eviction_percent && g_pserver->cron_malloc_stats.sys_total) {
|
if (g_pserver->force_eviction_percent && g_pserver->cron_malloc_stats.sys_total) {
|
||||||
float sys_total_ratio = (float)(100 - g_pserver->force_eviction_percent)/100;
|
float sys_total_ratio = (float)(g_pserver->force_eviction_percent)/100;
|
||||||
size_t mem_rss_max = static_cast<size_t>(g_pserver->cron_malloc_stats.sys_total * sys_total_ratio);
|
size_t mem_rss_max = static_cast<size_t>(g_pserver->cron_malloc_stats.sys_total * sys_total_ratio);
|
||||||
mem_rss_max_exceeded = g_pserver->cron_malloc_stats.process_rss > mem_rss_max;
|
mem_rss_max_exceeded = g_pserver->cron_malloc_stats.process_rss > mem_rss_max;
|
||||||
if (mem_rss_max_exceeded) {
|
if (mem_rss_max_exceeded) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user