延迟医生
Syntax
LATENCY DOCTOR
- Available since:
- 2.8.13
- Time complexity:
- O(1)
- ACL categories:
-
@admin
,@slow
,@dangerous
,
LATENCY DOCTOR
命令报告与延迟相关的不同问题,并提供可能的解决方案建议。
此命令是延迟监控框架中最强大的分析工具,能够提供额外的统计数据,如延迟峰值之间的平均周期、中位数偏差以及事件的可读性分析。对于某些事件,如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
http://redis.io/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.
注意:医生有异常的心理行为,因此我们建议与其互动时要小心。
更多信息请参考延迟监控框架页面。