Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB: Disk I/O % utilization on Data Partition has gone

Last time I get alert from MongoDB Atlas:

Disk I/O % utilization on Data Partition has gone above 70 on nvme2n1 

But I have no any ideas how can I localize / query / index / part of code / problematic collection.

In what way can I perform any analyze to find out problem root-cause?

like image 737
Max Vinogradov Avatar asked Jul 19 '19 21:07

Max Vinogradov


People also ask

What is disk IO utilization?

Disk I/O % Utilization alerts indicate that percentage of time during which requests are being issued reaches a specified threshold. This threshold is specified when the alert is created.

Does MongoDB write to disk?

To provide durability in the event of a crash, MongoDB uses write ahead logging to an on-disk journal. MongoDB writes the in-memory changes first to the on-disk journal files.

What is MongoDB ATLA?

MongoDB Atlas is a multi-cloud database service by the same people that build MongoDB. Atlas simplifies deploying and managing your databases while offering the versatility you need to build resilient and performant global applications on the cloud providers of your choice.

How much storage does MongoDB give?

Starting in MongoDB 3.4, the default WiredTiger internal cache size is the larger of either: 50% of (RAM - 1 GB), or. 256 MB.


1 Answers

Not answer, but just seen that many people faced with similar problem. In My case root cause was: we had collection with huge documents that contain array of data (in fact - list of coordinates with some metadata), and update it as many times, as coordinates we have (when adding new coordinates). + some additional operations.

As I know MongoDB cannot fetch just part of document, it fetch full document, and when we fetch many different and big documents, they are not fit into MongoDB in-memory cache, and each time access into hard disc, that lead to this issue. So, we just split up this document on several, and this fixed issue. While we need frequent access to update/add this data, we keep it into different documents, and finally, after process done, we gather back all this documents into one big document, for "history check" purpose.

like image 105
Max Vinogradov Avatar answered Sep 27 '22 22:09

Max Vinogradov