Skip to content

DOCS-6802: Add initial inMemory documentation #2478

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
53 changes: 53 additions & 0 deletions source/core/inmemory.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. _storage-inmemory:

========================
In-Memory Storage Engine
========================

.. default-domain:: mongodb

.. warning::
The ``inMemory`` storage engine is provided for beta-testing and not intended for
production use at this time.

Starting in MongoDB Enterprise 3.2, an in-memory storage engine is available in
the 64-bit builds for beta-testing purposes. By avoiding disk I/O, this storge
engine allows for more predictable latency of database operations.


Specify In-Memory Storage Engine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To select the in-memory storage engine, specify:
``inMemory`` for the :option:`--storageEngine` option or the
:setting:`storage.engine` setting.

Although the in-memory storage engine does not write data to the filesystem,
it maintains small metadata files in the ``--dbpath``.

.. code-block:: sh

mongod --storageEngine inMemory --dbpath <path>

See :ref:`cli-mongod-inmemory` for configuration options specific to this storage engine.

.. warning::
The ``inMemory`` storage engine is ephemeral, and all data will be lost when
the ``mongod`` instance shuts down.

Concurrency
~~~~~~~~~~~
The in-memory storage engine uses *document-level* concurrency control for write
operations. As a result, multiple clients can modify different
documents of a collection at the same time.

Durability
----------

The in-memory storage engine is ephemeral and does not write data to persistent
storage. As such, the concept of :term:`journal` or waiting for data to become
:term:`durable` does not apply to the in-memory storage engine.
Write operations that specify a write concern :writeconcern:`journaled <j>` are
acknowledged immediately. When an :program:`mongod` instance shuts down, either as
result of the :dbcommand:`shutdown` command or due to a system error, recovery is
impossible.

24 changes: 24 additions & 0 deletions source/includes/options-mongod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2040,4 +2040,28 @@ description: |
rather than the "mirrored mongod" write protocol.

directive: option
---
program: mongod
name: inMemorySizeGB
optional: true
args: <integer>
default: |
60% of physical RAM less 1 GB
directive: option
description: |
.. versionadded:: 3.2

Maximum amount of memory to allocate for :doc:`core/inmemory` data and indexes.
---
program: mongod
name: inMemoryStatisticsLogDelaySecs
optional: true
args: <integer>
default: |
0, do not log statistics.
directive: option
description: |
.. versionadded:: 3.2

Seconds to wait between each write to a :doc:`/core/inmemory` statistics file in the :option:`--dbpath`.
...
4 changes: 4 additions & 0 deletions source/includes/toc-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ description: |
file: /core/wiredtiger
description:
An introduction to the WiredTiger storage engine.
---
file: /core/inmemory
description:
An introduction to the in-memory storage engine.
...
62 changes: 43 additions & 19 deletions source/reference/program/mongod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,28 @@ Core Options

.. include:: /includes/option/option-mongod-bind_ip.rst

.. include:: /includes/option/option-mongod-ipv6.rst

.. include:: /includes/option/option-mongod-maxConns.rst

.. include:: /includes/option/option-mongod-logpath.rst

.. include:: /includes/option/option-mongod-syslog.rst

.. include:: /includes/option/option-mongod-syslogFacility.rst

.. include:: /includes/option/option-mongod-logpath.rst

.. include:: /includes/option/option-mongod-logappend.rst

.. include:: /includes/option/option-mongod-logRotate.rst

.. include:: /includes/option/option-mongod-timeStampFormat.rst

.. COMMENT diaglog is deprecated and not in mongod help output

.. include:: /includes/option/option-mongod-diaglog.rst

.. COMMENT traceExceptions is internal use only and not in mongod help output

.. include:: /includes/option/option-mongod-traceExceptions.rst

.. include:: /includes/option/option-mongod-pidfilepath.rst
Expand All @@ -73,8 +79,12 @@ Core Options

.. include:: /includes/option/option-mongod-httpinterface.rst

.. COMMENT nohttpinterface not in mongod help output

.. include:: /includes/option/option-mongod-nohttpinterface.rst

.. COMMENT clusterAuthMode moved to SSL section

.. include:: /includes/option/option-mongod-nounixsocket.rst

.. include:: /includes/option/option-mongod-unixSocketPrefix.rst
Expand All @@ -87,8 +97,6 @@ Core Options

.. include:: /includes/option/option-mongod-noauth.rst

.. include:: /includes/option/option-mongod-ipv6.rst

.. include:: /includes/option/option-mongod-jsonp.rst

.. include:: /includes/option/option-mongod-rest.rst
Expand All @@ -101,6 +109,8 @@ Core Options

.. include:: /includes/option/option-mongod-sysinfo.rst

.. COMMENT objcheck and noobjcheck missing from mongod help output

.. include:: /includes/option/option-mongod-objcheck.rst

.. include:: /includes/option/option-mongod-noobjcheck.rst
Expand All @@ -114,26 +124,14 @@ Core Options
Storage Options
~~~~~~~~~~~~~~~

.. include:: /includes/option/option-mongod-dbpath.rst

.. include:: /includes/option/option-mongod-storageEngine.rst

.. _cli-wiredtiger-options:

.. include:: /includes/option/option-mongod-wiredTigerCacheSizeGB.rst

.. include:: /includes/option/option-mongod-wiredTigerStatisticsLogDelaySecs.rst

.. include:: /includes/option/option-mongod-wiredTigerJournalCompressor.rst

.. include:: /includes/option/option-mongod-wiredTigerDirectoryForIndexes.rst

.. include:: /includes/option/option-mongod-wiredTigerCollectionBlockCompressor.rst

.. include:: /includes/option/option-mongod-wiredTigerIndexPrefixCompression.rst
.. include:: /includes/option/option-mongod-dbpath.rst

.. include:: /includes/option/option-mongod-directoryperdb.rst

.. COMMENT noIndexBuildRetry is not in mongod help output

.. include:: /includes/option/option-mongod-noIndexBuildRetry.rst

.. include:: /includes/option/option-mongod-noprealloc.rst
Expand Down Expand Up @@ -162,6 +160,23 @@ Storage Options

.. include:: /includes/option/option-mongod-journalCommitInterval.rst

.. _cli-wiredtiger-options:

WiredTiger Options
~~~~~~~~~~~~~~~~~~

.. include:: /includes/option/option-mongod-wiredTigerCacheSizeGB.rst

.. include:: /includes/option/option-mongod-wiredTigerStatisticsLogDelaySecs.rst

.. include:: /includes/option/option-mongod-wiredTigerJournalCompressor.rst

.. include:: /includes/option/option-mongod-wiredTigerDirectoryForIndexes.rst

.. include:: /includes/option/option-mongod-wiredTigerCollectionBlockCompressor.rst

.. include:: /includes/option/option-mongod-wiredTigerIndexPrefixCompression.rst

.. _cli-mongod-replica-set:

Replication Options
Expand Down Expand Up @@ -263,6 +278,15 @@ SNMP Options

.. _encryption-key-management-options:

.. _cli-mongod-inmemory:

inMemory Options
~~~~~~~~~~~~~~~~

.. include:: /includes/option/option-mongod-inMemorySizeGB.rst

.. include:: /includes/option/option-mongod-inMemoryStatisticsLogDelaySecs.rst

Encryption Key Management Options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down