Note: This page describes an advanced configuration option for SAFR Server; most users don't need to worry about configuring MongoDB's memory cache.
SAFR Server uses MongoDB to store event data and identity data. By default, MongoDB caches about 9 GB RAM for operation. MongoDB can fault if at any time the full amount of the cache isn't available for use.
However, MongoDB frequently doesn't really need caches that large. You can manually configure MongoDB's cache by editing the cacheSizeGB
setting in MongoDB's configuration file, mongod.conf. See the sections below for information about how to do so.
The cache size that MongoDB requires can be calculated according to the following formula:
cacheSizeGB: ((5 * P)/1000 + (.5 * EPD * ND)/1000 + (NF * 90/1024) )/1000
where
Linux Machines:
The default location for the configuration file is at /etc/mongod.conf
. The cacheSizeDB setting is located in the storage section of the file:
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
wiredTiger:
engineConfig:
cacheSizeGB: 9
Windows Machines:
The default location for the configuration file is at C:\Program Files\RealNetworks\SAFR\mongo\mongod.conf
. The cacheSizeDB setting is located in the storage section of the file:
storage:
dbPath: C:\ProgramData\RealNetworks\SAFR\mongo\data
journal:
enabled: true
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 9