Mongostat used Vs dirty

I think MongoStat is a powerful debugging tool, that can help in production.

In the course video, when they are explaining MongoStat they say when dirty is quite larger than used, they conclude that working set is quite larger than RAM. How can we make that inference?

His actual statement : Dirty is less than Used , it means that we don’t have enough space to accommodate all the data set that we need. This is confusing. He says that when dirty and used are very near to each other, it means queries are faster. This is also confusing. Why should it necessarily be?

Hi :wave: @Vineel_Yalamarthi,

Apologies for the late response!!

“Dirty” is referring to data that has been modified in the WiredTiger cache but not yet written to the data files via a checkpoint.

Or In other words, it refers to data in the cache that has been modified and is different from the data stored on disk.

So, when you have a large number of this, it generally means the server cannot write them out to disk fast enough, so more work will pile up on top of them, and queries become slower.

However, when “Dirty” data is less in numbers, then queries are faster.

As for “Used”, that’s the percentage of the WiredTiger cache that is currently used. It goes up when WiredTiger pages are in data from disk, and goes down when pages are evicted i.e., expelled.

I hope this answers your question!


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.