diff --git a/source/reference/ulimit.txt b/source/reference/ulimit.txt index 591e2c3e872..68c20233b1b 100644 --- a/source/reference/ulimit.txt +++ b/source/reference/ulimit.txt @@ -150,6 +150,27 @@ change to system limits made using ``ulimit`` may revert following a system restart. Check your distribution and operating system documentation for more information. +You should typically start :binary:`~bin.mongod` using ``systemctl``, +which uses the ``ulimit`` settings: + +.. code-block:: bash + + systemctl start mongod.service + +If you *do not* start :binary:`~bin.mongod` using ``systemctl``, +``systemd`` overrides some of the ``ulimit`` settings. For example, if +you start :binary:`~bin.mongod` as shown in the following command, then +a user slice (such as ``user-1000.slice``) ``systemd`` setting is used: + +.. code-block:: bash + + mongod --config ~/mongod.conf + +.. note:: + + A ``systemd`` user slice limits the resources for the user's + processes. + macOS `````