[Python-Dev] Python parallel benchmark

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 16 04:55:03 CEST 2008


Tom Pinckney wrote:
> If I look at top while 
> running 2 or more threads, both cores are being used 100% and there is 
> no idle time on the system.

If you run it with just one thread, does it use up only
one core's worth of CPU?

If so, this suggests that the GIL is being released. If
it wasn't, two threads would still only use one core's worth.

Also, if you have only two cores, using more than two
threads isn't going to gain you anything whatever happens.

-- 
Greg


More information about the Python-Dev mailing list