Docker Executor returning Total Host CPU Cores

Why does the Docker Executor return total CPU Cores?

When calling nproc, lscpu etc on the Docker Executor, you will see it return the total host CPU core count, instead of what is depicted on your resource_class. See below:

Screen_Shot_2022-11-24_at_2.53.55_PM.png

This is by design to allow for slight overprovisioning where you may see your CPU reach 100% usage on the resource tab, but not fail. 

 

Typical Use Case

The typical use case for this is typically to utilize a --parallelism flag to auto-scale workers to available CPU cores. However, it is best practice to allow the command to auto-scale or specify the core count based on the resource class you are using.

 

You can also utilize the Machine Executor which will return the specific CPU core count that your resource class specifies. 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.