Smart-City-Sample icon indicating copy to clipboard operation
Smart-City-Sample copied to clipboard

How to allocate dedicated CPU core to a analytics pod?

Open divdaisymuffin opened this issue 3 years ago • 2 comments

Hi @nnshah1 @xwu2git

We want to run analytics pod on a dedicated CPU core, for that we have alraedy tried by putting CPU limit in analytics.yaml but that is actually limiting the 1000m use of total CPU cores not dedicating a single core, Please check the attached yaml changes we have done

resources: limits: cpu: "1" requests: cpu: "1"

We have also explored that via docker we can give arguments like '--cpuset' but I am not able to as the dockerfiles do not support it, So please suggest how we can achieve this?

divdaisymuffin avatar Nov 23 '21 14:11 divdaisymuffin

@nnshah1 Please suggest the configuration that we need to do in pipeline.json to restrict the number of threads.

divdaisymuffin avatar Nov 25 '21 12:11 divdaisymuffin

You can probably modify the CMD command to run the code within the container as taskset to certain CPU ranges. Also check if this applies to your case.

xwu2git avatar Nov 26 '21 18:11 xwu2git