Skip to content

Commit 84c28dc

Browse files
author
Bob Grabar
committed
DOCS-814 more review edits
1 parent 5732009 commit 84c28dc

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

source/administration/journaling.txt

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,23 @@ Enable Journaling
4545
To enable journaling, start :program:`mongod` with the
4646
:option:`--journal` command line option.
4747

48-
If :program:`mongod` decides to preallocate the files, it will not start
49-
listening on port 27017 until this process completes, which can take a
50-
few minutes. Your applications and the shell will not be able to connect
51-
to the database until the process completes.
48+
If the :program:`mongod` process preallocates the files, the process
49+
delays listening on port 27017 until preallocation completes, which can
50+
take a few minutes. Your applications and the shell will not be able to
51+
connect to the database until the process completes.
5252

5353
Disable Journaling
5454
~~~~~~~~~~~~~~~~~~
5555

56+
.. warning::
57+
58+
Do not disable journaling on production systems. If your MongoDB
59+
system stops unexpectedly from a power failure or other condition,
60+
and if you are not running with journaling, then you must recover
61+
from an unaffected :term:`replica set` member or backup, as described
62+
in :doc:`repair
63+
</tutorial/recover-data-following-unexpected-shutdown>`.
64+
5665
To disable journaling, start :program:`mongod` with the
5766
:option:`--nojournal <mongod --nojournal>` command line option.
5867

@@ -152,7 +161,7 @@ Use the following commands and methods to monitor journal status:
152161
Change the Group Commit Interval
153162
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154163

155-
.. versionchanged:: 1.9.2
164+
.. versionchanged:: 2.0
156165

157166
You can set the group commit interval using the
158167
:option:`--journalCommitInterval <mongod --journalCommitInterval>`
@@ -229,10 +238,7 @@ needed.
229238
The ``private view`` stores data for use in :doc:`read operations
230239
</core/read-operations>`. The ``private view`` is mapped to the ``shared view``
231240
and is the first place MongoDB applies new :doc:`write operations
232-
</core/write-operations>`, mean read operations get the most up-to-date
233-
data. Keep in mind that because the ``private view`` is a second mapping
234-
of data files, journaling often doubles the amount of virtual memory
235-
:program:`mongod` uses.
241+
</core/write-operations>`.
236242

237243
The journal is an on-disk view that stores new write operations
238244
after they have been applied to the ``private cache`` but before they
@@ -246,11 +252,10 @@ the ``shared view`` for eventual upload to the data files.
246252
How Journaling Records Write Operations
247253
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248254

249-
MongoDB copies the write operations to the journal in batches
250-
called group commits. By default, MongoDB performs a group commit every
251-
100 milliseconds, which means a series of operations over 100
252-
milliseconds are committed as a single batch. This is done to achieve
253-
high performance.
255+
MongoDB copies the write operations to the journal in batches called
256+
group commits. By default, MongoDB performs a group commit every 100
257+
milliseconds, which means a series of operations over 100 milliseconds
258+
are committed as a single batch. This is done to improve performance.
254259

255260
Journaling stores raw operations that allow MongoDB to reconstruct the
256261
following:
@@ -259,16 +264,16 @@ following:
259264
- index modifications
260265
- changes to the namespace files
261266

262-
As users perform :doc:`write operations </core/write-operations>`,
263-
MongoDB writes the data first to the ``private view`` in RAM. MongoDB
264-
then copies the write operations in batches from the ``private view`` to
265-
the journal, which stores the operations on disk to ensure durability.
266-
MongoDB adds write operations as entries on the journal's forward
267-
pointer. Each entry on the pointer describes which bytes the write
268-
operation changed in the data files.
267+
As :doc:`write operations </core/write-operations>` occur, MongoDB
268+
writes the data to the ``private view`` in RAM and then copies the write
269+
operations in batches to the journal. The journal stores the operations
270+
on disk to ensure durability. MongoDB adds the operations as entries on
271+
the journal's forward pointer. Each entry describes which bytes the
272+
write operation changed in the data files.
269273

270274
MongoDB next applies the journal's write operations to the ``shared
271-
view``. At this point, the ``shared view`` becomes inconsistent with the data files.
275+
view``. At this point, the ``shared view`` becomes inconsistent with the
276+
data files.
272277

273278
At default intervals of 60 seconds, MongoDB asks the operating system to
274279
flush the ``shared view`` to disk. This brings the data files up-to-date

0 commit comments

Comments
 (0)