global interpreter lock

Paul Rubin http
Thu Sep 1 02:25:17 EDT 2005


Mike Meyer <mwm at mired.org> writes:
> > Sure. I tried to be helpful there, but maybe I need to be more
> > specific. The ref from my previous post, Google-able as "The
> > C10K problem" is good but now a little dated.
> 
> That appears to be a discussion on squeezing the most out of a network
> server, touching on threading models only so far as to mention what's
> available for popular languages on some popular server OS's.

The C10K paper is really interesting as are several of the papers that
it links to.  I didn't realize that opening a disk file couldn't be
done really asynchronously, though I'd consider that an OS bug.
Harder to deal with: if you mmap some data and touch an address that's
not in ram, it's inherently impossible (in the normal notion of user
processes) for the executing thread to continue doing any processing
while waiting for the page fault to be serviced.  

So if you're doing any significant amount of paging (such as using an
mmapped database with some infrequently accessed bits), you really
can't use your whole computer (all the cpu cycles) without multiple
threads or processes, even with a single processor.



More information about the Python-list mailing list