Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

LATENCY DOCTOR

Last updated
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.

The report as text: a bulk string in RESP2, a verbatim string (txt) in RESP3.

127.0.0.1:6379> LATENCY DOCTOR
Latency 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 50
OK
127.0.0.1:6379> LATENCY DOCTOR
Latency 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).

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.

LATENCY LATEST, SLOWLOG GET, MEMORY DOCTOR