EC2 ECS lets you specify memory
and memoryReservation
for both ECS tasks and the containers running within those tasks. I understand that memory
and memoryReservation
on the container settings map to the underlying Docker memory settings.
However, I'm not sure what it means for a task to have a memory
and memoryReservation
setting under EC2 ECS. Is this only used for task scheduling by ECS, or is there some runtime impact?
Assuming that I've already set memory limits on the container, what does it mean to set additional memory limits on the task?
Best Answer
The short answer is that it does have an impact. It's a two level mechanism where the first level (task) optionally provides an outer boundary and the second level (container) provides inner boundaries within the first level (if you do not specify a task level boundary the whole host is considered as first level boundary).
The long answer is included in this blog post