Discussion:
DorothyLocker and performance
Thomas Klaeger
2004-09-26 08:36:58 UTC
Permalink
I did some preliminary performance measurements, comparing
DorothyLocker.DorothyRLock and threading.RLock. I was running the
tests on Win2K, on a slightly loaded machine with PIII 1GHz and
512MB RAM.

RLock create: 22 us
RLock acquire: 13-14 us
RLock release: 12 us
RLock second acquire: 9 us

DorothyRLock create: 32 us
DorothyRLock acquire: 1720-1760 us
DorothyRLock release: 1730 us
DorothyRLock second acquire: 2230 us
From these numbers it can be clearly seen that DorothyLocker has
some great performance impact!

So I would recommend DorothyLocker during testruns and after
bigger changes to the codebase, but not on a production system.

Regards, Thomas
Georg Bauer
2004-09-26 09:12:55 UTC
Permalink
Hi!
Post by Thomas Klaeger
So I would recommend DorothyLocker during testruns and after
bigger changes to the codebase, but not on a production system.
What I just did:

- commited Thomas' patch with context=0
- moved the Activation of DorothyLock to it's own option "-l"

So you now can use -v without DorothyLock and can use -l to activate
verbose locking (or set the config variable verboseLocking).

But the DorothyLock should be tuned a bit performance-wise, because in
it's current state it's only usefull on quite fast machines - I use a
400 MHz Dual PIII at work and PyDS is unuseable when run with
DorothyLock activated.

bye, Georg
Garth T Kidd
2004-09-26 12:30:49 UTC
Permalink
Thing is, there just isn't that much locking going on that a single-digit
thousands of a second per lock overhead is going to make that much of a
difference. Make either DorothyRLock or Rlock verbose and you'll see what I
mean. Maybe it's just the way we use the language down here, but "horribly
slow" to me says the delay should be at least noticeable to the human eye.
:)

In any case, DorothyRLock was intended specifically for debugging deadlocks
and dropped acquires or releases, all three of which I've run into with my
tool development which I tend to do in quite large batches. If you don't use
it because you don't need it, my feelings won't be hurt.

Regards,
Garth.

-----Original Message-----
From: pyds-dev-admin-iYtK5bfT9M//Ad8WF/VaRBS11BummzK+@public.gmane.org
[mailto:pyds-dev-admin-iYtK5bfT9M//Ad8WF/VaRBS11BummzK+@public.gmane.org] On Behalf Of Thomas Klaeger
Sent: Sunday, 26 September 2004 6:37 PM
To: pyds-dev-iYtK5bfT9M//Ad8WF/VaRBS11BummzK+@public.gmane.org
Subject: [Pyds-dev] DorothyLocker and performance

I did some preliminary performance measurements, comparing
DorothyLocker.DorothyRLock and threading.RLock. I was running the tests on
Win2K, on a slightly loaded machine with PIII 1GHz and 512MB RAM.

RLock create: 22 us
RLock acquire: 13-14 us
RLock release: 12 us
RLock second acquire: 9 us

DorothyRLock create: 32 us
DorothyRLock acquire: 1720-1760 us
DorothyRLock release: 1730 us
DorothyRLock second acquire: 2230 us
From these numbers it can be clearly seen that DorothyLocker has some great
performance impact!

So I would recommend DorothyLocker during testruns and after bigger changes
to the codebase, but not on a production system.

Regards, Thomas

Loading...