Skip to content
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

[8.0] Make thread pool thread timeouts configurable #92986

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

kouvel
Copy link
Member

@kouvel kouvel commented Oct 4, 2023

  • Port of Make thread pool thread timeouts configurable #92985 to 8.0
  • Added two config options, one that configures the worker and wait thread timeouts, and another that enables keeping some number of worker threads alive after they are created
  • This enables services that take periodic traffic to keep some worker threads around for better latency, while allowing extra threads to time out as appropriate for the service

Customer Impact

These config capabilities were requested by a 1p customer for a scenario where a service takes work in waves and is experiencing noticeably high latency with thread pool worker and IOCP threads being torn down and recreated between waves. The config vars enable the service to keep some number of threads always alive, and to increase the timeout for any extra threads that are created.

Regression?

No

Testing

Verified the default behavior hasn't changed when not configured, and verified using events that the config values are working as expected.

Risk

Low

@kouvel kouvel added this to the 8.0.0 milestone Oct 4, 2023
@kouvel kouvel self-assigned this Oct 4, 2023
@ghost
Copy link

ghost commented Oct 4, 2023

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

Issue Details
  • Port of Make thread pool thread timeouts configurable #92985 to 8.0
  • Added two config options, one that configures the worker and wait thread timeouts, and another that enables keeping some number of worker threads alive after they are created
  • This enables services that take periodic traffic to keep some worker threads around for better latency, while allowing extra threads to time out as appropriate for the service

Customer Impact

These config capabilities were requested by a 1p customer for a scenario where a service takes work in waves and is experiencing noticeably high latency with thread pool worker and IOCP threads being torn down and recreated between waves. The config vars enable the service to keep some number of threads always alive, and to increase the timeout for any extra threads that are created.

Regression?

No

Testing

Verified the default behavior hasn't changed when not configured, and verified using events that the config values are working as expected.

Risk

Low

Author: kouvel
Assignees: kouvel
Labels:

area-System.Threading

Milestone: 8.0.0

@carlossanlop
Copy link
Member

@kouvel @mangod9 don't forget to send an email to Tactics requesting approval, and also please get an area owner to code review and sign off this backport.

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Oct 9, 2023
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approved. we will take for consideration in 8.0.x

- Added two config options, one that configures the worker and wait thread timeouts, and another that enables keeping some number of worker threads alive after they are created
- This enables services that take periodic traffic to keep some worker threads around for better latency, while allowing extra threads to time out as appropriate for the service
@kouvel
Copy link
Member Author

kouvel commented Oct 9, 2023

Rebased to fix out-of-date issue.

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 9, 2023
@carlossanlop carlossanlop merged commit 8511905 into dotnet:release/8.0 Oct 11, 2023
173 of 175 checks passed
@kouvel kouvel deleted the TpThreadTimeoutConfig8 branch October 11, 2023 22:32
@ghost ghost locked as resolved and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Threading Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants