Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
omkd_max_requests

MongoDB memory usage

MongoDB, in its default configuration, will use will use the larger of either 256 MB or ½ of (ram – 1 GB) for its cache size.

MongoDB cache size can be changed by adding the cacheSizeGB argument to the /etc/mongod.conf configuration file, as shown below.

Code Block
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
  wiredTiger:
      engineConfig:
         cacheSizeGB: 1

Here is an interesting information regarding how MongoDB reserves memory for internal cache and WiredTiger, the underneath technology. Also some adjustment that can be done: https://dba.stackexchange.com/questions/148395/mongodb-using-too-much-memory

Server examples

Stressed system 
Status
colourGreen
titlepoller-nine

System information:

NameValue
nmisd_max_workers10
omkd_workers4
omkd_max_requests500
Nodes406
Active Nodes507
SO

Ubuntu 18.04.3 LTS

This is how the server memory graphs looks in a stressed system: 

Image Added

Image Added

NMIS process keeps stable, is not using more than 120 mb, and the process was stopped - probably killed for the system due to high memory usage: 

Status
colourYellow
titleTODO
 How to check this 

Image Added

The OMK process has more fluctuations and higher memory usage - peaks up to 800 mb. The memory trend is to raise: 

Image Added

And mongod keeps using a lot of memory - 3GB, as configured - but it is stable:

Image Added

Normal system

This is