Skip to content

Explicitly set --oom-score-adjust to -500#258

Closed
thaJeztah wants to merge 1 commit intodocker-library:masterfrom
thaJeztah:oom_score
Closed

Explicitly set --oom-score-adjust to -500#258
thaJeztah wants to merge 1 commit intodocker-library:masterfrom
thaJeztah:oom_score

Conversation

@thaJeztah
Copy link
Copy Markdown
Contributor

relates to moby/moby#41528

Currently, dockerd sets a "-500" oom-score-adjust for itself by default.

We're removing this default, and instead:

  • for dockerd running as systemd unit, set the oom-score through systemd
  • when manually running dockerd, require users to explicitly set a score

This patch is in preparation of those changes.

Currently, dockerd sets a "-500" oom-score-adjust for itself by default.

We're removing this default, and instead:

- for dockerd running as systemd unit, set the oom-score through systemd
- when manually running dockerd, require users to explicitly set a score

This patch is in preparation of those changes.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah changed the title Explicitly set --oom-score-adj to -500 Explicitly set --oom-score-adjust to -500 Oct 5, 2020
@tianon
Copy link
Copy Markdown
Member

tianon commented Oct 5, 2020

Hmm, given there are a number of cases where neither of these lines will be used (such as docker run ... docker:dind dockerd ...), I think it makes sense to document this as a recommended parameter in https://github.com/docker-library/docs/blob/master/docker/content.md instead (with a link to moby/moby#41528). Thoughts?

Edit: actually probably makes sense to link to docker/docker-ce-packaging#501 instead, since it gives the actual justification for why the change was made 😅

@thaJeztah
Copy link
Copy Markdown
Contributor Author

Good one, yeah, I was wondering what would be best; keep a default, or don't set a default at all.

Given that it's running inside a container, users could even set the score of the container itself I guess 🤔

@thaJeztah
Copy link
Copy Markdown
Contributor Author

@cpuguy83 @AkihiroSuda wdyt?

@cpuguy83
Copy link
Copy Markdown

cpuguy83 commented Oct 5, 2020

dind is also not likely something that is super critical. The reason we set oomscore on dockerd is because it is typically used as a critical system process.

@tianon
Copy link
Copy Markdown
Member

tianon commented Oct 5, 2020

Agreed -- I really like the idea of documenting that it should be set on the container instead, especially since that nicely mirrors setting it in the systemd service. Maybe there are also other parameters in the systemd service we should document that users should set on their containers (LimitNOFILE, etc)?

@thaJeztah
Copy link
Copy Markdown
Contributor Author

closing in favour of docker-library/docs#1821

@thaJeztah thaJeztah closed this Oct 27, 2020
@thaJeztah thaJeztah deleted the oom_score branch October 27, 2020 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants