Journal File Size

In this chapter at 3:18, the instructor says the maximum size of journal file is 100MB and at 3:35 he says wiredtiger flushes data to disk when the journal file has 2GB of data. Please clarify on this.

Hi @pradwik11,

For the journal files, MongoDB creates a subdirectory named journal under the dbPath directory.

Because MongoDB uses a journal file size limit of 100 MB, WiredTiger creates a new journal file approximately every 100 MB of data.

So when this journal directory has 2GB of data, it is flushed to the disk.

Hope this answers your question.
Please refer to the following documentation for more clarity: https://docs.mongodb.com/manual/core/journaling/#journaling-wiredtiger

Thanks,
Muskan
Curriculum Support Engineer