Dedicated CPU core for Python?
Tim Roberts
timr at probo.com
Sat Apr 28 01:46:04 EDT 2007
Louise Hoffman <louise.hoffman at gmail.com> wrote:
>
>Have I understood CPU affinity correct, that it is similar to SMP/
>NUMA, only that I can force a process/thread to a cpu core?
>
>In regards to forcing the Python virtual machine (thanks Michael for
>the explanation=) ), is the problem that the "OS core" and the "VM
>core" would need to copy each others cache/exchange data too often?
You do not understand what you are asking. The only possible effect of
your suggestion would be to REDUCE overall system throughput. Your
operating system's scheduler has been carefully tuned to make sure that all
of your CPU cores are kept busy, and are shared evenly amongst all of the
tasks that are ready to run.
By artificially limiting the options as you suggest, you tie the hands of
the scheduler so that it can't make the most effective use of the
resources.
Except for specific needs in some drivers, the use of CPU and thread
affinity is virtually never a good idea.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list