Skip to content

Commit 93af212

Browse files
Tony Sansonekay-kim
authored andcommitted
(DOCSP-1271, DOCS-10405): Updated Production Notes.
1 parent 9f96477 commit 93af212

File tree

1 file changed

+63
-10
lines changed

1 file changed

+63
-10
lines changed

source/administration/production-notes.txt

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,43 @@ possible, use XFS as it generally performs better with MongoDB.
559559
*on directories*. For example, HGFS and Virtual Box's shared
560560
folders do *not* support this operation.
561561

562+
Set ``vm.swappiness`` at least ``1``
563+
````````````````````````````````````
564+
565+
“Swappiness” is a Linux kernel setting that influences the behavior of
566+
the Virtual Memory manager when it needs to allocate a swap, ranging
567+
from ``0`` to ``100``, inclusive.
568+
569+
- A setting of ``0`` tells the kernel to swap only to avoid
570+
out-of-memory problems.
571+
572+
- A setting of ``100`` tells it to swap aggressively to disk.
573+
574+
If your host runs kernel versions ``3.5`` or later, or ``2.6.32-303``
575+
or later, setting this value to ``0`` could disable swapping. Set this
576+
to ``1``.
577+
578+
To see what the current swappiness level is, run:
579+
580+
.. code-block:: sh
581+
582+
example@example:$ cat /proc/sys/vm/swappiness
583+
584+
60
585+
586+
To change swappiness while the system is running, run:
587+
588+
.. code-block:: sh
589+
590+
example@example:$ sysctl vm.swappiness=1
591+
592+
To change swappiness permanently, edit the ``/etc/sysctl.conf`` file in
593+
your preferred text editor and change this value:
594+
595+
.. code-block:: ini
596+
597+
vm.swappiness = 1
598+
562599
.. _linux-recommended-configuration:
563600

564601
Recommended Configuration
@@ -740,20 +777,36 @@ accommodate Windows' commitment rules during peak database use.
740777
MongoDB on Virtual Environments
741778
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
742779

743-
This section describes considerations when running MongoDB in some of the
744-
more common virtual environments.
780+
This section describes considerations when running MongoDB in some of
781+
the more common virtual environments.
745782

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

748-
EC2
749-
```
785+
:abbr:`AWS (Amazon Web Services)` :abbr:`EC2 (Elastic Compute Cloud)`
786+
`````````````````````````````````````````````````````````````````````
787+
788+
- When available, enable :abbr:`AWS (Amazon Web Services)`
789+
`Enhanced Networking <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking>`_
790+
for your instance. Not all instance types support Enhanced Networking.
791+
792+
To learn more about Enhanced Networking, see to the
793+
`AWS documentation <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking>`_.
794+
795+
- Use provisioned IOPS for the storage, with separate devices for
796+
journal and data. Do not use the ephemeral storage available on some
797+
instance types as their performance changes moment to moment.
798+
799+
- Disable hyperthreading,
800+
:abbr:`DVFS (dynamic voltage and frequency scaling)`,
801+
:abbr:`CPU (central processing unit)` power saving modes.
802+
803+
.. seealso::
804+
805+
- `Amazon blog post on disabling Hyper-Threading <https://aws.amazon.com/blogs/compute/disabling-intel-hyper-threading-technology-on-amazon-linux/>`_.
806+
807+
- `Amazon documentation on Processor State Control <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/processor_state_control.html>`_
750808

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

758811
.. _windows-azure-production-notes:
759812

0 commit comments

Comments
 (0)