*Redis latency-doctor 命令
*语法
LATENCY DOCTOR
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.
注意: 医生有不稳定的心理行为,因此我们建议谨慎地与其互动。
有关更多信息,请参阅 延迟监控框架页面。
*返回信息
RESP2:批量字符串回复: 人类可读的延迟分析报告。
RESP3:逐字字符串回复: 人类可读的延迟分析报告。