LATENCY DOCTOR

用法
LATENCY DOCTOR
复杂度
O(1)
起始版本
2.8.13
ACL 类别
@admin, @dangerous, @slow

LATENCY DOCTOR 命令报告各种与延迟相关的问题,并提供可能的解决方案建议。

此命令是延迟监控框架中最强大的分析工具,能够提供额外的统计数据,例如延迟峰值之间的平均周期、中位数偏差以及事件的可读分析。对于某些事件,例如 fork,还会提供额外信息,例如系统创建进程的速度。

如果您正在寻求有关延迟问题的帮助,应提供此输出。

示例

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
    [SLOWLOG](slowlog.md) 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.

注意: LATENCY DOCTOR 具有不稳定的心理行为,因此我们建议谨慎使用。

有关更多信息,请参阅延迟监控框架页面

RESP2 回复

批量字符串回复:一份人类可读的延迟分析报告。

RESP3 回复

逐字字符串回复:一份人类可读的延迟分析报告。