Skip to content

Add dotnet-trace to Debug ThreadPool Starvation#46251

Merged
gewarren merged 11 commits into
dotnet:mainfrom
verdie-g:tp-starv-dotnet-trace
May 29, 2025
Merged

Add dotnet-trace to Debug ThreadPool Starvation#46251
gewarren merged 11 commits into
dotnet:mainfrom
verdie-g:tp-starv-dotnet-trace

Conversation

@verdie-g

@verdie-g verdie-g commented May 18, 2025

Copy link
Copy Markdown
Contributor

Summary

In .NET 9, a new event was added (dotnet/runtime#94737) to help diagnose thread pool starvation. It is documented in dotnet-trace #40852.

In this PR, I'm adding a section to Debug ThreadPool Starvation to show how to collect this event, and analyze it using both PerfView and a cross-platform tool that I made in Blazor.

cc @kouvel @noahfalk who helped implementing this event


Internal previews

📄 File 🔗 Preview link
docs/core/diagnostics/debug-threadpool-starvation.md Debug ThreadPool starvation

@verdie-g verdie-g requested review from a team and tommcdon as code owners May 18, 2025 21:22
@dotnetrepoman dotnetrepoman Bot added this to the May 2025 milestone May 18, 2025
@dotnet-policy-service dotnet-policy-service Bot added dotnet-fundamentals/svc community-contribution Indicates PR is created by someone from the .NET community. labels May 18, 2025
@tommcdon tommcdon requested a review from noahfalk May 19, 2025 00:50

@noahfalk noahfalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting these docs together! I made some suggestions inline and probably the docs team (@gewarren or @CamSoper) will have suggestions as well.

Comment thread docs/core/diagnostics/debug-threadpool-starvation.md
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
@verdie-g verdie-g requested a review from noahfalk May 25, 2025 16:52
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
@verdie-g verdie-g requested a review from noahfalk May 27, 2025 21:45

@noahfalk noahfalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gewarren gewarren left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few more suggestions, then I'll check the preview.

Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
verdie-g and others added 2 commits May 27, 2025 19:58
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@verdie-g verdie-g requested a review from gewarren May 28, 2025 00:04
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
@gewarren

Copy link
Copy Markdown
Collaborator

Some of the screenshots are too tiny to read, but you can make them clickable/enlargeable.

image

Comment thread docs/core/diagnostics/debug-threadpool-starvation.md Outdated
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@verdie-g verdie-g requested a review from gewarren May 28, 2025 23:13
@gewarren gewarren merged commit 7b72268 into dotnet:main May 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants