-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update High CPU Tutorial #29112
Update High CPU Tutorial #29112
Conversation
Initial changes to clarify tutorial
Show how perfview opens from step one.
This reverts commit 33a3a73. Images not needed
Updated counters section to follow a natural flow, increased detail regarding reasoning behind trace options and opening perfview.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment for your consideration
|
||
When analyzing a slow request, you need a diagnostics tool that can provide insights into what the code is doing. The usual choice is a profiler, and there are different profiler options to choose from. | ||
When analyzing an app with high CPU usage, you need a diagnostics tool that can provide insights into what the code is doing. The usual choice is a profiler, and there are different profiler options to choose from. | ||
|
||
### [Linux](#tab/linux) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we explain why we suggest using the Linux perf tool and not dotnet-trace? I'm guessing the reason is something like: Although Dotnet-Trace is cross-platform but since Event Pipe "CPU" traces only measure elapsed time and not actual CPU time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same question. @josalem Why are we using the Linux perf tool and not dotnet-trace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet-trace
is great for CPU investigations to a certain point. The limitations of safe-point bias and managed-only callstacks means that it can't give exact information the same way a kernel-aware profiler like perf
can.
If your performance investigation stops at managed code, generally dotnet-trace
will be sufficient. If you are analyzing exact timing of your application and it involves native code, you may need something like perf
.
I think of it like two differently powered magnifying glasses. You can start with dotnet-trace
and then look at a higher resolution using perf
(or ETW
on Windows).
Initial changes to clarify tutorial
Summary
Update tutorial for clarity
Fixes dotnet/diagnostics/2901