Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[9.0] Make counting of IO completion work items more precise on Windows#112794

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kouvel merged 3 commits intodotnet:release/9.0-stagingfromkouvel:PreciseIoWiCounting9
Mar 7, 2025
Merged

[9.0] Make counting of IO completion work items more precise on Windows#112794

kouvel merged 3 commits intodotnet:release/9.0-stagingfromkouvel:PreciseIoWiCounting9
Mar 7, 2025

Conversation

@kouvel
Copy link
Contributor

Customer Impact

While upgrading a service from .NET 6 to 8, a 1p customer noticed that on Windows, the "Thread Pool Completed Work Item Count" counter values roughly doubled for the service. This is due to .NET 8 also counting queue-processing work items that were introduced in .NET 7. So, for each IO completion callback run to completion, the completed work item count may change by 1-3 or more depending on the situation. Especially in services that take small amounts of periodic traffic, the completed work item count can appear to double or triple per IO completion callback run to completion. The metric is monitored closely by the customer to monitor service health, and they would like to be able to use a more representative count that reflects actual user work items that are completed, for that purpose.

Regression?

Yes, in .NET 7 on Windows

Testing

Validated in a small test case that for IO completion handling, the count reflects the actual number of IO completion callbacks run to completion.

Risk

Low, the count after the change is similar to what it used to be in .NET 6

eduardo-vpand others added3 commitsFebruary 21, 2025 09:57
…Pool.CompletedWorkItemCount (#106854)* Stop counting work items from ThreadPoolTypedWorkItemQueue as completed work items* Fix CompletedWorkItemCount* Update src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.csCo-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>* Run CompletedWorkItemCountTest on Windows only---------Co-authored-by: Eduardo Manuel Velarde Polar <evelardepola@microsoft.com>Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
- Follow-up to#106854. Issue:#104284.- Before the change, the modified test case often yields 5 or 6 completed work items, due to queue-processing work items that happen to not process any user work items. After the change, it always yields 4.- Looks like it doesn't hurt to have more-precise counting, and there was a request to backport a fix to .NET 8, where it's more necessary to fix the issue
@kouvelkouvel added this to the9.0.x milestoneFeb 21, 2025
@kouvelkouvel self-assigned thisFeb 21, 2025
CopilotAI review requested due to automatic review settingsFebruary 21, 2025 18:59
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area:@mangod9
See info inarea-owners.md if you want to be subscribed.

Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.cs:1467

  • The test case ThreadPoolCompletedWorkItemCountTest should include scenarios where the counter is decremented to ensure the Decrement method is tested.
[PlatformSpecific(TestPlatforms.Windows)]

Copy link
Member

@jeffschwMSFTjeffschwMSFT left a comment

Choose a reason for hiding this comment

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

lgtm. we will take for consideration in 9.0.x

@jeffschwMSFTjeffschwMSFT added the Servicing-considerIssue for next servicing release review labelFeb 28, 2025
@kouvelkouvel closed thisFeb 28, 2025
@kouvelkouvel reopened thisFeb 28, 2025
@kouvelkouvel closed thisMar 1, 2025
@kouvelkouvel reopened thisMar 1, 2025
@rbhandarbhanda modified the milestones:9.0.x,9.0.4Mar 4, 2025
@rbhandarbhanda added Servicing-approvedApproved for servicing release and removed Servicing-considerIssue for next servicing release review labelsMar 4, 2025
@kouvelkouvel merged commita0eb8bf intodotnet:release/9.0-stagingMar 7, 2025
154 of 159 checks passed
@kouvelkouvel deleted the PreciseIoWiCounting9 branchMarch 7, 2025 19:13
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 7, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

Copilot code reviewCopilotCopilot left review comments

@jeffschwMSFTjeffschwMSFTjeffschwMSFT approved these changes

@eduardo-vpeduardo-vpeduardo-vp approved these changes

Assignees

@kouvelkouvel

Labels

area-System.ThreadingServicing-approvedApproved for servicing release

Projects

None yet

Milestone

9.0.4

Development

Successfully merging this pull request may close these issues.

4 participants

@kouvel@jeffschwMSFT@eduardo-vp@rbhanda

[8]ページ先頭

©2009-2025 Movatter.jp