Skip to content

DOCS-871 multithreaded replication #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions source/core/replication-internals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,22 @@ behaviors:
value, either ``true`` or ``false``, for the
:data:`members[n].buildIndexes` field.

Multithreaded Replication
-------------------------

MongoDB supports multithreaded replication by applying write operations
on secondary nodes in batches. Each batch is divided among many threads.
The multithreaded writes allow for concurrent CPU usage.

Despite the multithreaded writes, reads on secondaries do not "see"
operations applied out of order. While the threads are writing, MongoDB
blocks read operations, even if the write operations yield.

Before writing a batch of oplog operations, MongoDB fetches all the
memory pages that contain the data and indexes to be written. The
prefetch stage minimizes the amount of time MongoDB must hold the write
lock to apply operations.

Pre-Fetching Indexes to Improve Replication Throughput
------------------------------------------------------

Expand Down