Friday , April 26 2024

How to improve database performance on MongoDB part3

 

You should read below articles before reading this article.

How to improve database performance on MongoDB part 1“,

How to improve database performance on MongoDB part 2

 

Ensure you have the right configuration

The default configurations are not optimal for MongoDB. Must be applied some changes.

NUMA:

Many modern multiprocessors have non-uniform memory access (NUMA) memory designs, where the performance of a process can depend on whether the memory range being accessed is attached to the local CPU or to another CPU.

Running MongoDB on a system with Non-Uniform Access Memory (NUMA) can cause a number of operational problems, including the slow performance for periods of time and high system process usage. DIABLE NUMA

How to know if Numa is enabled:

Or

Numa it’s enabled.

 

READAHEAD:

Readahead is a system call of the Linux kernel that loads a file’s contents into the page cache.

Readahead size should be set to 0 when using WiredTiger storage engine. A readahead value of 32  typically works well when using MMAPv1.

How to know the value of readahead:

How to change it and check

The report again

 

FileSystems types:

With the WiredTiger storage engine, use of XFS is strongly recommended to avoid performance issues.

How to review it:

 

NOATIME

Most file systems will maintain metadata for the last time a file was accessed. While this may be useful for some applications, in a database it means that the file system will issue a write every time the database accesses a page, which will negatively impact the performance and throughput of the system.

How to check it:

To be continued.

Loading

About Daniel Cruz

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories