-
Notifications
You must be signed in to change notification settings - Fork 120
e2e: Add housekeeping IRQ load balancing tests #1456
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
base: main
Are you sure you want to change the base?
Conversation
|
/retest |
1 similar comment
|
/retest |
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
ff2d905 to
bdafc69
Compare
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
bdafc69 to
f663ea0
Compare
| Expect(smtActive).To(Equal("0"), "SMT should be disabled (smt/active should be 0)") | ||
|
|
||
| cpuRequest := 2 | ||
| if cpuRequest > newIsolatedCPUs.Size() { |
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.
This will most likely fail to schedule if you have exactly 2 isolated cpus. There will be some burstable pods as well. You need to check the currently available resources or "assume" some burstable and compare with newIsolatedCPUs - 1.
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.
+1
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.
you can add a similar helper as there is in NROP:
https://github.com/openshift-kni/numaresources-operator/blob/main/internal/baseload/baseload.go#L37
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.
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
| Expect(smtActive).To(Equal("0"), "SMT should be disabled (smt/active should be 0)") | ||
|
|
||
| cpuRequest := 2 | ||
| if cpuRequest > newIsolatedCPUs.Size() { |
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.
+1
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
f663ea0 to
0ce6e8c
Compare
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/1_performance/irqbalance.go
Outdated
Show resolved
Hide resolved
| By("Restoring original CPU configuration") | ||
| currentProfile, err = profiles.GetByNodeLabels(testutils.NodeSelectorLabels) | ||
| Expect(err).ToNot(HaveOccurred()) | ||
| currentReserved := string(*currentProfile.Spec.CPU.Reserved) |
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.
why updating PP twice?
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.
While restoring, we update Profile twice to handle the CPU topology transition safely.
We cannot update PP in a single phase because removing nosmt changes the online CPU
topology only after reboot, while kubelet immediately validates reservedSystemCPUs/isolatedCPUs
against the current online CPU set during CPU Manager initialization. A single update would
apply cpusets that reference offline SMT siblings, causing kubelet config validation to fail.
See kubelet CPU manager validation:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/cpumanager/policy_static.go#L251-L270
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.
Interesting, I'd expect kubelet to reconcile gracefully
| // CPURequestedCores returns the total CPU requested in whole cores (rounded up) | ||
| func (l Load) CPURequestedCores() int { | ||
| millis := l.Resources.Cpu().MilliValue() | ||
| return int((millis + 999) / 1000) |
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.
perhaps use a roundup:
retCpu := *resource.NewQuantity(roundUp(cpu.Value(), 2), resource.DecimalSI)
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.
Thanks for the suggestion! I considered the roundUp approach used in NROP, but after our offline discussion, I believe the ceiling division approach is more appropriate for this use case.
As both have different use cases:
-
In NROP, roundUp to even numbers is used to calculate remaining resources for node padding, which needs to be SMT-aligned.
-
In this case, the baseload calculation is only used to verify that the node has sufficient capacity for the test pod. We need an accurate representation of the actual load, not an SMT-aligned value
f036f2c to
88dc045
Compare
|
/retest |
Added e2e tests for IRQ load balancing with housekeeping pods: - [86346] Verify housekeeping works correctly with single hyperthread allocation - [86348] Verify irqbalance does not overwrite on TuneD restart (housekeeping annotation) - [86347] Verify housekeeping selects single CPU when SMT is disabled Added baseload calculation functions for determining available pod capacity on nodes Signed-off-by: Sargun Narula <snarula@redhat.com>
88dc045 to
fb10b58
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SargunNarula, shajmakh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@SargunNarula: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Added e2e tests for IRQ load balancing with housekeeping pods:
(housekeeping annotation)