summaryrefslogtreecommitdiff
path: root/src/latency.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-09 15:17:20 +0100
committerantirez <antirez@gmail.com>2015-02-11 10:52:27 +0100
commit585d1a60bf5b451b83e066a454d87e02ead08666 (patch)
tree736bebd9dbe96961cd7685e5c7798d61d8e9b392 /src/latency.c
parent8ddc14523fe5773d99a2dffba748d349f4419994 (diff)
downloadredis-585d1a60bf5b451b83e066a454d87e02ead08666.tar.gz
Separate latency monitoring of eviction loop and eviction DELs.
Diffstat (limited to 'src/latency.c')
-rw-r--r--src/latency.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/latency.c b/src/latency.c
index cb116fb90..fd76b3215 100644
--- a/src/latency.c
+++ b/src/latency.c
@@ -228,6 +228,7 @@ sds createLatencyReport(void) {
int advise_write_load_info = 0; /* Print info about AOF and write load. */
int advise_hz = 0; /* Use higher HZ. */
int advise_large_objects = 0; /* Deletion of large objects. */
+ int advise_mass_eviction = 0; /* Avoid mass eviction of keys. */
int advise_relax_fsync_policy = 0; /* appendfsync always is slow. */
int advise_disable_thp = 0; /* AnonHugePages detected. */
int advices = 0;
@@ -364,11 +365,16 @@ sds createLatencyReport(void) {
}
/* Eviction cycle. */
- if (!strcasecmp(event,"eviction-cycle")) {
+ if (!strcasecmp(event,"eviction-del")) {
advise_large_objects = 1;
advices++;
}
+ if (!strcasecmp(event,"eviction-cycle")) {
+ advise_mass_eviction = 1;
+ advices++;
+ }
+
report = sdscatlen(report,"\n",1);
}
dictReleaseIterator(di);
@@ -452,6 +458,10 @@ sds createLatencyReport(void) {
report = sdscat(report,"- Deleting, expiring or evicting (because of maxmemory policy) large objects is a blocking operation. If you have very large objects that are often deleted, expired, or evicted, try to fragment those objects into multiple smaller objects.\n");
}
+ if (advise_mass_eviction) {
+ report = sdscat(report,"- Sudden changes to the 'maxmemory' setting via 'CONFIG SET', or allocation of large objects via sets or sorted sets intersections, STORE option of SORT, Redis Cluster large keys migrations (RESTORE command), may create sudden memory pressure forcing the server to block trying to evict keys. \n");
+ }
+
if (advise_disable_thp) {
report = sdscat(report,"- I detected a non zero amount of anonymous huge pages used by your process. This creates very serious latency events in different conditions, especially when Redis is persisting on disk. To disable THP support use the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled', make sure to also add it into /etc/rc.local so that the command will be executed again after a reboot. Note that even if you have already disabled THP, you still need to restart the Redis process to get rid of the huge pages already created.\n");
}