1

I'm not able to get a clear answer from the docs that when the data is actually persisted to disk in a WiredTiger storage engine when journaling is disabled.

MongoDB sets checkpoints to occur in WiredTiger on user data at an interval of 60 seconds or when 2 GB of journal data has been written, whichever occurs first.

50 milliseconds since 3.2

It also says

WiredTiger uses checkpoints to provide a consistent view of data on disk and allow MongoDB to recover from the last checkpoint.

But it's not clear at what intervals data is permanently written to disk when I start the server with journaling disabled.

ares
  • 4,283
  • 6
  • 32
  • 63

1 Answers1

3

As such, the data is flushed to disk at every checkpoint (50 ms interval) with or without journaling. Journaling keeps record of changes from last checkpoint to when the mongod exits uncleanly.

So starting your server with journaling disabled would have mongod replay changes from last checkpoint to failure point if you had journaling enabled at the time of failure else everything should already be flushed to disk to last checkpoint and mongod creates a new checkpoint.

More info here https://docs.mongodb.com/manual/core/wiredtiger/#snapshots-and-checkpoints

s7vr
  • 73,656
  • 11
  • 106
  • 127