Skip to content

(DOCSP-1271, DOCS-10405): Updated Production Notes. #3233

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 3 commits into from
Mar 5, 2018
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
90 changes: 80 additions & 10 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,44 @@ possible, use XFS as it generally performs better with MongoDB.
*on directories*. For example, HGFS and Virtual Box's shared
folders do *not* support this operation.

Set ``vm.swappiness`` to ``1``
``````````````````````````````

“Swappiness” is a Linux kernel setting that influences the behavior of
the Virtual Memory manager when it needs to allocate a swap, ranging
from ``0`` to ``100``, inclusive.

- A setting of ``0`` tells the kernel to swap only to avoid
out-of-memory problems.

- A setting of ``100`` tells it to swap aggressively to disk.

If your host runs kernel versions ``3.5`` or later, or
:abbr:`RHEL (Red Hat Enterprise Linux)` / CentOS kernel ``2.6.32-303``
or later, setting this value to ``0`` could disable swapping. Set this
to ``1``.

To see what the current swappiness level is, run:

.. code-block:: sh

example@example:$ cat /proc/sys/vm/swappiness

60

To change swappiness while the system is running, run:

.. code-block:: sh

example@example:$ sysctl vm.swappiness=1

To change swappiness permanently, edit the ``/etc/sysctl.conf`` file in
your preferred text editor and change this value:

.. code-block:: ini

vm.swappiness = 1

.. _linux-recommended-configuration:

Recommended Configuration
Expand Down Expand Up @@ -740,20 +778,52 @@ accommodate Windows' commitment rules during peak database use.
MongoDB on Virtual Environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This section describes considerations when running MongoDB in some of the
more common virtual environments.
This section describes considerations when running MongoDB in some of
the more common virtual environments.

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

EC2
```
:abbr:`AWS (Amazon Web Services)` :abbr:`EC2 (Elastic Compute Cloud)`
`````````````````````````````````````````````````````````````````````

There are two performance configurations to consider:

- Reproducible performance for performance testing or benchmarking, and
- Raw maximum performance

To tune performance on :abbr:`EC2 (Elastic Compute Cloud)` for either
configuration, you should:

- Enable :abbr:`AWS (Amazon Web Services)`
`Enhanced Networking <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking>`_
for your instance. Not all instance types support Enhanced Networking.

To learn more about Enhanced Networking, see to the
`AWS documentation <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking>`_.

If you are concerned more about reproducible performance on
:abbr:`EC2 (Elastic Compute Cloud)`, you should also:

- Use provisioned :abbr:`IOPS (Input/Output Operations Per Second)`
for the storage, with separate devices for journal and data. Do not
use the ephemeral (:abbr:`SSD (Solid State Disk)`) storage available
on most instance types as their performance changes moment to moment.
(The ``i`` series is a notable exception, but very expensive.)

- Disable :abbr:`DVFS (dynamic voltage and frequency scaling)` and
:abbr:`CPU (central processing unit)` power saving modes.

.. seealso::

`Amazon documentation on Processor State Control <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/processor_state_control.html>`_

- Disable hyperthreading.

.. seealso::

`Amazon blog post on disabling Hyper-Threading <https://aws.amazon.com/blogs/compute/disabling-intel-hyper-threading-technology-on-amazon-linux/>`_.

When available, enable AWS's `Enhanced Networking
<http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking>`_
for your instance. Not all instance types support Enhanced Networking.
Refer to the `AWS documentation
<http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking>`_
for more information.
- Use ``numactl`` to bind memory locality to a single socket.

.. _windows-azure-production-notes:

Expand Down