Site icon Database Tutorials

How To Improve Database Performance on MongoDB Part2

 

This article is the second part of the article named “How to improve database performance on MongoDB part 1

Ensure you have enough RAM.

As other Database Managers, MongoDB performs best when the portion of your data that clients access most often live in RAM. RAM size is the most important factor for hardware.

To calculate how much RAM you need, you must calculate your working set size or the portion of your data that clients use most often.

This depends on:

The easy way to check if you have RAM problems is running the command from mongo shell:

 

Server without stress:

Server with stress:

The extra_info.page_faults counter may increase dramatically during moments of poor performance and may correlate with limited memory environments and larger datasets. Limited and sporadic page faults do not necessarily indicate an issue. This counter needs to be monitored.

In your mongod log entry you see:

By the way, I have an insufficient amount of RAM.

For good manage of RAM, I recommend:

You may want to read the other article of this series “How To Improve Database Performance on MongoDB Part3

Exit mobile version