0

I am doing:

pool = multiprocessing.dummy.Pool(1) 

and task manager says Python is using >30% CPU. I have an i5 9600K - has 6 cores. I am running the script from cmd if that means anything. If I use 8 threads, Python uses nearly 100% of the CPU. Is this expected?

Harry Stuart
  • 1,781
  • 2
  • 24
  • 39
  • (I generally don't do python, but this might help https://stackoverflow.com/questions/26432411/multiprocessing-dummy-in-python-is-not-utilising-100-cpu) – IoCalisto Jul 17 '19 at 13:48
  • Take task manager's measurements with a pinch of salt - [even Microsoft themselves say so](https://support.microsoft.com/en-gb/help/873289/task-manager-may-not-calculate-cpu-usage-correctly-on-windows-2000-win). – meowgoesthedog Jul 17 '19 at 13:51
  • The thing is, I notice considerably slower performance even when opening file explorer etc. so it must've been consuming a lot of CPU. – Harry Stuart Jul 17 '19 at 14:17
  • 2
    Sounds like you are doing multiprocessing, not multithreading, in which case your title and tags aren't quite correct. – Jeremy Friesner Jul 17 '19 at 14:23
  • In my understanding, `multiprocessing.dummy` uses threads as opposed to processes. – Harry Stuart Jul 17 '19 at 16:56

0 Answers0