Christopher Ochsenreither on 4 Jul 2013 12:37:17 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] multiprocessing on Python


Someone at the PLUG central meeting was asking about distributing a Python process over multiple cores. I thought this article might be of interest:

http://www.jeffknupp.com/blog/2013/06/30/pythons-hardest-problem-revisited/?utm_source=Python+Weekly+Newsletter&utm_campaign=4253cb6a56-Python_Weekly_Issue_94_July_4_2013&utm_medium=email&utm_term=0_9e26887fc5-4253cb6a56-304958193

Excerpt:
"For many workloads for which the GIL is a bottleneck, one need look no further than the Python standard library. The multiprocessing package trades threads for processes, to great effect. The idea is simple: if a single instance of the Python interpreter is constrained by the GIL, one can achieve gains in concurrent workloads by through multiple interpreter processes in place of multiple threads. Helpfully, multiprocessing was written with the same interface as the threading package, so code already using threads doesn't require a massive rewrite to make use of multiple processes."


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug