AWS ECS Tasks: parallelly::availableCores() #828
Unanswered
jeffkeller-einc
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If AWS ECS Tasks has a standard way to querying CPU constraints, I'm happy to add support for it to the parallelly package. I don't have easy access to AWS ECS Tasks and I don't think I've every used it. Can you please share exactly how you make the above setting/request? That would help to figure out what's possible and not. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone know how I can correctly detect the number of available CPUs when running code as an AWS ECS Task? I'm using a Managed Instances Capacity Provider (i.e. not Fargate).
When my task gets placed on an instance with more CPU than explicitly requested,
parallelly::availableCores()returns the number of CPUs on the EC2 instance, not what has been allocated to the task.For example, if I set my task and container vCPU limit to 1024 with placement constraints that guarantee an oversized instance:
{ "expression": "attribute:ecs.instance-type==m5.2xlarge" "type": "memberOf" }Then
parallelly::availableCores(which = "all")returns:If I launch the same task as a Kubernetes pod then I get the expected number of cores (1).
Beta Was this translation helpful? Give feedback.
All reactions