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


Groups > comp.lang.python > #40402

Re: RLock IO bound?

Date 2013-03-03 17:27 +1100
From Cameron Simpson <cs@zip.com.au>
Subject Re: RLock IO bound?
References <43fc67b0-5846-4aad-8563-dbb3fad2caaa@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.2817.1362292089.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 02Mar2013 17:35, juancarlo.anez@gmail.com <juancarlo.anez@gmail.com> wrote:
| I have a set of processes that bring any number of cores to 100%
| use when unsynchronized (they take independent jobs from a queue).
| 
| As soon as I add an RLock to handle shared access to a file-system
| directory, the CPU utilization drops to 60%.
| 
| I'm not talking about overall speed here, but about processes
| that were CPU bound and suddenly become bound to something else
| with RLock.

Shrug. If your threads do some I/O and now block where they would
have overlapped then suddenly your threads can't do compute all the
time. Ergo, less CPU utilisation.

Without more detail nobody can say where your particular bottleneck
lies, but I would be very very surprised if the RLock was the
bottleneck; what you're doing _inside_ the RLock is the bottleneck.
-- 
Cameron Simpson <cs@zip.com.au>

My computer always does exactly what I tell it to do but sometimes I have
trouble finding out what it was that I told it to do.
        - Dick Wexelblat <rlw@ida.org>

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


Thread

RLock IO bound? juancarlo.anez@gmail.com - 2013-03-02 17:35 -0800
  Re: RLock IO bound? Cameron Simpson <cs@zip.com.au> - 2013-03-03 17:27 +1100

csiph-web