-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add OomScoreAdj #16277
Add OomScoreAdj #16277
Conversation
427de1e
to
2bc25ae
Compare
91e1cc3
to
0a49ad8
Compare
@@ -71,6 +71,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe | |||
flStdin = cmd.Bool([]string{"i", "-interactive"}, false, "Keep STDIN open even if not attached") | |||
flTty = cmd.Bool([]string{"t", "-tty"}, false, "Allocate a pseudo-TTY") | |||
flOomKillDisable = cmd.Bool([]string{"-oom-kill-disable"}, false, "Disable OOM Killer") | |||
flOomScoreAdj = cmd.Int([]string{"-oom-score-adj"}, 0, "Tune container OOM score adjustment") |
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.
Should this description contain the accepted range (-1000, 1000)?
acc21cc
to
909e519
Compare
899b7af
to
dfeacbf
Compare
Design OK |
Ping @runcom for rebase before code review! |
dfeacbf
to
4ff44c7
Compare
@icecrime rebased |
@runcom looks like the |
@@ -482,6 +482,7 @@ __docker_subcommand() { | |||
"($help)--name=[Container name]:name: " | |||
"($help)--net=[Connect a container to a network]:network mode:(bridge none container host)" | |||
"($help)--oom-kill-disable[Disable OOM Killer]" | |||
"($help)--oom-score-adj[Tune OOM preferences for container (-1000 to 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.
Can you use the same text here as well?
@moxiegirl I see we're inconsistent with describing the options; |
@thaJeztah Yes, I noticed that. I think that is a good idea but the problem is beyond the scope of this PR. It is really something we should do in another PR. WDYT? |
@moxiegirl I think so far we used |
Ah, I see. Yes, you are right |
74109a7
to
4a87290
Compare
@moxiegirl @thaJeztah updated (I'll leave what's not consistent to a follow up PR as you agreed on) |
@runcom looks like I overlooked that changes to the man-pages are missing, can you add the flag to the man-pages for |
4a87290
to
1ba3ee5
Compare
@thaJeztah added |
Thanks! And thanks for being patient with us 👍 LGTM ping @moxiegirl for a final look |
libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to better tune oom killing preferences for container process. This patch simply integrates OomScoreAdj libcontainer's config option and adjust the cli with this new option. Signed-off-by: Antonio Murdaca <amurdaca@redhat.com> Signed-off-by: Antonio Murdaca <runcom@redhat.com>
1ba3ee5
to
d3af7f2
Compare
ping @moxiegirl O:) |
@runcom LGTM to you! :-D Thank you. @thaJeztah for the merge |
libcontainer v0.0.4 introduces setting
/proc/self/oom_score_adj
tobetter tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.
close #13116
TODOs:
Signed-off-by: Antonio Murdaca runcom@linux.com