@@ -559,6 +559,43 @@ possible, use XFS as it generally performs better with MongoDB.
559
559
*on directories*. For example, HGFS and Virtual Box's shared
560
560
folders do *not* support this operation.
561
561
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
+
562
599
.. _linux-recommended-configuration:
563
600
564
601
Recommended Configuration
@@ -740,20 +777,36 @@ accommodate Windows' commitment rules during peak database use.
740
777
MongoDB on Virtual Environments
741
778
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
742
779
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.
745
782
746
783
For all platforms, consider :ref:`virtualized-disks-scheduling`.
747
784
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>`_
750
808
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.
757
810
758
811
.. _windows-azure-production-notes:
759
812
0 commit comments