LATENCY-DOCTOR(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– latency-doctor β€” the vibe check for your latency ✨

okay bestie, this is latency-doctor from the Valkey Command Manual, and no cap, it's the one you call when your instance is acting up and you need a friend who tells it like it is. πŸ©ΊπŸ’…


🌸 NAME 🌸

latency-doctor β€” returns a human-readable latency analysis report. literally a doctor, but for your latency, and it will read you to filth (lovingly). 🫢


✨ SYNOPSIS ✨

LATENCY DOCTOR

periodt. no arguments, no flags, just vibes and a full diagnosis. πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

The LATENCY DOCTOR command reports about different latency-related issues and advises about possible remedies. it's giving concerned bestie with a clipboard. πŸ‘‘

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. the way it just knows things?? iconic. 🌈

This is the output you should provide if you are looking for help about Latency related issues. like, if you're asking for help, this is the receipt you hand over. iykyk. 🧚


πŸŽ€ REPLY πŸŽ€

RESP2

valkey-protocol(7) Bulk string reply: a human readable latency analysis report.

RESP3

valkey-protocol(7) Verbatim string reply: a human readable latency analysis report.

both ways you get the report, just delivered in slightly different packaging. slay. πŸ’œ


⭐ COMPLEXITY ⭐

O(1)

constant time, bestie. it does not care how big your keyspace is. πŸ’…


πŸ”₯ ACL CATEGORIES πŸ”₯

@admin @dangerous @slow

⚠️ heads up: @dangerous is right there in the list, so be careful who you hand this power to. @slow too β€” it's not a "call it in a hot loop" kind of command, fr fr.

πŸ’€ HISTORY πŸ’€

  • Available since: 2.8.13

an elder. it's been diagnosing since before some of us were born. 😭


πŸ™ˆ EXAMPLES πŸ™ˆ

127.0.0.1:6379> latency doctor

Dave, I have observed latency spikes in this Valkey instance.
You don't mind talking about it, do you Dave?

1. command: 5 latency spikes (average 300ms, mean deviation 120ms,
    period 73.40 sec). Worst all time event 500ms.

I have a few advices for you:

- Your current Slow Log configuration only logs events that are
    slower than your configured latency monitor threshold. Please
    use 'CONFIG SET slowlog-log-slower-than 1000'.
- Check your Slow Log to understand what are the commands you are
    running which are too slow to execute. Please check
    **valkey-slowlog**(7) 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.
🩺 Note: the doctor has erratic psychological behaviors, so we recommend interacting with it carefully.

For more information refer to the Latency Monitoring Framework page.


πŸ’– SEE ALSO πŸ’–


and that's the whole page, bestie!! πŸŽ€βœ¨ this one's from Valkey version 9.0.0, dated 2025-10-21, so if you're reading it later, go check for a fresher one. love u, go run LATENCY DOCTOR and let Dave get read. πŸ’–πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from