Is there a way to see what is in the MongoDB cache and what is not?

Recently, I ran into a problem when reading ops per second from disk increased by 1000x (in frequent bursts) and reached our reserved IOPS limit in AWS, slowing everything down.

My initial thought was that in MongoDB there was something to write data strongly, choosing the data that is expected to be cached back to disk.

Is there a way to finally find out what is in the cache, and not enable or disable various functions that can cause this problem?

Placing it in a way that is more specific to my problem is the best way to find out why the piece of data that should be in memory does not suddenly occur.

EDIT: The details of my installation are a replica set with mongodb 3.0.6 with WiredTiger as the storage engine.

+4
source share
1 answer

You can analyze these interesting tools ootb:

  • mongotop optional_secs: This command shows in which mongo collection process your time is spent. It also shows the time spent reading and writing.
    • Key Points: Unusually High Reading time usually means Do Not Use Index . Unusually High Write time may be due to the need to maintain the index on insertions.

  1. mongostat: (for example, iostat) Tells us IO statistics from mongo DB.
    • : idx_miss %. , () , .
+1

Source: https://habr.com/ru/post/1617102/


All Articles