OpenVisualCloud / Smart-City-Sample

The smart city reference pipeline shows how to integrate various media building blocks, with analytics powered by the OpenVINO™ Toolkit, for traffic or stadium sensing, analytics and management tasks.
BSD 3-Clause "New" or "Revised" License
186 stars 80 forks source link

How to allocate dedicated CPU core to a analytics pod? #800

Open divdaisymuffin opened 2 years ago

divdaisymuffin commented 2 years ago

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 commented 2 years ago

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

xwu2git commented 2 years ago

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.