Last active
August 29, 2015 14:03
-
-
Save antirez/d72d58fbcdb278dda0e2 to your computer and use it in GitHub Desktop.
New Redis LATENCY DOCTOR command example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1:6379> config set latency-monitor-threshold 10 | |
OK | |
127.0.0.1:6379> debug sleep .1 | |
OK | |
127.0.0.1:6379> debug sleep .2 | |
OK | |
127.0.0.1:6379> debug sleep .3 | |
OK | |
127.0.0.1:6379> latency doctor | |
Dave, I have observed latency spikes in this Redis instance. | |
You don't mind talking about it, do you Dave? | |
1. command: 2 latency spikes (average 250ms, mean deviation 50ms, period 2.50 sec). | |
Worst all time event 300ms. | |
I have a few advices for you: | |
- Check your Slow Log to understand what are the commads you are running | |
which are too slow to execute. Please check http://redis.io/commands/slowlog | |
for more information. | |
- 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. | |
127.0.0.1:6379> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: it reports 2 latency spikes since latency spikes of the same class in the same second are merged. Our time series is limited in size to avoid enlarging the Redis server base memory footprint.