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

koordlet: exclude LSE from share cpu pool #1404

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/koordlet/resmanager/cpu_burst.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,18 @@ func (b *CPUBurst) getNodeStateForBurst(sharePoolThresholdPercent int64,
sharePoolCPUCoresUsage := nodeCPUCoresUsage
for _, podMeta := range podsMeta {
podQOS := apiext.GetPodQoSClass(podMeta.Pod)
// exclude LSR pod cpu from cpu share pool
if podQOS == apiext.QoSLSR {
// exclude LSE/LSR pod cpu from cpu share pool
if podQOS == apiext.QoSLSE || podQOS == apiext.QoSLSR {
podRequest := util.GetPodRequest(podMeta.Pod)
sharePoolCPUCoresTotal -= float64(podRequest.Cpu().MilliValue()) / 1000
}

// exclude LSR and BE pod cpu usage from cpu share pool
// exclude LSE/LSR/BE pod cpu usage from cpu share pool
podMetric, exist := podMetricMap[string(podMeta.Pod.UID)]
if !exist {
continue
}
if podQOS == apiext.QoSLSR || podQOS == apiext.QoSBE {
if podQOS == apiext.QoSLSE || podQOS == apiext.QoSLSR || podQOS == apiext.QoSBE {
sharePoolCPUCoresUsage -= podMetric
}
} // end for podsMeta
Expand Down