diff --git a/src/database/engine/cache.c b/src/database/engine/cache.c index 7570ffb836..75d45eccac 100644 --- a/src/database/engine/cache.c +++ b/src/database/engine/cache.c @@ -1899,9 +1899,9 @@ PGC *pgc_create(const char *name, cache->config.additional_bytes_per_page = additional_bytes_per_page; cache->config.max_workers_evict_inline = max_inline_evictors; - cache->config.severe_pressure_per1000 = 1100; // turn releasers into evictors above this threshold - cache->config.aggressive_evict_per1000 = 1000; // turn adders into evictors above this threshold - cache->config.healthy_size_per1000 = 975; // don't evict if the current size is below this threshold + cache->config.severe_pressure_per1000 = 1000; // turn releasers into evictors above this threshold + cache->config.aggressive_evict_per1000 = 990; // turn adders into evictors above this threshold + cache->config.healthy_size_per1000 = 950; // don't evict if the current size is below this threshold cache->config.evict_low_threshold_per1000 = 900; // when evicting, bring the size down to this threshold { diff --git a/src/database/engine/cache.h b/src/database/engine/cache.h index 54d175d510..a9afbd8fb6 100644 --- a/src/database/engine/cache.h +++ b/src/database/engine/cache.h @@ -223,7 +223,7 @@ static inline size_t indexing_partition(Word_t ptr, Word_t modulo) { long get_netdata_cpus(void); static inline size_t pgc_max_evictors(void) { - return get_netdata_cpus(); + return 1 + get_netdata_cpus() / 2; } static inline size_t pgc_max_flushers(void) {