Skip to content

Instantly share code, notes, and snippets.

@antirez
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antirez/d72d58fbcdb278dda0e2 to your computer and use it in GitHub Desktop.
Save antirez/d72d58fbcdb278dda0e2 to your computer and use it in GitHub Desktop.
New Redis LATENCY DOCTOR command example
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>
@antirez
Copy link
Author

antirez commented Jul 8, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment