aws / aws/containers-roadmap

Add support for `--oom-score-adj` `docker run` flag

Open
#376 1 comment 6 reactions 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Summary

ECS should support an equivalent of the `--oom-score-adj` option in `docker run`.

### Description

https://github.com/aws/amazon-ecs-agent/issues/502 enumerated all the `docker run` options that ECS does not support, including `--oom-score-adj`. That issue was closed in favor of separate issues for each option, so this is the one for `--oom-score-adj`.

The use case for this option is to control what happens to your containers when the out of memory killer needs to kill processes. In many situations, it's desirable to adjust the OOM score for a container so that it's killed instead of more critical processes like the ECS agent, log collection, etc. Or perhaps a container is more critical than other processes on the system and we want to (attempt to) prevent it from being killed.

`--oom-kill-disable` is a related but distinct option.

See https://github.com/moby/moby/issues/13116 for more discussion about the utility of this option.

Contributor guide

Open the contributing guide

Research direction

Start with the issue's description of Docker's --oom-score-adj behavior and review the linked Moby discussion for the intended semantics. Then locate the ECS agent's handling of Docker run options and its related tests; done means ECS exposes an equivalent setting with documented behavior and coverage for the resulting container configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.