-
Notifications
You must be signed in to change notification settings - Fork 1.7k
(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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,6 +559,43 @@ 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`` at least ``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 ``2.6.32-303`` | ||
or later, setting this value to ``0`` could disable swapping. Set this | ||
to ``1``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The section title says "at least 1", so maybe we should say that here as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
|
||
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 | ||
|
@@ -740,20 +777,36 @@ 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)` | ||
````````````````````````````````````````````````````````````````````` | ||
|
||
- When available, 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>`_. | ||
|
||
- Use provisioned IOPS for the storage, with separate devices for | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As long as you're using the :abbr: directive for other abbreviations around here, might as well add it for IOPS too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
journal and data. Do not use the ephemeral storage available on some | ||
instance types as their performance changes moment to moment. | ||
|
||
- Disable hyperthreading, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The suggestions coming from the perf team here are specifically aimed at recommendations for getting reproducible performance tests. They are not aimed at getting maximum performance. As such, they aren't for every body. If a user cares about consistency of performance over raw performance (for benchmarking, or just predictability), they should do this. If they care about performance more than performance reproducibility, they should not pin to one socket and should not disable hyperthreading. To some extents that applies to the ephemeral storage too. I don't know if ephemeral storage is better or worse for someone just concerned about performance, but if someone is wants reproducibility they should use the provisioned IOPS. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I clarified this. |
||
:abbr:`DVFS (dynamic voltage and frequency scaling)`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you using the DVFS abbreviation somewhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is staged here. I was looking for "frequency scaling" and only came across this explanation, which was in sync with what was discussed. Did I miss something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The staging view helped. I see now. Do you want more details on some of these. There are linux command line options for some of the stuff, although they are on the default linux ami now. We have notes on the DVFS stuff also. For c states the linux boot option is processor.max_cstate=1 or sometimes intel_idle.max_cstate=1 depending on kernel version. I found this in my notes which helped me at the time: There's also an idle=poll setting to similar effect. That is baked into the basic ami image now and we're using it. |
||
:abbr:`CPU (central processing unit)` power saving modes. | ||
|
||
.. seealso:: | ||
|
||
- `Amazon blog post on disabling Hyper-Threading <https://aws.amazon.com/blogs/compute/disabling-intel-hyper-threading-technology-on-amazon-linux/>`_. | ||
|
||
- `Amazon documentation on Processor State Control <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/processor_state_control.html>`_ | ||
|
||
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: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this qualification. Why not just say "kernel version 2.6.32-303 or later"? Are there some versions between 2.6.32-303 and 3.5 to which this doesn't apply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I clarified.