Skip to content

Add ECS_PROPAGATE_TASK_MEMORY_LIMIT_CGROUPV2 opt-in config - #4986

Merged
danehlim merged 1 commit into
devfrom
opt-in-mem-limit
Jun 2, 2026
Merged

danehlim merged 1 commit into
devfrom
opt-in-mem-limit

Conversation

@danehlim

@danehlim danehlim commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On cgroup v2, task-level memory limits set via ECS are not visible to containers the way they are on cgroup v1 due to the way upstream Docker and cgroupv2 are currently designed.

Add a new opt-in enviornment variable ECS_PROPAGATE_TASK_MEMORY_LIMIT_CGROUPV2 which propagates task-level memory limits to containers that do not have explicit container-level memory limits when using cgroupv2.

Implementation details

When enabled and on cgroupv2, ECS Agent sets each container's memory limit to the task-level value if the container does not already have an explicit memory limit.

Testing

New tests cover the changes: yes

Description for the changelog

Feature - Add ECS_PROPAGATE_TASK_MEMORY_LIMIT_CGROUPV2 opt-in config

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

No

Does this PR include the addition of new environment variables in the README?

No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@danehlim
danehlim requested a review from a team as a code owner June 1, 2026 23:19
@danehlim
danehlim enabled auto-merge (rebase) June 2, 2026 18:48
@danehlim
danehlim merged commit 230eb61 into dev Jun 2, 2026
54 checks passed
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.

4 participants