-
Notifications
You must be signed in to change notification settings - Fork 108
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): numa pressure support victim minimum usage thr… #296
enhancement(eviction): numa pressure support victim minimum usage thr… #296
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #296 +/- ##
==========================================
+ Coverage 53.26% 53.33% +0.06%
==========================================
Files 397 397
Lines 43432 43448 +16
==========================================
+ Hits 23135 23172 +37
+ Misses 17758 17726 -32
- Partials 2539 2550 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
go.mod
Outdated
@@ -141,6 +141,7 @@ require ( | |||
) | |||
|
|||
replace ( | |||
github.com/kubewharf/katalyst-api => github.com/zzzzhhb/katalyst-api v0.0.0-20230926073642-3971260393a0 |
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.
pls fix this import
return GetNodeMetricWithTime(metricsFetcher, emitter, consts.MetricMemKswapdstealSystem) | ||
} | ||
|
||
func GetNodeMetricWithTime(metricsFetcher metric.MetricsFetcher, emitter metrics.MetricEmitter, metricName string) (metricutil.MetricData, 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.
GetNodeMetricWithTime
is kind of weird, why node needs a function like this while numa not
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 depends if there is a caller who needs timestamp of metric. For now, only node metrics faces this kind of need, so I just provide this kind of function for node metrics. I'll provide one for numa metrics to make them looks more consistent.
return metricWithTime.Value, err | ||
} | ||
|
||
func GetNumaMetric(metricsFetcher metric.MetricsFetcher, emitter metrics.MetricEmitter, metricName string, numaID int) (float64, 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.
some functions should be exported outside while others not, we should apparently separate them, either by a different file or lowercased functions
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.
which one should not be exported outside?
733e6a7
to
25fc574
Compare
25fc574
to
de0fa2c
Compare
…eshold
What type of PR is this?
Enhancements
What this PR does / why we need it:
This PR support NumaVictimMinimumUsageThreshold configuration. DefaultNumaVictimMinimumUsageThreshold is the victim's minimum memory usage on a NUMA node. If a pod uses less memory on a NUMA node than this threshold, it won't be evicted by this NUMA's memory pressure.
Which issue(s) this PR fixes:
Special notes for your reviewer: