慢查询相关
慢查询
1 | db.currentOp().inprog.forEach( |
wiredtiger相关
查看mongodb cache size(bytes)
1 | db.runCommand( { serverStatus: 1 } ).wiredTiger.cache["bytes currently in the cache"] |
查看mongodb内存占用(MB)
mongo shell
1 | db.runCommand( { serverStatus: 1, workingSet: 1 } ).mem.resident |
linux shell(最后一列是实际物理内存占用)
1 | ps -e -o 'pid,comm,rsz' |
查看系统缺页信息
1 | ps -eo min_flt,maj_flt,pid,%cpu,%mem,pagein,args --sort=min_flt | grep mongo |
数据chunk相关
查看chunk大小
1 | var ns = "test.test" |
查询并切分大chunk
1 |
|
Balancer
1 | use config |