Skip to content

DOCS-4483 #2134

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
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,38 @@ MongoDB's performance and ease of use. For more information, see
`this blog post
<http://www.mongodb.com/blog/post/provisioned-iops-aws-marketplace-significantly-boosts-mongodb-performance-ease-use>`_.

Azure
`````
For all MongoDB deployments using Azure, you **must** mount volume
that hosts the :program:`mongod` instance's :setting:`~storage.dbPath`
with the *Host Cache Preference* ``READ/WRITE``.

This applies to all Azure deployments, using any guest operating
system.

If your volumes have inappropriate cache settings, MongoDB may
eventually shut down with the following error:

.. code-block:: none

[DataFileSync] FlushViewOfFile for <data file> failed with error 1 ...
[DataFileSync] Fatal Assertion 16387

These shut downs do not produce data loss if when
:setting:`storage.journal.enabled` is set to ``true``. You can safely
restart :program:`mongod` at any time following this event.

The performance characteristics of MongoDB may change with
``READ/WRITE`` caching enabled.

The TCP keepalive on the Azure load balancer is 240 seconds by
default, which can cause it to silently drop connections if the TCP
keepalive on your Azure systems is greater than this value. You
should set ``tcp_keepalive_time`` to 120 to ameliorate this problem.

.. include:: /includes/fact-tcp-keepalive-linux.rst
.. include:: /includes/fact-tcp-keepalive-windows.rst

VMWare
``````

Expand Down
35 changes: 2 additions & 33 deletions source/faq/diagnostics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,21 @@ TCP keep alive value, which Linux systems store as the
``tcp_keepalive_time`` value. A common keep alive period is ``7200``
seconds (2 hours); however, different distributions and OS X may have
different settings. For MongoDB, you will have better experiences with
shorter keepalive periods, on the order of ``300`` seconds (five minutes).
shorter keepalive periods, on the order of ``120`` seconds (two minutes).

On Linux systems you can use the following operation to check the
value of ``tcp_keepalive_time``:

.. code-block:: sh

cat /proc/sys/net/ipv4/tcp_keepalive_time

You can change the ``tcp_keepalive_time`` value with the following
operation:

.. code-block:: sh

echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time
.. include:: /includes/fact-tcp-keepalive.rst

The new ``tcp_keepalive_time`` value takes effect without requiring
you to restart the :program:`mongod` or :program:`mongos`
servers. When you reboot or restart your system you will need to set
the new ``tcp_keepalive_time`` value, or see your operating system's
documentation for setting the TCP keepalive value persistently.

For OS X systems, issue the following command to view the keep alive
setting:

.. code-block:: sh

sysctl net.inet.tcp.keepinit

To set a shorter keep alive period use the following invocation:

.. code-block:: sh

sysctl -w net.inet.tcp.keepinit=300

If your replica set or sharded cluster experiences keepalive-related
issues, you must alter the ``tcp_keepalive_time`` value on all machines
hosting MongoDB processes. This includes all machines hosting
:program:`mongos` or :program:`mongod` servers.

Windows users should consider the `Windows Server Technet Article on
KeepAliveTime configuration
<http://technet.microsoft.com/en-us/library/dd349797.aspx#BKMK_2>`_
for more information on setting keep alive for MongoDB deployments on
Windows systems.

What tools are available for monitoring MongoDB?
------------------------------------------------

Expand Down
14 changes: 14 additions & 0 deletions source/includes/fact-tcp-keepalive-linux.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
On Linux systems you can use the following operation to check the
value of ``tcp_keepalive_time``:

.. code-block:: sh

cat /proc/sys/net/ipv4/tcp_keepalive_time

The value is measured in seconds. You can change the
``tcp_keepalive_time`` value with the following operation:

.. code-block:: sh

echo <value> > /proc/sys/net/ipv4/tcp_keepalive_time

13 changes: 13 additions & 0 deletions source/includes/fact-tcp-keepalive-osx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
For OS X systems, issue the following command to view the keep alive
setting:

.. code-block:: sh

sysctl net.inet.tcp.keepinit

To set a shorter keep alive period use the following invocation:

.. code-block:: sh

sysctl -w net.inet.tcp.keepinit=<value>

22 changes: 22 additions & 0 deletions source/includes/fact-tcp-keepalive-windows.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
For Windows systems, issue the following command to view the keep alive
setting:

.. code-block:: powershell

reg query HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveTime

The registry value is not present by default. The system default used
if the value is absent, is 7200000 *milliseconds*, or ``0x6ddd00`` in
hexadecimal. To set a shorter keep alive period use the following
invocation in an Administrator :guilabel:`Command Prompt`, where
``<value>`` is expressed in hexadecimal (e.g. ``0x0124c0`` is 120000):

.. code-block:: powershell

reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ /v KeepAliveTime /d <value>

Windows users should consider the `Windows Server Technet Article on
KeepAliveTime
<https://technet.microsoft.com/en-us/library/cc957549.aspx>`_
for more information on setting keep alive for MongoDB deployments on
Windows systems.
3 changes: 3 additions & 0 deletions source/includes/fact-tcp-keepalive.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. include:: /includes/fact-tcp-keepalive-linux.rst
.. include:: /includes/fact-tcp-keepalive-osx.rst
.. include:: /includes/fact-tcp-keepalive-windows.rst