Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3276

Re: Questions about GIL and web services from a n00b

Date 2011-04-15 13:09 -0400
From Chris H <chris.humphres@windsorcircle.com>
Organization Windsor Circle
Subject Re: Questions about GIL and web services from a n00b
References <4DA8734C.1080706@WindsorCircle.com> <1302887012.27269.2.camel@tim-laptop>
Newsgroups comp.lang.python
Message-ID <mailman.399.1302887394.9059.python-list@python.org> (permalink)

Show all headers | View raw


On 4/15/11 1:03 PM, Tim Wintle wrote:
> On Fri, 2011-04-15 at 12:33 -0400, Chris H wrote:
>> 1. Are you sure you want to use python because threading is not good
>> due to the Global Lock (GIL)?  Is this really an issue for
>> multi-threaded web services as seems to be indicated by the articles
>> from a Google search?  If not, how do you avoid this issue in a
>> multi-threaded process to take advantage of all the CPU cores
>> available?
> Is the limiting factor CPU?
>
> If it isn't (i.e. you're blocking on IO to/from a web service) then the
> GIL won't get in your way.
>
> If it is, then run as many parallel *processes* as you have cores/CPUs
> (assuming you're designing an application that can have multiple
> instances running in parallel so that you can run over multiple servers
> anyway).
>
> Tim Wintle

Great question.  At this point, there isn't a limiting factor, but yes 
the concern is around CPU in the future with lots of threads handling 
many simultaneous transactions.

Chris

Back to comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Re: Questions about GIL and web services from a n00b Chris H <chris.humphres@windsorcircle.com> - 2011-04-15 13:09 -0400
  Re: Questions about GIL and web services from a n00b Raymond Hettinger <python@rcn.com> - 2011-04-15 18:05 -0700
    Re: Questions about GIL and web services from a n00b David Cournapeau <cournape@gmail.com> - 2011-04-16 11:59 +0900
      Re: Questions about GIL and web services from a n00b sturlamolden <sturlamolden@yahoo.no> - 2011-04-17 07:48 -0700
    Re: Questions about GIL and web services from a n00b aahz@pythoncraft.com (Aahz) - 2011-04-16 07:44 -0700
      Re: Questions about GIL and web services from a n00b Chris Angelico <rosuav@gmail.com> - 2011-04-17 02:04 +1000
      Re: Questions about GIL and web services from a n00b Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-04-16 13:53 -0700
        Re: Questions about GIL and web services from a n00b Michael Torrie <torriem@gmail.com> - 2011-04-16 16:10 -0600
          Re: Questions about GIL and web services from a n00b sturlamolden <sturlamolden@yahoo.no> - 2011-04-17 07:50 -0700

csiph-web