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


Groups > comp.lang.python > #40380 > unrolled thread

RLock IO bound?

Started byjuancarlo.anez@gmail.com
First post2013-03-02 17:35 -0800
Last post2013-03-03 17:27 +1100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  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

#40380 — RLock IO bound?

Fromjuancarlo.anez@gmail.com
Date2013-03-02 17:35 -0800
SubjectRLock IO bound?
Message-ID<43fc67b0-5846-4aad-8563-dbb3fad2caaa@googlegroups.com>
Hello,

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.

Any explanations?

Cheers,

-- Juancarlo

[toc] | [next] | [standalone]


#40402

FromCameron Simpson <cs@zip.com.au>
Date2013-03-03 17:27 +1100
Message-ID<mailman.2817.1362292089.2939.python-list@python.org>
In reply to#40380
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>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web