R
RunPod2w ago
vidhi

Only 1 CPU Core getting utilized

I wanted to deploy an ONNX model that utilizes CPU on RunPod. I am using uvicorn server for the same. I have selected Compute Optimized 5cpu with 16 vCPU and 32GB RAM. After testing using locust, the debugging showed that only 1 CPU core is being utilized. My code uses multiple threads created within the program. To further confirm:
>>>os.sched_getaffinity(0)
{0}
>>>os.sched_getaffinity(0)
{0}
Which shows that only core 0 can be utilized by the process. This issue is specific to RunPod as it does not happen in my local laptop (Windows) Is their any configuration to be done to allow this? Or any changes I need to make to my code to allow all cores to be utilized?
3 Replies
nerdylive
nerdylive2w ago
Do you use python library or any specific library?
yhlong00000
yhlong000002w ago
let me check this with internal team, will post a update here later.
vidhi
vidhiOP2w ago
Python library

Did you find this page helpful?