Joomla Jumpstart

  • Increase font size
  • Default font size
  • Decrease font size
Home NoSQL Databases MongoDB Examining MongoDB Performance

Examining MongoDB Performance

E-mail Print PDF
User Rating: / 7
PoorBest 
MongoDB logo

Mongo is very good at providing information on itself -- such as connections, counters for inserts, available connections, etc. There statistics are available through the admin database using the Mongo command line interface.

 

Execute the command line interface by running the mongo command at the operating system command line:

 

mongo

Select the admin database:

use admin

Display the server status:

db.serverStatus()

You should see information like this:

{
        "version" : "1.6.2",
        "uptime" : 445492,
        "uptimeEstimate" : 171705,
        "localTime" : "Sun Nov 14 2010 00:23:45 GMT-0800 (Pacific Standard Time)",
        "globalLock" : {
                "totalTime" : 445491426327,
                "lockTime" : 870000,
                "ratio" : 0.0000019528995365253154,
                "currentQueue" : {
                        "total" : 0,
                        "readers" : 0,
                        "writers" : 0
                }
        },
        "mem" : {
                "bits" : 32,
                "resident" : 2,
                "virtual" : 1295,
                "supported" : true,
                "mapped" : 1264
        },
        "connections" : {
                "current" : 1,
                "available" : 19999
        },
        "extra_info" : {
                "note" : "fields vary by platform"
        },
        "indexCounters" : {
                "note" : "not supported on this platform"
        },
        "backgroundFlushing" : {
                "flushes" : 2894,
                "total_ms" : 1689793,
                "average_ms" : 583.8953006219765,
                "last_ms" : 2,
                "last_finished" : "Sun Nov 14 2010 00:23:34 GMT-0800 (Pacific Standard Time)"
        },
        "cursros" : {
                "totalOpen" : 0,
                "clientCursors_size" : 0,
                "timedOut" : 0
        },
        "opcounters" : {
                "insert" : 0,
                "query" : 3,
                "update" : 0,
                "delete" : 0,
                "getmore" : 0,
                "command" : 5
        },
        "asserts" : {
                "regular" : 0,
                "warning" : 0,
                "msg" : 0,
                "user" : 0,
                "rollovers" : 0
        },
        "ok" : 1
}

You can watch many of these values to see the performance characteristics of the server.

 

 
derickr I am speaking at WhiskyWeb on "OpenStreetMap and The Web" (with PHP and MongoDB). Tickets now for sale: http://t.co/GnJUx8yG
by derickr. Link: Haunt
cgerold RT @antoniovieiro: HyperDex performance vs. Cassandra, MongoDB http://t.co/SYefkBmk 14x faster than redis http://t.co/VgFZ9yXY
by cgerold. Link: web
maxmanders RT @derickr: I am speaking at WhiskyWeb on "OpenStreetMap and The Web" (with PHP and MongoDB). Tickets now for sale: http://t.co/GnJUx8yG
by maxmanders. Link: Haunt
jlecour @shingara Congrats and thanks for your contribution in the latest MongoDB Ruby driver v1.6.
by jlecour. Link: YoruFukurou

Google AdSense


Coffee and Cream Publishing