2

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?

1

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.

|improve this answer|||||
0

If you have a unclean shutdown, when you restart your MongoDB cluster there is not guarantee that your data will be in a consistent state. By "consistent" I mean it might be transactionally consistent or might not be.

I also think you will not officially supported (if you are running enterprise edition with support contract with Mogodb.Inc) in case of a problem.

I encourage you read this answer by Adam (previous employee of MongoDB.Inc) which answers the same question in great details.

Can I disable journalling to improve performance

|improve this answer|||||
  • Thanks! I actually read that answer, however it's very old and might be irrelevant for WiredTiger. – Tzach Aug 2 '17 at 11:50
  • I know it is old but purpose of journal still remains the same I would exercise those alternatives before I turn it off. Personally I used flash storage and separate mount for journaling to speed things up. It is a risk that you need to decide for yourself. – SqlWorldWide Aug 2 '17 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.