-1

I have created 16 workers with gunicorn for the flask app.
why the worker spawn processes all running on cpu 1.

enter image description here

I have a octa-core processor. enter image description here

why the workers not utilizing the all the cores? or htop command is lying? showing cpu 1 for all processes. for other multiprocessing tasks I have seen in CPU column values from 1 to 16, and I was expecting here the same the workers distributed from CPU 1 TO 16, or some other fashion. but it is not clear why all workers running on single core?

  • Have you tried what happens if you make requests to the workers? Do multiple CPU bars light up? If so, then the work is distributed across your cores just fine. – AKX Sep 30 '22 at 13:34

1 Answers1

0

I was using the WSL (windows subsystem for linux), when this got this issue.
I ran the same program on the AWS EC2 Instance having 8 logical cores. And got the results, which I was the expecting the in the start. enter image description here

here we can see the processes are distributed on all logical cpu cores.

conclusion: WSL "somehow" controls the processes from utilizing all cpu cores.

E_net4
  • 27,810
  • 13
  • 101
  • 139