Thursday, January 17, 2019

mongostat 摘要

mongostat 可說是 MongoDB 最重要的 monitor 指令。不管你是用 command line 或是 GUI效能監控工具,都必須對 mongostat 的結果欄位有正確的認識。

指令常用選項
mongostat -u <acct> -p <pw> --port <pNum> --authenticationDatabase <db> <sec>  
MEMORY 欄位
mapped: 僅 MMAPv1 Storage Engine 有效,代表 'total data size'. WiredTiger 為 0
res (resident memory): mongod process 所使用的 memory
vsize (virtual memory): MMAPv1 Storage Engine 為2倍 mapped mem。 WiredTiger, 一般略大於 res,但 connection thread stack 也會佔據相當程度的 vsize。

指令類型欄位
用以分析每秒有幾次 insert, query, update, delete, getmore 以及 command 指令。

READ:
getmore: 執行 'cursor' 時,一次取得的資料已用完,需再次向 server “getmore”。但在secondary node 這是 replication process 的一部分。
query

WRITE: 
insert / update / delete

command: 除了 'insert' 'update' 'delete' 之外的所有指令


*星號,代表 'replicated operation'




ref:
https://stackoverflow.com/questions/52002939/what-is-number-of-command-operations-reported-by-mongostat

No comments:

Post a Comment