LATENCY DOCTOR

Available since 2.8.13.

The LATENCY DOCTOR command reports about different latency-related issues and advises about possible remedies.

This command is the most powerful analysis tool in the latency monitoring framework, and is able to provide additional statistical data like the average period between latency spikes, the median deviation, and a human-readable analysis of the event. For certain events, like fork, additional information is provided, like the rate at which the system forks processes.

This is the output you should post in the Redis mailing list if you are looking for help about Latency related issues.

  1. 127.0.0.1:6379> latency doctor
  2. Dave, I have observed latency spikes in this Redis instance.
  3. You don't mind talking about it, do you Dave?
  4. 1. command: 5 latency spikes (average 300ms, mean deviation 120ms,
  5. period 73.40 sec). Worst all time event 500ms.
  6. I have a few advices for you:
  7. - Your current Slow Log configuration only logs events that are
  8. slower than your configured latency monitor threshold. Please
  9. use 'CONFIG SET slowlog-log-slower-than 1000'.
  10. - Check your Slow Log to understand what are the commands you are
  11. running which are too slow to execute. Please check
  12. http://redis.io/commands/slowlog for more information.
  13. - Deleting, expiring or evicting (because of maxmemory policy)
  14. large objects is a blocking operation. If you have very large
  15. objects that are often deleted, expired, or evicted, try to
  16. fragment those objects into multiple smaller objects.

Note: the doctor has erratic psychological behaviors, so we recommend interacting with it carefully.

For more information refer to the Latency Monitoring Framework page.

*Return value

Bulk string reply