RLock IO bound?
cs at zip.com.au
Sun Mar 3 07:27:56 CET 2013
On 02Mar2013 17:35, juancarlo.anez at gmail.com <juancarlo.anez at 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 at 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 at ida.org>
More information about the Python-list