[issue12655] Expose sched.h functions

Charles-François Natali report at bugs.python.org
Sat Jul 30 10:37:40 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> I actually implemented this because I wanted to confine a Python process to a cpu to prevent keep it from being tossed from core to core. It made sense to bring the other scheduling functions along for the ride.

Why didn't you use something like:

$ taskset <cpu mask> python myscript.py

By the way, binding a multi-threaded Python process to a single core
is often a simple way to improve performance, because with the GIL the
threads are actually serialized, so you have almost no contention, and
your threads get hot cache.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12655>
_______________________________________


More information about the Python-bugs-list mailing list