You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(The container's cpu value is only used for placement and CPU shares, but doesn't actually affect CPU scheduling aws/containers-roadmap#1862.)
If the container is using automaxprocs it only sees a quota of -1 and defaults to using all of runtime.NumCPU, even though the task's cgroup clamps it to 1 vCPU.
(I'm using cgroups v1 as an example here but the same is true with v2 as well, if you happen to be using an AL2023 AMI.)
It seems like the library could climb up the mount point to find quotas belonging to parents, but this is suboptimal if the task has more than one container.
I'm mostly writing this down to help anyone else avoid this rabbit hole.
The text was updated successfully, but these errors were encountered:
Unlike Kubernetes, ECS only allows you to apply a CPU quota at the task (pod) level. Containers in the task are always unbounded.
For example, when
cpu: 1024
(1 vCPU) is provided in the task definition it gets the expected quota:But providing
cpu: 1024
to a container inside the same task doesn't have the same effect:(The container's
cpu
value is only used for placement and CPU shares, but doesn't actually affect CPU scheduling aws/containers-roadmap#1862.)If the container is using
automaxprocs
it only sees a quota of-1
and defaults to using all ofruntime.NumCPU
, even though the task's cgroup clamps it to 1 vCPU.(I'm using cgroups v1 as an example here but the same is true with v2 as well, if you happen to be using an AL2023 AMI.)
It seems like the library could climb up the mount point to find quotas belonging to parents, but this is suboptimal if the task has more than one container.
I'm mostly writing this down to help anyone else avoid this rabbit hole.
The text was updated successfully, but these errors were encountered: