MongoDB Documentation, Release 3.0.4 Monitor Journal Status Use the following commands and methods to monitor journal status: Use journalLatencyTest to measure how long it takes on your volume to write to the disk in an append- only fashion. You can run this command on an idle system to get a baseline sync time for journaling. You can also run this command on a busy system to see the sync time on a busy system, which may be higher if the journal directory is on the same volume as the data files. The journalLatencyTest command also provides a way to check if your disk drive is buffering writes in its local cache. If the number is very low (i.e., less than 2 milliseconds) and the drive is non-SSD, the drive is probably buffering writes. In that case, enable cache write-through for the device in your operating system, unless you have a disk controller card with battery backed RAM. Change the Group Commit Interval Changed in version 2.0. You can set the group commit interval using the --journalCommitInterval command line option. The allowed range is 2 to 300 milliseconds. Lower values increase the durability of the journal at the expense of disk performance. Recover Data After Unexpected Shutdown On a restart after a crash, MongoDB replays all journal files in the journal directory before the server becomes available. If MongoDB must replay journal files, mongod notes these events in the log output. There is no reason to run repairDatabase in these situations. Note: Do not store application logic in the database. There are performance limitations to running JavaScript inside of MongoDB. Application code also is typically most effective when it shares version control with the application itself. There is a special system collection named system.js that can store JavaScript functions for reuse. To store a function, you can use the db.collection.save() , as in the following examples: 5.2. Administration Tutorials 235 • serverStatus • journalLatencyTest The serverStatus command returns database status information that is useful for assessing performance. Store a JavaScript Function on the Server • The _id field holds the name of the function and is unique per database. • The value field holds the function definition. db.system.js.save( { _id: "echoFunction", value : function (x) { return x; } } ) db.system.js.save( { _id : "myAddFunction" , value : function (x, y){ return x + y; } } );