Mongo Memory Test
MongoDB maps data files to memory for managing and interacting with all data. Memory mapping assigns files to a block of virtual memory with a direct byte-for-byte correlation. MongoDB memory maps data files to memory as it accesses documents. Unaccessed data is not mapped to memory. This provides MongoDB with an extremely fast and simple method for accessing and manipulating data.
This implies that if MongoDB is not sized with adequate virtual memory, then data accesses are bound to slow down, thus adversely impacting user experience with the server. To avoid this, administrators should periodically run the Mongo Memory test. This test monitors how the target MongoDB server utilizes the virtual memory, proactively detects potential memory contentions, and promptly alerts administrators to it, so that they can initiate measures to avert the contention and the consequent slow down.
Target of the test : A MongoDB server
Agent deploying the test : An internal/remote agent
Outputs of the test : One set of results for the Mongo database server being monitored.
Parameter | Description |
Test period |
How often should the test be executed. |
Host |
The host for which the test is to be configured. |
Port |
The port number at which the specified host listens |
Database Name |
The test connects to a specific Mongo database to run API commands and pull metrics of interest. Specify the name of this database here. The default value of this parameter is admin. |
Username and Password |
The eG agent has to be configured with the credentials of a user who has the required privileges to monitor the target MongoDB instance, if the MongoDB instance is access control enabled. To know how to create such a user, refer to How to monitor access control enabled MongoDB database?. If the target MongoDB instance is not access control enabled, then, specify none against the Username and Password parameters. |
Confirm Password |
Confirm the password by retyping it here. |
Authentication Mechanism |
Typically, the MongoDB supports multiple authentication mechanisms that users can use to verify their identity. In environments where multiple authentication mechanisms are used, this test enables the users to select the authentication mechanism of their interest using this list box. By default, this is set to None. However, you can modify this settings as per the requirement. |
SSL |
By default, the SSL flag is set to No, indicating that the target MongoDB server is not SSL-enabled by default. To enable the test to connect to an SSL-enabled MongoDB server, set the SSL flag to Yes. |
CA File |
A certificate authority (CA) file contains root and intermediate certificates that are electronically signed to affirm that a public key belongs to the owner named in the certificate. If you are looking to monitor the certificates contained within a CA file, then provide the full path to this file in the CA File text box. For example, the location of this file may be: C:\cert\rootCA.pem. If you do not want to monitor the certificates in a CA file, set this parameter to none. |
Certificate Key File |
A Certificate Key File specifies the path on the server where your private key is stored. If you are looking to monitor the Certificate Key File, then provide the full path to this file in the Certificate Key File text box. For example, the location of this file may be: C:\cert\mongodb.pem. If you do not want to monitor the certificates in a CA file, set this parameter to none. |
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Total memory |
If the MMAPv1 storage engine is in use, then this indicates the amount of virtual memory mapped by the database. Because MongoDB uses memory-mapped files, this value is likely to be roughly equivalent to the total size of your database or databases. This value does not include memory allocated to journal. If the WiredTiger storage engine is in use, then the value of this measure displays the quantity of virtual memory provided to the mongod process. This value includes memory allocated to the journal. |
GB |
|
Available memory |
Indicates the amount of memory unused. |
GB |
Note that this measure will be reported only if the target server uses the MMAPv1 storage engine. The value of this measure is the difference between the value of the Total memory and Used memory measures. |
Used memory |
Indicates the amount of RAM currently used by the target server. |
GB |
During normal use, this value tends to grow. In dedicated database servers, this number tends to approach the total amount of system memory. |
Memory usage |
Indicates the percentage of memory used. |
Percent |
This value is computed using the following formula: (Used memory / Total memory) * 100 A value close to 100% indicates that almost all the memory is been utilized. No free memory or very little free memory will be available for database operations in this case, causing database performance to severely deteriorate. You may want to increase the memory allocation to the database instance to pre-empt this. |
Allocated memory with journal |
Indicates the amount of mapped memory, including the memory used for journaling. |
GB |
Note that this measure will be reported only if the target server uses the MMAPv1 storage engine and journaling is enabled. The value of this measure will always be twice the value of the Total memory measure. |
Heap memory used |
Indicates the amount of Java heap memory used by the MongoDB server being monitored. |
GB |
A low value is desired for this measure. Note that this measure will be reported only if the target MongoDB server runs on Unix/Linux. |
Page faults |
Indicates the number of page faults generated on the target server. |
Number |
Page faults refer to operations that require the database server to access data which isn’t available in active memory. The page faults counter may increase dramatically during moments of poor performance and may correlate with limited memory environments and larger data sets. Limited and sporadic page faults do not necessarily indicate an issue. |
Free percentage |
Indicates the percentage of free memory or memory available for use. |
Percent |
|