1
- ================
1
+ m ================
2
2
Production Notes
3
3
================
4
4
@@ -281,6 +281,15 @@ reads/writes in the (``ar|aw``) column.
281
281
282
282
.. include:: /includes/extracts/wt-configure-cache.rst
283
283
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
+
284
293
.. seealso:: :ref:`prod-notes-concurrency`
285
294
286
295
Use Solid State Disks (SSDs)
@@ -289,7 +298,6 @@ Use Solid State Disks (SSDs)
289
298
MongoDB has good results and a good price-performance ratio with
290
299
SATA SSD (Solid State Disk).
291
300
292
-
293
301
Use SSD if available and economical. Spinning disks can be
294
302
performant, but SSDs' capacity for random I/O operations works well
295
303
with the update model of MMAPv1.
@@ -346,16 +354,20 @@ When running MongoDB on Linux, you should disable *zone reclaim* in the
346
354
347
355
sudo sysctl -w vm.zone_reclaim_mode=0
348
356
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``:
353
365
354
366
.. code-block:: sh
355
367
356
368
numactl --interleave=all <path> <options>
357
369
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>``
359
371
are any optional arguments to pass to the program.
360
372
361
373
To fully disable NUMA behavior, you must perform both operations. For more
@@ -419,7 +431,9 @@ Separate Components onto Different Storage Devices
419
431
420
432
For improved performance, consider separating your database's data,
421
433
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.
423
437
424
438
For the WiredTiger storage engine, you can also store the indexes on a
425
439
different storage device. See
@@ -433,14 +447,26 @@ different storage device. See
433
447
434
448
.. _virtualized-disks-scheduling:
435
449
436
- Scheduling for Virtual Devices
437
- ``````````````````````````````
450
+ Scheduling
451
+ ``````````
452
+
453
+ Scheduling for Virtual or Cloud Hosted Devices
454
+ ++++++++++++++++++++++++++++++++++++++++++++++
438
455
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
441
459
*noop* scheduler allows the operating system to defer I/O scheduling to
442
460
the underlying hypervisor.
443
461
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
+
444
470
Architecture
445
471
------------
446
472
@@ -561,10 +587,18 @@ consider the following recommendations:
561
587
562
588
.. include:: /includes/fact-selinux-server-side-js.rst
563
589
564
- For the **MMAPv1** storage engine:
565
-
566
590
.. _readahead:
567
591
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
+
568
602
- Ensure that readahead settings for the block devices that store the
569
603
database files are appropriate. For random access use patterns, set
570
604
low readahead values. A readahead of 32 (16 kB) often works well.
0 commit comments