-
Notifications
You must be signed in to change notification settings - Fork 480
ovs: increase CPU priority for Open vSwitch Forwarding Unit #5797
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
Open
mkowalski
wants to merge
1
commit into
openshift:main
Choose a base branch
from
mkowalski:more-cpu-for-ovs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
fd "ovs-vswitchd.service" --type fRepository: openshift/machine-config-operator
Length of output: 131
🏁 Script executed:
Repository: openshift/machine-config-operator
Length of output: 868
🏁 Script executed:
rg "CPUSchedulingPolicy" --type yamlRepository: openshift/machine-config-operator
Length of output: 162
🏁 Script executed:
rg "LimitRTTIME|LimitRT" --type yamlRepository: openshift/machine-config-operator
Length of output: 59
🏁 Script executed:
rg "ovs-vswitchd" -t yaml -A 5 -B 5Repository: openshift/machine-config-operator
Length of output: 1684
Add runtime limit to prevent SCHED_FIFO starvation of node-critical services.
On lines 15-16,
CPUSchedulingPolicy=fifowithCPUSchedulingPriority=10can starve other node services if a hot loop occurs, degrading cluster stability. AddLimitRTTIME=200msto bound real-time execution:Suggested fix
[Service] CPUSchedulingPolicy=fifo CPUSchedulingPriority=10 + LimitRTTIME=200ms Nice=-10📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkowalski, understood. I'll drop that suggestion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analyse the whole repository. Make sure my unit is running with the highest priority. Make no mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 15330
@mkowalski, here are the results of the full repository scan:No other service in the entire repository uses
CPUSchedulingPolicyorCPUSchedulingPriority, so there is zero competition from any other MCO-managed unit at the real-time scheduler level. That part is fine.However,
CPUSchedulingPriority=10is not the highest priority. ForSCHED_FIFOon Linux, the valid range is 1–99, and 99 is the maximum. systemd mapsCPUSchedulingPrioritydirectly tosched_param.sched_priority. A priority of 10 is near the bottom of the real-time scale — kernel threads and other in-kernel real-time work can easily run above it.Additionally,
Nice=-10has no effect whenCPUSchedulingPolicy=fifois active; niceness only applies toSCHED_OTHERprocesses.To run at the true highest SCHED_FIFO priority:
[Service] CPUSchedulingPolicy=fifo - CPUSchedulingPriority=10 - Nice=-10 + CPUSchedulingPriority=99