-
Notifications
You must be signed in to change notification settings - Fork 109
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
enhancement(eviction): load eviction support dynamic threshold #129
enhancement(eviction): load eviction support dynamic threshold #129
Conversation
e0656fd
to
0c9f496
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
+ Coverage 51.04% 51.32% +0.27%
==========================================
Files 419 421 +2
Lines 40577 40641 +64
==========================================
+ Hits 20713 20859 +146
+ Misses 17604 17504 -100
- Partials 2260 2278 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
pkg/agent/qrm-plugins/cpu/dynamicpolicy/cpueviction/strategy/pressure_load.go
Outdated
Show resolved
Hide resolved
c7fa022
to
3513f6b
Compare
@@ -785,3 +800,803 @@ func TestGetTopEvictionPods(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func TestCPUPressureLoadEviction_collectMetrics(t *testing.T) { | |||
pod1UID := "pod1" |
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.
add t.Parallel() for all tests
pkg/agent/qrm-plugins/util/util.go
Outdated
@@ -313,6 +315,18 @@ func GetContainerAsyncWorkName(podUID, containerName, topic string) string { | |||
return strings.Join([]string{podUID, containerName, topic}, "/") | |||
} | |||
|
|||
func GetSystemReservedCores(conf *config.Configuration, machineInfo *machine.KatalystMachineInfo, allCPUs machine.CPUSet) (machine.CPUSet, error) { |
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.
what's the difference with GetCoreNumsReservedForReclaim
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.
There are two main differences:
GetSystemReservedCores
returns certain CPU IDs butGetCoreNumsReservedForReclaim
only returns the amount of cores.GetSystemReservedCores
is related to the cores reserved for system_cores qos butGetCoreNumsReservedForReclaim
is about the cores reserved for reclaimed_cores qos.
I'll rename it to GetCoresReservedForSystem
to make it more consistent.
@@ -391,6 +391,19 @@ func (ns *NUMANodeState) GetFilteredDefaultCPUSet(excludeEntry, excludeWholeNUMA | |||
return res | |||
} | |||
|
|||
// Exist returns true if the stated predicate holds true for some pods of this numa else it returns false. | |||
func (ns *NUMANodeState) Exist(f func(ai *AllocationInfo) bool) bool { |
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.
it's too wield to naming this function as Exist
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.
actually it's a common function name in Java or Scala,😂 never mind, I'll rename it.
9bb8327
to
77758be
Compare
77758be
to
3f11832
Compare
3f11832
to
91f1891
Compare
…harf#129) * enhancement(eviction): evict by share pool status * enhancement(eviction): load eviction plugin use readonly state * chore(eviction): make test parallel * chore(eviction): rename some function and add some metric * enhancement(eviction): extract GetPodPoolMapFunc interface * enhancement(eviction): ignore isolation pool * refine implementation for load pressure --------- Co-authored-by: shaowei.wayne <shaowei.wayne@bytedance.com>
What type of PR is this?
Enhancements
What this PR does / why we need it:
this pr support using dynamic threshold in load eviction plugin.
Which issue(s) this PR fixes:
Special notes for your reviewer: