MongoDB關鍵指標意義&各數值區間意義&部署

## part 1 mms圖

What's MMS

MongoDB Management Service (MMS) is a suite of services for managing MongoDB deployments.html

統計圖表的數據來源

all statistics can show in mongo shell by:mongodb

>db.serverStatus()

  1. opcounters
    意義:The average number of commands performed per second since the last data point
    表明忙不忙,越小越好。(看業務)
    opcounters
  2. queue

意義:The number of operations queued waiting for any lock -- 排隊未執行的命令
越小越好,平時<1
此處輸入圖片的描述shell

  1. connection

意義:The number of currently active connections to this server. A stack is allocated per connection; thus very many connections can result in significant RAM usage.
越小越好。
=client (connected) * 集羣server 數目
此處輸入圖片的描述ui

  1. lock

意義:The percent of time write locked. The effective lock % is the percent of time in the global lock plus the percent of time locked by the hottest database. Because the data is sampled and combined, it is possible to see values over 100%.
越小越好。
形成鎖增長的行爲:update delete insert ...
此處輸入圖片的描述this

  1. Btree

意義:A large number of misses means that you are indexes are too big to fit in RAM, which can cause a significant performance penalty -- 由於數據再也不mem,從disk 加載到mem。
mongodb 使用 btree index
missratio = misses/access 最好是0
access: The number of times the btree indexes have been accessed.
hits:The number of times a btree page was in memory
misses: The number of times a btree page was not in memory
注意:不要只看一條線
此處輸入圖片的描述ssr

  1. Asserts

意義:The number of regular asserts raised since this process started
"asserts" : {
"regular" : ,
"warning" : ,
"msg" : ,
"user" : ,
"rollovers" :
},
不要只看一條線
此處輸入圖片的描述
code

  1. Page faults

意義:The number of page faults on this process. In non-Windows environments this is hard page faults only.
越小越好。
此處輸入圖片的描述
ref:linkorm

PART 2 mms-monitoring-agent and mms-backup-agent

monitoring agent: 主要用於監控db 狀態server

backup agent 主要用於備份db 到雲端htm

monitoring:
安裝:
https://docs.cloud.mongodb.com/tutorial/install-monitoring-agent-with-deb-package/

如何開啓/關閉

sudo start mongodb-mms-monitoring-agent
sudo stop mongodb-mms-monitoring-agent 
https://docs.cloud.mongodb.com/tutorial/start-or-stop-monitoring-agent/

backup :
https://docs.cloud.mongodb.com/tutorial/install-backup-agent-with-deb-package/
how to start & stop

sudo start mongodb-mms-backup-agent

或者:

sudo nohup ./mongodb-mms-backup-agent >> backup-agent.log 2>&1 &

注意權限

https://docs.cloud.mongodb.com/tutorial/start-or-stop-backup-agent/

相關文章
相關標籤/搜索