Python Forum
CPU load at approx. 30% when multiprocessing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CPU load at approx. 30% when multiprocessing
#4
Hi,

Quote: Is it possible to set the priority of my processes higher or is it an internal os mechanism which I can not control?
You can, but I think not from inside Python - at least I'm not aware how. The way to go depends on the underlying OS. On Linux, you can set process priorities with nice.

In general, I think your problem is suitable for multiprocessing. You have a list of independent data and want to process each data set - which works fine with multiprocessing.

However, for a runtime of ~10 seconds only, it's questionable if you really get any big gains in runtime on multiprocessing. If you want to run faster, I would go here for PyPy or probably the JIT of Numba. Whereas pypy is the easier why: just run your code with pypy instead the the CPython interpreter.

Regards, noisefloor
Reply


Messages In This Thread
RE: CPU load at approx. 30% when multiprocessing - by noisefloor - Jun-20-2019, 06:55 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020