Mongodb_ Performance Monitoring

Source: Internet
Author: User



first, the use of Mongostat.exeCDC:\Program files\mongodb\server\3.0\bin\ -Mongostat.exe-->mongostat-n > C:\test.txt Print 10 lines to a text file for easy viewing -mongo.exe Execute MongoDB command
Http://www.cnblogs.com/renyb/archive/2013/01/18/2866632.html
second, the server running state:db.serverstatus ()
http://lavafree.iteye.com/blog/1131312
{"Host": "Baobao-laptop", #主机名 "version": "1.8.2", #版本号 "process": "Mongod", #进程名 "uptime": 15549, #运行时间 "uptimeestimate": 15351, "localtime": Isodate ("2011-07-23t06:07:31.220z"), Current Time "GlobalLock": {"TotalTime": 15548525410, #总运行时间 (NS) " LockTime ": 89206633, #总的锁时间 (ns)" ratio ": 0.005737305027178137, #锁比值" Currentqueue ": {" Total ": 0, #当前需要执行的队列" readers ": 0, #读队列 "Writers": 0# Write Queue}, "Activeclients": {"Total": 0, #当前客户端执行的链接数 "readers": 0, #读链接数 "writers": 0# Write Links}}, "Mem": {#内存情况 "b Its ": +, #32位系统" resident ": 337, #占有物理内存数" virtual ": 599, #占有虚拟内存" supported ": TRUE, #是否支持扩展内存" mapped ":", "connections ": {" Current ": 2, #当前链接数" available ": 817# number of available links}," Extra_info ": {" note ":" Fields vary by platform "," heap_usage_bytes ": 159008, #堆使用情况字节 "page_faults": 907 #页面故作}, "Indexcounters": {"Btree": {"accesses": 59963, #索引被访问数 "hits": 59963, #所以命中数 " Misses ": 0, #索引偏差数" resets ": 0, #复位数" missratio ": 0# not hit rate}," backgroundflushing ": {" Flushes ": 259, #刷新次数" Total_ms ": 3395 , #刷新总花费时长 "Average_ms": 13.108108108108109, #平均时长 "Last_ms": 1, #最后一次时长 "last_finished": Isodate ("2011-07-23t06:07:22.725z") #最后刷新时间}, "Cursors": {"Totalopen ": 0, #打开游标数" clientcursors_size ": 0, #客户端游标大小" timedout ": 16# Time-out}," network ": {" Bytesin ": 285676177, #输入数据 (Byte)" Bytesout ": 286564, #输出数据 (byte)" numrequests ": 2012348# number of requests}," Opcounters ": {" Insert ": 2010000, #插入操作数" query ": Wuyi, #查询操作数" Update ": 5, #更新操作数" delete ": 0, #删除操作数" Getmore ": 0, #获取更多的操作数" command ": 148# other Order operand}," asserts ": {#各个断言的数量" regular ": 0," W Arning ": 0," MSG ": 0," user ": 2131," rollovers ": 0}," writebacksqueued ": false," OK ": 1}
 Third, database operation status:      Db.stats ()       
1. Switch database: Use database name
2. Current database: DB
{"DB": "Order", #库名 "Collections": 4, #集合数 "Objects": 2011622, #记录数 "avgobjsize": 111.92214441878245, #每条记录的平均值 "DataSize" : 225145048, #记录的总大小 "storagesize": 307323392, #预分配的存储空间 "numextents": +, #事件数 "Indexes": 1, #索引数 "indexsize": 74187744,# So size   1024=1kb "fileSize": 1056702464, #文件大小 "OK": 1}

Iv. set running state: DB. Collection name. Stats ()
{"ns": "Order.order", #命名空间 "Count": 2010000, #记录数 "size": 225039600, #大小 "avgobjsize": 111.96, "storagesize": 307186944, " Numextents ": nindexes": 1, "lastextentsize": 56089856, "Paddingfactor": 1, "Flags": 1, "totalindexsize": 74187744, "I Ndexsizes ": {" _id_ ": 74187744# index size for _id_}," OK ": 1}

v. Query State of statements     
1. Command line
Db.order.find ({"Status": 1.0, "User.uid": {$gt:2663199.0}}). Explain ()
{
"Cursor": "Basiccursor", #游标类型
"nscanned": 2010000, #扫描数量
"Nscannedobjects": 2010000, #扫描对象
"N": 337800, #返回数据
"Millis": 2838, #耗时
"Nyields": 0,
"Nchunkskips": 0,
"Ismultikey": false,
"IndexOnly": false,
"Indexbounds": {#使用索引 (not here)
}

2, Mongovue
N: Number of records returned nscannedobjects: Number of documents scanned nscanned: Number of indexes scanned Millis: Elapsed time (in milliseconds)

Mongodb_ Performance Monitoring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.