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

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris.humphres@windsorcircle.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'anyway).': 0.07; 'python': 0.07; 'received:209.85.160.174': 0.09; 'received:mail- gy0-f174.google.com': 0.09; 'pm,': 0.11; 'blocking': 0.14; 'wrote:': 0.14; '(assuming': 0.16; 'cores': 0.16; 'factor,': 0.16; 'simultaneous': 0.16; 'subject:GIL': 0.16; 'threading': 0.16; '(i.e.': 0.18; 'question.': 0.18; 'subject:Questions': 0.19; 'seems': 0.21; 'header:In-Reply-To:1': 0.22; 'gil': 0.23; 'point,': 0.25; 'received:71': 0.26; 'chris': 0.27; 'google': 0.27; 'received:209.85.160': 0.28; 'concern': 0.29; 'fri,': 0.29; 'indicated': 0.29; "won't": 0.30; 'lock': 0.31; 'threads': 0.31; 'to:addr:python-list': 0.32; 'handling': 0.33; "isn't": 0.34; 'there': 0.35; 'header:User-Agent:1': 0.35; 'instances': 0.35; 'running': 0.36; 'way.': 0.37; 'received:209.85': 0.37; 'issue': 0.37; 'run': 0.37; 'designing': 0.38; 'parallel': 0.38; 'subject:web': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'not,': 0.39; 'tim': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'how': 0.39; 'header:Received:5': 0.40; 'factor': 0.60; 'subject:about': 0.66; 'due': 0.67; 'articles': 0.67; 'service)': 0.84; 'subject:services': 0.93
Date Fri, 15 Apr 2011 13:09:49 -0400
From Chris H <chris.humphres@windsorcircle.com>
Organization Windsor Circle
User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version 1.0
To python-list@python.org
Subject Re: Questions about GIL and web services from a n00b
References <4DA8734C.1080706@WindsorCircle.com> <1302887012.27269.2.camel@tim-laptop>
In-Reply-To <1302887012.27269.2.camel@tim-laptop>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.399.1302887394.9059.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 82.94.164.166
X-Trace 1302887399 news.xs4all.nl 81483 [::ffff:82.94.164.166]:41966
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:3276

Show key headers only | 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