为什么 serverstatus 对 mongod 写操作有不好的影响? [英] why did serverstatus have a bad effect on mongod write operation?

查看:21
本文介绍了为什么 serverstatus 对 mongod 写操作有不好的影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 1 个 mongos、3 个 mongod 和 3 个配置服务器.当我写一些文档时,有时 mongod 之一的插入速度非常慢,并且在 mongod 日志文件中有serverstatus非常慢".为什么?

I have 1 mongos, 3 mongod and 3 config server. when I write some documents, sometimes the insert speed of one of mongods is very slow and there're "serverstatus was very slow" in mongod log file. why?

版本是2.0.4

推荐答案

该消息实际上反映了您的服务器速度较慢的事实,而不是 serverStatus 导致了问题.如果 serverStatus 命令(例如由 MMS 代理定期运行)很慢,它将记录该警告 - 这是一种症状而不是原因.

That message actually reflects the fact that your server was slow, not that serverStatus is causing the problem. If the serverStatus command (which is run periodically by MMS agents for example) is slow, it will log that warning - it is a symptom rather than a cause.

它作为一个命令非常轻量级,所以如果它返回的速度足够慢以警告你,那么主机可能在那个时候很忙.

It is quite lightweight as a command, so if it is returning slowly enough to warn you about it then the host is likely very busy at that time.

查找负载的常见位置(高插入/更新、表扫描、索引不佳的查询、磁盘问题、RAM/CPU 争用、页面错误等).

The usual places to look for load apply (high inserts/updates, table scans, poorly indexed queries, disk issues, RAM/CPU contention, page faults etc.).

这篇关于为什么 serverstatus 对 mongod 写操作有不好的影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆