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


Groups > comp.lang.python > #3397

Re: Questions about GIL and web services from a n00b

From sturlamolden <sturlamolden@yahoo.no>
Newsgroups comp.lang.python
Subject Re: Questions about GIL and web services from a n00b
Date 2011-04-17 07:37 -0700
Organization http://groups.google.com
Message-ID <746902f2-30f9-4d2d-8750-efe76a9aee4f@u15g2000vby.googlegroups.com> (permalink)
References <mailman.398.1302885207.9059.python-list@python.org>

Show all headers | View raw


On Apr 15, 6:33 pm, Chris H <chris.humph...@windsorcircle.com> 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?


First, if you are stupid enough to to compute-bound work in Python,
without using a library, you have worse problems than the GIL. How
incompetent would you need to be to write multi-threaded matrix
multiplication or FFTs in pure Python, and blame the GIL for
lack for performance?

Second, if you think "advantage of all the CPU cores available"
will make difference for an I/O bound webservice, you're living
in cloud cookoo land. How on earth will multiple CPU cores
give you or your clients a faster network connection? The network
connection is likely to saturate long before you're burning the
CPU.

Sturla

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


Thread

Questions about GIL and web services from a n00b Chris H <chris.humphres@windsorcircle.com> - 2011-04-15 12:33 -0400
  Re: Questions about GIL and web services from a n00b sturlamolden <sturlamolden@yahoo.no> - 2011-04-17 07:37 -0700
  Re: Questions about GIL and web services from a n00b sturlamolden <sturlamolden@yahoo.no> - 2011-04-17 08:31 -0700
  Re: Questions about GIL and web services from a n00b Lamont Nelson <lamont@brightfruits.com> - 2011-04-19 00:48 -0700
    Re: Questions about GIL and web services from a n00b Chris H <chris.humphres@windsorcircle.com> - 2011-04-20 16:01 -0400

csiph-web