LATENCY DOCTOR
语法
LATENCY DOCTOR
- 可用版本
- Redis 开源版 2.8.13
- 时间复杂度
- O(1)
- ACL 分类
-
@admin
,@slow
,@dangerous
,
LATENCY DOCTOR
命令报告有关不同延迟相关的问题,并就可能的解决方案提供建议。
此命令是延迟监控框架中最强大的分析工具,能够提供额外的统计数据,例如延迟峰值之间的平均周期、中位数偏差以及事件的人类可读分析。对于某些事件,例如 `fork`,还会提供额外信息,例如系统 fork 进程的速率。
如果您在查找与延迟相关的问题的帮助,这是您应该发布到 Redis 邮件列表中的输出内容。
示例
127.0.0.1:6379> latency doctor
Dave, I have observed latency spikes in this Redis 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
https://redis.ac.cn/commands/slowlog 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.
注意:这个“医生”的行为可能有些古怪,因此我们建议谨慎地与之交互。
更多信息请参阅 延迟监控框架 页面。