That can be get using collStats.
My question is what is modify key and value bytes affected and all the related key and values bytes metrics, is that the kb/s that is used by the cursor ?
Also what is a cursor there ?
I don’t really get it does this represent the speed at which this collection is reading/writing to the disk ?
Thanks !
I believe those are the output of db.collection.stats().wiredTiger.cursor. There’s a documentation page regarding this section:
wiredTiger only appears when using the WiredTiger storage engine.
This document contains data reported directly by the WiredTiger engine and other data for internal diagnostic use.
Basically those are internal WiredTiger metrics, collected for Full Time Diagnostic Data Capture to assist with deep troubleshooting, and typically do not have the equivalent user-tunable settings in MongoDB. Note that in that section, those are for WiredTiger cursor, which is not the same as the accessible MongoDB cursor. In that way, metrics under the wiredTiger section can and have changed between MongoDB versions with little to no warning (since they’re not user-serviceable anyway).
Having said that, are you trying to troubleshoot a specific issue with your MongoDB deployment, or is this a curiosity question?
Thanks for the detailed answer.
My question is both out of curiosity and to solve a specific problem, I’m trying through the metrics I can gather with collStats (or any other if I can know to which collection it’s related) to know which of my collection is the most used in a specific time window.
mongotop provides a method to track the amount of time a MongoDB instance mongod spends reading and writing data. mongotop provides statistics on a per-collection level. By default, mongotop returns values every second.
I would recommend you to also check out mongostat which gives a server-wide statistics.