Skip to content

DOCS-2396: NUMA documentation update #1984

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
61 changes: 30 additions & 31 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,53 +163,52 @@ Avoid Remote File Systems
MongoDB and NUMA Hardware
~~~~~~~~~~~~~~~~~~~~~~~~~

.. important::
The discussion of NUMA in this section only applies to Linux systems
with *multiple* physical processors, and therefore does *not affect*
deployments where :program:`mongod` instances run on other UNIX-like
systems, on Windows, or on a Linux system with only one physical
processor.

Running MongoDB on a system with Non-Uniform Access Memory (NUMA) can
cause a number of operational problems, including slow performance for
periods of time or high system process usage.
periods of time and high system process usage.

When running MongoDB on NUMA hardware, you should disable NUMA for
MongoDB and instead set an interleave memory policy.
When running MongoDB servers and clients on NUMA hardware, you should configure
a memory interleave policy so that the host behaves in a non-NUMA fashion.
MongoDB checks NUMA settings on start up when deployed on Linux (since version
2.0) and Windows (since version 2.6) machines, and prints a warning if the
NUMA configuration may degrade performance.

.. note::
See `The MySQL "swap insanity" problem and the effects of NUMA
<http://jcole.us/blog/archives/2010/09/28/mysql-swap-insanity-and-the
-nu ma-architecture/>`_ post, which describes the effects of NUMA on
databases. This blog post addresses the impact of NUMA for MySQL,
but the issues for MongoDB are similar. The post introduces NUMA and
its goals, and illustrates how these goals are not compatible with
production databases.

Configuring NUMA on Windows
```````````````````````````

MongoDB version 2.0 and greater checks these settings on start up
when deployed on a Linux-based system, and prints a warning if the
system is NUMA-based.
On Windows, memory interleaving must be enabled through the machine's BIOS.
Please consult your system documentation for details.

To disable NUMA for MongoDB and set an interleave memory policy, use
the ``numactl`` command and start :program:`mongod` in the following
manner:
Configuring NUMA on Linux
`````````````````````````

When running MongoDB on Linux you may instead use the ``numactl`` command
and start the MongoDB programs (:program:`mongod`, :program:`mongos`, or
clients) in the following manner:

.. code-block:: sh

numactl --interleave=all /usr/bin/local/mongod
numactl --interleave=all <path>

Then, disable *zone reclaim* in the ``proc`` settings using the following
command:
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

echo 0 > /proc/sys/vm/zone_reclaim_mode

To fully disable NUMA, you must perform both operations. For more
To fully disable NUMA behavior, you must perform both operations. For more
information, see the `Documentation for /proc/sys/vm/*
<http://www.kernel.org/doc/Documentation/sysctl/vm.txt>`_.

See `The MySQL "swap insanity" problem and the effects of NUMA
<http://jcole.us/blog/archives/2010/09/28/mysql-swap-insanity-and-the
-nu ma-architecture/>`_ post, which describes the effects of NUMA on
databases. This blog post addresses the impact of NUMA for MySQL,
but the issues for MongoDB are similar. The post introduces NUMA and
its goals, and illustrates how these goals are not compatible with
production databases.

Disk and Storage Systems
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -350,7 +349,7 @@ Recommended Configuration
- Disable ``transparent huge pages`` as MongoDB performs
better with normal (4096 bytes) virtual memory pages.

- Disable NUMA in your BIOS. If that is not possible see
- Disable NUMA in your BIOS. If that is not possible see
:ref:`MongoDB on NUMA Hardware <production-numa>`.

- Ensure that readahead settings for the block devices that store the
Expand Down Expand Up @@ -378,7 +377,7 @@ MongoDB on Virtual Environments
The section describes considerations when running MongoDB in some of the
more common virtual environments.

For all platforms, consider :ref:`virtualized-disks-scheduling`.
For all platforms, consider :ref:`virtualized-disks-scheduling`.

EC2
```
Expand Down