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

Adding oom_score_adj as a container config param #232

Merged
merged 1 commit into from
Aug 31, 2015

Conversation

vishh
Copy link
Contributor

@vishh vishh commented Aug 28, 2015

No description provided.

@vishh
Copy link
Contributor Author

vishh commented Aug 28, 2015

cc @mrunalp

// OomScoreAdj specifies the adjustment to be made by the kernel when calculating oom scores
// for a process. Valid values are between the range [-1000, '1000'], where processes with
// higher scores are preferred for being killed.
// More information about kernel oom score calculation here: https://lwn.net/Articles/317814/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think could point to https://www.kernel.org/doc/Documentation/filesystems/proc.txt instead as oom_score_adj can't be found on the lwn page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. Updated!

@mrunalp
Copy link
Contributor

mrunalp commented Aug 28, 2015

Also, you might want to propose this to the spec to expose it in the config :)

@vishh
Copy link
Contributor Author

vishh commented Aug 29, 2015

Yes. The next PR will be add this to the Spec.

waitProcess(&pconfig, t)
outputOomScoreAdj := strings.TrimSpace(string(stdout.Bytes()))

// Check that the groups output has the groups that we specified
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment needs to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Good catch :)

@wking
Copy link
Contributor

wking commented Aug 29, 2015

On Fri, Aug 28, 2015 at 05:32:38PM -0700, Vish Kannan wrote:

Yes. The next PR will be add this to the Spec.

Is a spec entry how we want to handle this? See
opencontainers/runtime-spec#115, where I suggest using a pre-start hook if
possible. I just haven't gotten around to testing if #160 will make
it possible or not (although see also my uncertainty about the hook
environment 1).

Signed-off-by: Vishnu Kannan <vishnuk@google.com>
@vishh
Copy link
Contributor Author

vishh commented Aug 31, 2015

Ping @crosbymichael @LK4D4

@LK4D4
Copy link
Contributor

LK4D4 commented Aug 31, 2015

LGMT

@mrunalp
Copy link
Contributor

mrunalp commented Aug 31, 2015

LGTM

mrunalp pushed a commit that referenced this pull request Aug 31, 2015
Adding oom_score_adj as a container config param
@mrunalp mrunalp merged commit 5c92e5d into opencontainers:master Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants