Skip to content

DOCS-9158: set readahead to 0 for WiredTiger #2831

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
20 changes: 13 additions & 7 deletions source/administration/production-checklist-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,19 @@ Linux
- :ref:`Adjust the readahead settings <readahead>` on the devices
storing your database files to suit your use case.

For the MMAPv1 storage engine, if your working
set is bigger that the available RAM, and the document access
pattern is random, consider lowering the readahead to 32 or 16.
Evaluate different settings to find an optimal value that maximizes
the resident memory and lowers the number of page faults.

For the WiredTiger storage engine, set readahead to 0 or 16.
- For the MMAPv1 storage engine, if your working set is bigger that the
available RAM, and the document access pattern is random, consider
lowering the readahead to 32 or 16. Evaluate different settings to find
an optimal value that maximizes the resident memory and lowers the
number of page faults.

- For the WiredTiger storage engine, set readahead to 0 regardless of
storage media type (spinning, SSD, etc.). In
general, use the recommended readahead setting unless testing shows a
measurable, repeatable, and reliable benefit in a higher readahead
value. `MongoDB Professional Support
<https://www.mongodb.com/products/enterprise-grade-support>`_ can
provide advice and guidance on non-zero readahead configurations.

- Disable the ``tuned`` tool if you are running RHEL 7 / CentOS 7 in a
virtual environment.
Expand Down
18 changes: 13 additions & 5 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,19 @@ consider the following recommendations:

For the **WiredTiger** storage engine:

- Set the readahead setting to 0 or 16. Setting a higher readahead
benefits sequential I/O operations. However, since MongoDB disk
access patterns are generally random, setting a higher readahead
provides limited benefit. As such, for most workloads, a readahead of
0 or 16 provides optimal MongoDB performance.
- Set the readahead setting to 0 regardless of storage media type (spinning,
SSD, etc.).

Setting a higher readahead benefits sequential I/O operations. However,
since MongoDB disk access patterns are generally random, setting a higher
readahead provides limited benefit or performance degradation. As such, for
most workloads, a readahead of 0 provides optimal MongoDB performance.

In general, set the readahead setting to 0 unless testing shows a
measurable, repeatable, and reliable benefit in a higher readahead value.
`MongoDB Professional Support
<https://www.mongodb.com/products/enterprise-grade-support>`_ can provide
advice and guidance on non-zero readahead configurations.

For the **MMAPv1** storage engine:

Expand Down