CDH zookeeper 问题处理
Maximum Request LatencyCDH zookeeper报警: Maximum Request Latency存在隐患 : 请求延迟最大值:32,264。会话超时最大值:40,000。会话超时百分比:80.66%。 警告阈值:75.00%。这是CDH的健康值检查,检查项为ZOOKEEPER_SERVER_MAX_LATENCY查看日志/var/log/zookeeper/...
·
Maximum Request Latency
CDH zookeeper报警: Maximum Request Latency
存在隐患 : 请求延迟最大值:32,264。会话超时最大值:40,000。会话超时百分比:80.66%。 警告阈值:75.00%。
这是CDH的健康值检查,检查项为ZOOKEEPER_SERVER_MAX_LATENCY
查看日志/var/log/zookeeper/
fsync-ing the write ahead log in SyncThread:5 took 2433ms which will adversely effect operation latency.
这是报警,不是错误,不影响程序运行; 但还是要处理的;
登录报警主机:
$echo stat | nc localhost 2185
Clients:
/127.0.0.1:63686[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/8/32264
Received: 78146
Sent: 85285
Connections: 1
Outstanding: 0
Zxid: 0xc0001111
Mode: follower
Node count: 40
可以看到Latency max
值为32264,这是客户端请求zookeeper服务时等待返回响应的延时;与"会话超时最大值"值40,000的比超过75%就会报警.
参见Zookeeper 要避免的事,可知zookeeper服务返回响应前,会将事务日志写入存储介质;
可知问题实质是将事务日志写入介质慢导致的;这也是zookeeper日志写得原因;
因此处理方法为:
- 如果是临时现象,重置统计信息
$ echo srst | nc localhost 2185
- 如果长期的现象,则要将事务日志的目录,移到更快的硬盘上;
更多推荐
已为社区贡献1条内容
所有评论(0)