Skip to content

production-notes: tweak Linux NUMA disable #2366

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
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
23 changes: 15 additions & 8 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,21 +284,28 @@ Please consult your system documentation for details.
Configuring NUMA on Linux
`````````````````````````

When running MongoDB on Linux, you may instead use the ``numactl``
command and start the MongoDB programs (:program:`mongod`, including
the :doc:`config servers </core/sharded-cluster-config-servers>`;
:program:`mongos`; or clients) in the following manner:
When running MongoDB on Linux, you should disable *zone reclaim* in the
``sysctl`` settings using one of the following commands:

.. code-block:: sh

numactl --interleave=all <path>
echo 0 | sudo tee /proc/sys/vm/zone_reclaim_mode

where ``<path>`` is the path to the program you are starting. Then,
disable *zone reclaim* in the ``proc`` settings using the following command:
.. code-block:: sh

sudo sysctl -w vm.zone_reclaim_mode=0

Then, you should use the ``numactl`` command to start the MongoDB programs
(:program:`mongod`, including the :doc:`config servers
</core/sharded-cluster-config-servers>`; :program:`mongos`; and clients) in
the following manner:

.. code-block:: sh

echo 0 > /proc/sys/vm/zone_reclaim_mode
numactl --interleave=all <path> <options>

where ``<path>`` is the path to the program you are starting, and ``<options>``
are any optional arguments to pass to the program.

To fully disable NUMA behavior, you must perform both operations. For more
information, see the `Documentation for /proc/sys/vm/*
Expand Down