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

Disable spin-waiting in some cases when CPU quota is limited by default #112869

Open
kouvel opened this issue Feb 24, 2025 · 1 comment
Open

Disable spin-waiting in some cases when CPU quota is limited by default #112869

kouvel opened this issue Feb 24, 2025 · 1 comment
Assignees
Milestone

Comments

@kouvel
Copy link
Member

kouvel commented Feb 24, 2025

  • In environments where the CPU quota is limited, spin-waiting will eat some of the CPU quota
  • It's unpredictable whether eating up CPU quota from spin-waiting would leave less CPU time for more useful work later. Even an adaptive spin-waiting scheme that is aware of the scenario would have difficulty making a useful compromise due to the unpredictability in these scenarios.
  • Environments where CPU quota is limited often tend to be more efficiency-oriented than throughput-oriented, in the sense useful work done per CPU time used is more valued than the throughput
  • A better default for those environments would be to disable spin-waiting in at least cases that typically contribute noticeably to spin-waiting CPU time, such as the thread pool and locks
  • The change should be configurable. In environments where the CPU quota is typically not reached (even with spin-waiting), and where throughput is more valued than efficiency, spin-waiting may still be beneficial.
@kouvel kouvel added this to the 10.0.0 milestone Feb 24, 2025
@kouvel kouvel self-assigned this Feb 24, 2025
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant