Mongodb – Disable Journaling in MongoDB + WiredTiger

mongodbwiredtiger

We have a cluster of 3 Mongo 3.2.13 instances running with journaling enabled, with hundreds of DBs and collections which are accessed simultaneously.

We are checking the option to disable journaling, to improve the cluster's performance. According to the docs, WiredTiger performs a checkpoint every 60 seconds, so in a case of crash we should only loose up to 60 seconds of data. We are ok with that.

Are there any other risks / disadvantages for disabling journaling?

Best Answer

When running a journal disabled cluster, we observed frequent disk checkouts - once about every 3 seconds. This was confusing, as the docs specifically mention that checkpoints are created every 60 seconds.

After digging around, we found the following comment on mongo's Jira:

... it is expected that the primary node executes a checkpoint whenever there are multiple write threads as this checkpoint ensures that writes to the replica set are durable

This means that when journaling is disabled, and there are multiple threads writing to the DB, checkpoints become frequent and slow down the entire instance.

This, of course, was a sufficient reason for us to turn on journaling again.