Restore Server CPU affinity - #6226
Open
binaryfire wants to merge 2 commits into
Open
binaryfire wants to merge 2 commits into
binaryfire wants to merge 2 commits into
Conversation
Apply the existing Server CPU affinity settings at the current event-worker and reactor-thread startup boundaries. Keep thread-mode workers on the pthread path so process affinity is never applied to the entire threaded server process.
Verify that cpu_affinity_ignore selects the expected CPU for base-mode event workers and thread-mode workers. The regressions fail against the unchanged 6.1 branch because both workers retain the inherited affinity mask.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 6.1 #6226 +/- ##
==========================================
- Coverage 86.24% 86.22% -0.03%
==========================================
Files 110 110
Lines 16790 16806 +16
Branches 2980 2986 +6
==========================================
+ Hits 14481 14491 +10
- Misses 2309 2315 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
open_cpu_affinityandcpu_affinity_ignoreare still accepted and documented, but #5320 removed the code that applied them, so enabling them has had no effect since 6.0.This restores the previous binding at the current startup points. Process-mode and base-mode event workers use the process affinity call, and reactor threads use
pthread_setaffinity_np(). Thread-mode workers run in the reactor thread entry, so they are bound there instead of through the process call. Configurations that already enableopen_cpu_affinitywill bind workers and reactor threads again.The regressions start a base-mode worker and a thread-mode worker with
cpu_affinity_ignoreset to[0]and check that each is bound to CPU 1.