Skip to content

Commit a75dced

Browse files
committed
DOCS-6635, DOCS-7444, DOCS-8610: prodnotes hardware considerations revisions
1 parent 2d2654f commit a75dced

File tree

2 files changed

+60
-15
lines changed

2 files changed

+60
-15
lines changed

source/administration/production-checklist-operations.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,23 @@ Linux
168168
</tutorial/transparent-huge-pages>` for more information.
169169

170170
- :ref:`Adjust the readahead settings <readahead>` on the devices
171-
storing your database files to suit your use case. If your working
171+
storing your database files to suit your use case.
172+
For the MMAPv1 storage engine, if your working
172173
set is bigger that the available RAM, and the document access
173174
pattern is random, consider lowering the readahead to 32 or 16.
174175
Evaluate different settings to find an optimal value that maximizes
175176
the resident memory and lowers the number of page faults.
176177

178+
For the WiredTiger storage engine, set readahead to 0 or 16.
179+
180+
- Disable the ``tuned`` tool if you are running RHEL 7 / CentOS 7 in a
181+
virtual environment.
182+
183+
When RHEL 7 / CentOS 7 run in a virtual environment, the ``tuned`` tool
184+
automatically invokes a performance profile derived from
185+
performance throughput, which automatically sets the readahead
186+
settings to 4MB. This can negatively impact performance.
187+
177188
- Use the ``noop`` or ``deadline`` disk schedulers for SSD drives.
178189

179190
- Use the ``noop`` disk scheduler for virtualized drives in guest VMs.

source/administration/production-notes.txt

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
================
1+
m================
22
Production Notes
33
================
44

@@ -281,6 +281,15 @@ reads/writes in the (``ar|aw``) column.
281281

282282
.. include:: /includes/extracts/wt-configure-cache.rst
283283

284+
Compression and Encryption
285+
``````````````````````````
286+
287+
When using encryption, CPUs equipped with AES-NI instruction-set
288+
extensions show significant performance advantages.
289+
If you are using MongoDB Enterprise with the
290+
:ref:`encrypted-storage-engine`, choose a CPU that supports AES-NI for
291+
better performance.
292+
284293
.. seealso:: :ref:`prod-notes-concurrency`
285294

286295
Use Solid State Disks (SSDs)
@@ -289,7 +298,6 @@ Use Solid State Disks (SSDs)
289298
MongoDB has good results and a good price-performance ratio with
290299
SATA SSD (Solid State Disk).
291300

292-
293301
Use SSD if available and economical. Spinning disks can be
294302
performant, but SSDs' capacity for random I/O operations works well
295303
with the update model of MMAPv1.
@@ -346,16 +354,20 @@ When running MongoDB on Linux, you should disable *zone reclaim* in the
346354

347355
sudo sysctl -w vm.zone_reclaim_mode=0
348356

349-
Then, you should use the ``numactl`` command to start the MongoDB programs
350-
(:program:`mongod`, including the :doc:`config servers
351-
</core/sharded-cluster-config-servers>`; :program:`mongos`; and clients) in
352-
the following manner:
357+
Then, you should use ``numactl`` to start your
358+
:program:`mongod` instances, including the :doc:`config servers
359+
</core/sharded-cluster-config-servers>`, :program:`mongos` instances, and any clients.
360+
If you do not have the ``numactl`` command, refer to the documentation for
361+
your operating system to install the ``numactl`` package.
362+
363+
The following operation demonstrates how to start a MongoDB instance
364+
using ``numactl``:
353365

354366
.. code-block:: sh
355367

356368
numactl --interleave=all <path> <options>
357369

358-
where ``<path>`` is the path to the program you are starting, and ``<options>``
370+
The ``<path>`` is the path to the program you are starting and the ``<options>``
359371
are any optional arguments to pass to the program.
360372

361373
To fully disable NUMA behavior, you must perform both operations. For more
@@ -419,7 +431,9 @@ Separate Components onto Different Storage Devices
419431

420432
For improved performance, consider separating your database's data,
421433
journal, and logs onto different storage devices, based on your application's
422-
access and write pattern.
434+
access and write pattern. Mount the components as separate filesystems
435+
and use symbolic links to map each component's path to the device
436+
storing it.
423437

424438
For the WiredTiger storage engine, you can also store the indexes on a
425439
different storage device. See
@@ -433,14 +447,26 @@ different storage device. See
433447

434448
.. _virtualized-disks-scheduling:
435449

436-
Scheduling for Virtual Devices
437-
``````````````````````````````
450+
Scheduling
451+
``````````
452+
453+
Scheduling for Virtual or Cloud Hosted Devices
454+
++++++++++++++++++++++++++++++++++++++++++++++
438455

439-
Local block devices attached to virtual machine instances via the
440-
hypervisor should use a *noop* scheduler for best performance. The
456+
For local block devices attached to a virtual machine instance via
457+
the hypervisor or hosted by a cloud hosting provider, the guest operating system
458+
should use a *noop* scheduler for best performance. The
441459
*noop* scheduler allows the operating system to defer I/O scheduling to
442460
the underlying hypervisor.
443461

462+
Scheduling for Physical Servers
463+
+++++++++++++++++++++++++++++++
464+
465+
For physical servers, the operating system should use a *deadline*
466+
scheduler. The *deadline* scheduler caps maximum latency per request
467+
and maintains a good disk throughput that is best for disk-intensive
468+
database applications.
469+
444470
Architecture
445471
------------
446472

@@ -561,10 +587,18 @@ consider the following recommendations:
561587

562588
.. include:: /includes/fact-selinux-server-side-js.rst
563589

564-
For the **MMAPv1** storage engine:
565-
566590
.. _readahead:
567591

592+
For the **WiredTiger** storage engine:
593+
594+
- Set the readahead setting to 0 or 16. Setting a higher readahead
595+
benefits sequential I/O operations. However, since MongoDB disk
596+
access patterns are generally random, setting a higher readahead
597+
provides limited benefit. As such, for most workloads, a readahead of
598+
0 or 16 provides optimal MongoDB performance.
599+
600+
For the **MMAPv1** storage engine:
601+
568602
- Ensure that readahead settings for the block devices that store the
569603
database files are appropriate. For random access use patterns, set
570604
low readahead values. A readahead of 32 (16 kB) often works well.

0 commit comments

Comments
 (0)