LATENCY DOCTOR
LATENCY DOCTOR
- Group
- Server
- Complexity
- O(N) where N is the number of spikes recorded
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
LATENCY DOCTOR summarises the latency monitor’s data for people. For each
event with spikes it reports how many there were, over what period, how
recent the latest is, and the average and worst duration, followed by
advice for that kind of event (for example, which commands to look for in
SLOWLOG GET for command spikes, or adding jitter to
TTLs for expire-cycle spikes).
If nothing has been recorded, it tells you whether the monitor is off
(latency-monitor-threshold is 0) and how to turn it on, or that no spike
reached the threshold.
Return value
Section titled “Return value”The report as text: a bulk string in RESP2, a verbatim string (txt) in
RESP3.
Examples
Section titled “Examples”127.0.0.1:6379> LATENCY DOCTORLatency monitoring is off: latency-monitor-threshold is 0. Set it to a number of milliseconds (CONFIG SET latency-monitor-threshold 100) to record what takes at least that long.127.0.0.1:6379> CONFIG SET latency-monitor-threshold 50OK127.0.0.1:6379> LATENCY DOCTORLatency spikes of 50 ms or more (latency-monitor-threshold), by event:
1. command: 3 spikes in the last 310 s, the latest 5 s ago; 85 ms on average, 120 ms at worst. SLOWLOG GET shows the commands. Commands that walk large keys or the whole keyspace (KEYS, SMEMBERS, HGETALL, LRANGE 0 -1, SORT, scripts) are the usual cause: read large values in parts (SCAN, HSCAN, LRANGE with limits).Compatibility
Section titled “Compatibility”Redis 7 and Valkey 8 have the same command. The report’s wording and advice are HotKV’s own, so don’t parse the text.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.