Message141442
| Author |
benjamin.peterson |
| Recipients |
amaury.forgeotdarc, benjamin.peterson, neologix, pitrou, rosslagerwall |
| Date |
2011年07月30日.14:15:16 |
| SpamBayes Score |
7.239698e-05 |
| Marked as misclassified |
No |
| Message-id |
<CAPZV6o_RU4vQ2qN2N1ZbggzSk_2bJ0G=Y5xDwS6K+MPa7xyP3w@mail.gmail.com> |
| In-reply-to |
<CAH_1eM0TMVODcCB71F1Waq69iCz7id=BY1RKEsSHWtN0tdj+Mg@mail.gmail.com> |
| Content |
2011年7月30日 Charles-François Natali <report@bugs.python.org>:
>
> Charles-François Natali <neologix@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
Because I didn't want to type that every time I ran the script.
>
> 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.
Indeed, that's what I was doing. |
|