Repository navigation
Add initial spec for gcheap dump tool - #512
Conversation
| -o, --output | ||
| The path where collected dumps should be written. Defaults to '.\YYYYMMDD_HHMMSS.gcheapdump' where YYYYMMDD is Year/Month/Day | ||
| and HHMMSS is Hour/Minute/Second. Otherwise, it is the full path and file name of the dump. | ||
|
|
There was a problem hiding this comment.
GC dumps can be super large. Should we try to provide some kind of warning that the resulting file could be huge and that it may cause some heavy I/Os for a long time? Also it'd be nice if we can specify the upper bound for the heap dump. AFAIK PerfView lets you do that on a heap dump.
There was a problem hiding this comment.
I don't believe this actually dumps the contents of the heap, but rather all the metadata. Things like what types exist, where are they rooted, and how many of them are there. These dumps are computed based off a quick burst of GC events. It's possible we need a better name than gcdump... Would something like gcsnapshot be more indicative of what this is? @noahfalk, thoughts?
There was a problem hiding this comment.
GC dumps can be super large.
It is possible, but my understanding is that by default they aren't because the algorithm that PerfView uses (and we are re-using) samples and filters the objects on the heap if the total size exceeds some threshold.
Should we try to provide some kind of warning that the resulting file could be huge and that it may cause some heavy I/Os for a long time?
The sampling probably mitigates this concern substantially, but assuming that wasn't the case my standard moves are:
a) Is there a similar experience we can copy as a reference?
b) Will it be that hard to change later if we pick wrong or have particularly bad consequences? If not just take guess at whatever seems best with the info at hand.
c) If there is still no clear winner, pick whatever is cheapest. Often this is 'do nothing'.
In this case those evaluate to:
a) dotnet-dump for heaps dumps is similar and we did not warn. +1 for leaving it as-is.
b) It won't be hard to change if we are wrong and running an unexpectedly long/slow/IO intensive command seems unlikely to be a big issue, the customer can kill the process. There are some pros and cons of each option, lets say its a wash here.
c) Doing nothing is cheaper. +1 for leaving it as-is.
It's possible we need a better name than gcdump... Would something like gcsnapshot be more indicative of what this is?
Possibly? Neither one seems clearer than the other to me, but I might be biased by insider knowledge : ) There is also 10ish years of historical precedent for calling it a gcdump on .Net Framework and that is what makes me think we shouldn't change it unless we have a fairly strong reason to do so. My guess is that less curious users of the tool won't know or care exactly what is in the gcdump, they will just be following a workflow shown to them by a web page or their coworker and they will be happy if they can resolve their memory issue. For more curious developers that want to understand the differences in these formats, blogs or docs could fill that role.
One of the primary use cases for gcdumps is analyzing the delta between two of them. The timestamp being in the default output name is to make it easy to quickly identify order of capture. |
|
Any opposition to merging this? The PR for the tool itself is essentially done (#581). |
This is an initial specification for a commandline tool capable of collecting GC Heap Dumps of dotnet processes on Linux, Mac, and Windows.
CC - @caslan