multi-CPU, GIL, threading on linux

G

gabor

hi,

as i understand, on linux, python uses the operating systems threads
(so python is not simulating threads by himself).

that means that on a multi-CPU computer, the different threads may get
executed on different CPUs.

i am working with zope, and i was referenced to this page:
http://www.zope.org/Members/glpb/solaris/report_ps

it's rather old (2002), but it claims the following:

> I do *not* recommend running Zope on multiprocessor machines without an
> ability to restrict Zope to execution on a single CPU.
>
> The reason for this is that the Python Global Interpreter Lock is shared
> inside a Zope process. However, threads in Python are backed by
> underlying OS threads. Thus, Zope will create multiple threads, and
> each thread is likely to be assigned to a different CPU by the OS
> scheduler. However, all CPUs but one which are dispatching any given
> Zope process will have to then wait and attempt to acquire the GIL; this
> process introduces significant latency into Python and thus into Zope.

now, i know about tools that allow me to bind a python process to a
specific cpu, but i wonder..


is the performance soo bad when i am running a python process, and the
threads are running on different cpus?

i understand that because of the GIL i cannot make my application
faster. but slower?

thanks,
gabor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top