LATENCY
LATENCY subcommand [argument ...]
- Group
- Server
- Arity
- -2 (at least 2 words, counting the command name)
- Flags
- admin, read-only
- HotKV Cloud
- All plans
- On-Premise
- no license needed
LATENCY is a container command for two kinds of latency data:
- Latency spikes, recorded by the latency monitor once you set
latency-monitor-thresholdto a number of milliseconds (it is0, off, by default). Anything that takes at least that long is recorded under an event name:commandfor a slow command,fast-commandfor a command that is normally fast, andexpire-cyclefor a slow round of removing expired keys. Each event keeps its most recent 160 spikes, at most one per second (the worst one in that second). - Latency distributions per command, collected all the time while
latency-trackingisyes(the default).
LATENCY HELP lists the subcommands.
Subcommands
Section titled “Subcommands”| Subcommand | What it does |
|---|---|
| LATENCY LATEST | The latest and worst spike of each event. |
| LATENCY HISTORY | The recorded spikes of one event. |
| LATENCY GRAPH | One event’s spikes as a text chart. |
| LATENCY DOCTOR | A plain-English report on the spikes, with advice. |
| LATENCY RESET | Forget the spikes of some or all events. |
| LATENCY HISTOGRAM | Per-command latency distribution. |
An unknown subcommand gets ERR unknown subcommand '<name>'. Try LATENCY HELP.
Examples
Section titled “Examples”127.0.0.1:6379> CONFIG SET latency-monitor-threshold 50OK127.0.0.1:6379> LATENCY LATEST1) 1) "command" 2) (integer) 1790000000 3) (integer) 120 4) (integer) 340Compatibility
Section titled “Compatibility”Same subcommands and reply shapes as Redis 7 and Valkey 8. HotKV records
the command, fast-command and expire-cycle events.
See also
Section titled “See also”SLOWLOG, INFO (latencystats),
monitoring, troubleshooting
Was this page helpful?
Thanks for the feedback.