-
Notifications
You must be signed in to change notification settings - Fork 110
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
memory advisor plugins #143
Conversation
5d7328d
to
043e2b5
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #143 +/- ##
==========================================
+ Coverage 50.48% 50.65% +0.16%
==========================================
Files 393 399 +6
Lines 37728 37993 +265
==========================================
+ Hits 19048 19245 +197
- Misses 16538 16600 +62
- Partials 2142 2148 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
21a2394
to
82e34ae
Compare
82e34ae
to
8759ced
Compare
@@ -30,6 +30,7 @@ import ( | |||
"github.com/kubewharf/katalyst-core/pkg/client" |
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 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.
These modifications do not involve functional changes, but only extract common public 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.
you should confirm this with @zzzzhhb
pkg/consts/metric.go
Outdated
@@ -231,3 +231,29 @@ const ( | |||
MetricsMemFilePerNumaCgroup = "mem.file.numa.cgroup" | |||
MetricsMemAnonPerNumaCgroup = "mem.anon.numa.cgroup" | |||
) | |||
|
|||
const ( |
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 defines metric rather than metrics (to emit); actually, we should the metrics in wherever requires them, and no need to define them in a general place
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.
They are defined here because they are referenced by eviction and memory advisor.
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.
they should not be defined here, the reason is as above
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.
generally, we don't encourage different components to share the same metric names
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.
maybe we should use different name for these two "metrics", it‘s really easy to get confused. For example:
runtime metric: the information about running containers, pods and system;
metric: the data we used to monitor katalyst itself.
for this certain case, I agree with @waynepeking348 . Maybe someday we will deploy advisor and eviction manager seperately and they might be maintained by different people. If they use same metrics name, it will be another confusing thing because these metrics don't only reflect the status about one component.
ab9810a
to
7d74336
Compare
88754df
to
7efa5c3
Compare
@@ -164,7 +165,7 @@ func (r *RssOveruseEvictionPlugin) GetEvictPods(_ context.Context, request *plug | |||
continue | |||
} | |||
|
|||
podRss, found := r.evictionHelper.getPodMetric(pod, consts.MetricMemRssContainer, nonExistNumaID) |
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 seems like evictionHelper is useless in this plugin, maybe we can delete it.
Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
7efa5c3
to
73a603b
Compare
* feat(sysadvisor): introduce memadvisor plugin cache_reaper Signed-off-by: linzhecheng <linzhecheng@bytedance.com> * feat(sysadvisor): introduce memory guard plugin Signed-off-by: linzhecheng <linzhecheng@bytedance.com> * feat(sysadvisor): introduce memset binder Signed-off-by: linzhecheng <linzhecheng@bytedance.com> --------- Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
What type of PR is this?
Features
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer: