[SERVER-13054] Statistics from write commands Created: 05/Mar/14 Updated: 10/Dec/14 Resolved: 07/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Alexander Komyagin | Assignee: | Eric Milkie |
| Resolution: | Duplicate | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
With the new write commands API, logged operations do not carry a lot of useful statistics at all:
In order for these log messages to be useful (comparable to 2.4), we need to consider adding at least the following:
|
| Comments |
| Comment by Eric Milkie [ 07/Mar/14 ] | |||||||
|
Please file a new ticket to discuss further stats changes. For the work being done to profile individual batch inserts, follow | |||||||
| Comment by Eric Milkie [ 07/Mar/14 ] | |||||||
|
I forgot that numYield has been around for a while so we can't change it now since it's in everyone's profile collections. | |||||||
| Comment by Eliot Horowitz (Inactive) [ 07/Mar/14 ] | |||||||
|
Can't change. | |||||||
| Comment by Eric Milkie [ 07/Mar/14 ] | |||||||
|
I will fix the "numYield"; that is a typo. | |||||||
| Comment by Thomas Rueckstiess [ 07/Mar/14 ] | |||||||
|
I found a couple more issues with the formatting. Camel casing of n-counters in log file
The "nMatched", "nModified" are in camel case, but nscanned, nreturned, ninserted, ndeleted, ntoreturn ... are all lowercase. Should this be made consistent? Camel casing of n-counters in system.profileSame applies to profiling output:
Whatever we decide for log files should be consistent with profiling output. numYield inconsistent between log and profiler"numYield" in profiling, but "numYields" (with s) in log file. Can we make that consistent too? If all this should be a separate ticket, let me know. | |||||||
| Comment by Eric Milkie [ 06/Mar/14 ] | |||||||
|
Also, for inserts, this will be a bit more complicated, as each insert in a batch will be profiled but the write lock will be held throughout the entire batch, unlike updates or deletes. So the total write lock hold time and the yield count will need to be added to the profile of the entire insert batch command. | |||||||
| Comment by Eric Milkie [ 06/Mar/14 ] | |||||||
|
For updates and deletes, I think you still get everything that was present in 2.4:
Server log:
Note that each individual write can be shown as well as the write command itself (this will not contain very much useful data). For inserts, the code currently doesn't show the individual inserts, but it will as soon as |