[SERVER-33156] Report lock statistics per collection in collstats Created: 07/Feb/18 Updated: 06/Dec/22 Resolved: 16/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Storage |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Bartley | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Storage Execution
|
||||||||
| Participants: | |||||||||
| Description |
Original SummaryExport/report per-collection/per-database lock statistics Original DescriptionGlobal statistics are provided in serverStatus, but it would be even more useful if these were per-collection and per-database, particularly coupled with |
| Comments |
| Comment by Ian Whalen (Inactive) [ 16/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Resolving this ticket as it has been in Waiting For User Input for 2 weeks. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geert Bosch [ 28/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi bartle, Rereading this ticket and in particular
or directly using the collStats aggregation stage:
In all cases the metrics are cumulative, so you can get statistics over a certain period by computing the difference between the results at the begin and end of the period. I believe this should address your use case, but please let us know if you need additional information. -Geert | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ian Whalen (Inactive) [ 23/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
geert.bosch to investigate complexity of implementation in next sprint. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kelsey Schubert [ 21/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi bartle, I've updated the ticket summary to better describe this improvement following discussion on this ticket and Kind regards, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Bartley [ 14/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've attached output from the "locks" section of serverStatus and the output for an entry for inprog. We also get lock stats in logs:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Bartley [ 14/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We have O(1000's) of collections and O(100's) of databases. so it's been ok for our purposes. I think it'd be fine to not include the expanded lock-stats in serverStatus by default (or cap the output somehow), but emit them in collStats and dbStats. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 14/Feb/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bartle, adding per-collection or per-database metrics in serverStatus has the potential to make the output very large, which can be undesirable and may have negative ramifications. Perhaps if they were not provided by default, but under a flag, that could be a reasonable addition. Do you have a sample output of these stats? Also, have you tested what happens when there are millions of databases/collections present (e.g.: the size of the output exceeds 16MB)? Thanks, |