python - How to program to have all processors on your machine used? -


i running single-threaded python program performs massive data processing on windows box. machine has 8 processors. when monitor cpu usage in performance tab under windows task manager, shows using small fraction of processing power available me. 1 processor being used fullest , rest idle. should ensure processors used? multithreading solution?

multithreading cannot make use of processors or cores.

you should spawn new processes instead of new threads.

this tool far simplest among have come across: parallel python

overview:

pp python module provides mechanism parallel execution of python code on smp (systems multiple processors or cores) , clusters (computers connected via network).

it light, easy install , integrate other python software.

pp open source , cross-platform module written in pure python


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -