[SERVER-25631] IndexStats needs to maintain all historical data. Not only from restart of Mongod process Created: 16/Aug/16  Updated: 25/Aug/16  Resolved: 25/Aug/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Diagnostics, Index Maintenance, Logging
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mark Jones Assignee: David Storch
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:

 Description   

As a DBA I would like to really troubleshoot performance. A great source of information would normally be found in Index usage. However, from what I can work out (and the documentation states), a restart of the Mongod process resets this information.
I would like to know if this can be written out somewhere instead. This is vital information that is useless if it gets reset on restart.
For example:
I deploy new code and my performance falls off a cliff.
It could be that an index is causing the problem because of too many inserts being added and maybe disabling this index during load is the solution. However, the production server crashed and I can no longer see the stats of usage.

It would be very helpful to add this to rs.status type view so that I can ses the index across all replica's



 Comments   
Comment by David Storch [ 25/Aug/16 ]

Closing as "Won't Fix". Along the lines of what ramon.fernandez described above, our preferred direction is to create tooling that can poll the index stats data in order to construct a timeseries view of index usage. We do not currently plan to build support for this directly into the server.

Comment by Mark Jones [ 17/Aug/16 ]

Thanks Roman.
In addition to my use case, there is also a real problem with how this view could be viewed.
Lets say I use an index once a month at month end, but the mongod's restarted on on my replica set each month for upgrades or maintenance etc..
If I follow our released training, 1 use for this view would be to drop un-used indexes. If this data was historical then this would show that although the index is not used alot, it certainly is needed. Maybe aggregating on date used would be useful too?

regards

Mark

Comment by Ramon Fernandez Marina [ 16/Aug/16 ]

Thanks mark.jones, this is now on the Query Team for evaluation.

I guess the workaround is to use a while loop in a shell to capture metrics like we used to do for db.serverStatus() data collection (see an example here) before we had FTDC. Not ideal, but in critical enough cases it can be a suitable workaround.

Generated at Thu Feb 08 04:09:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.