LATENCY DOCTOR

返回人类可读的延迟分析报告。

语法

LATENCY DOCTOR

引入版本:2.8.13

复杂度摘要:O(1)

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.

注意:医生心理行为不稳定,建议谨慎互动。

有关详细信息,请参阅 延迟监控框架页面。

Redis Software 与 Redis Cloud 兼容性

Redis
软件
Redis
Cloud
说明
❌ 标准
❌主动-主动
❌ 标准
❌主动-主动

返回值

RESP2

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

RESP3

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

资料来源:Redis 官方 LATENCY DOCTOR 文档;中文内容参考 Redis 文档许可。