Re: LWLock contention: I think I understand the problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LWLock contention: I think I understand the problem
Date
Msg-id 12767.1010071249@sss.pgh.pa.us
Whole thread Raw
In response to Re: LWLock contention: I think I understand the problem  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: LWLock contention: I think I understand the problem  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: LWLock contention: I think I understand the problem  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Ok, here is a pgbench (-s 10) result on an AIX 5L box (4 way).
> "7.2 with patch" is for the previous patch. "7.2 with patch (revised)"
> is for the this patch. I see virtually no improvement.

If anything, the revised patch seems to make things slightly worse :-(.
That agrees with my measurement on a single CPU.

I am inclined to use the revised patch anyway, though, because I think
it will be less prone to starvation (ie, a process repeatedly being
awoken but failing to get the lock).  The original form of lwlock.c
guaranteed that a writer could not be locked out by large numbers of
readers, but I had to abandon that goal in the first version of the
patch.  The second version still doesn't keep the writer from being
blocked by active readers, but it does ensure that readers queued up
behind the writer won't be released.  Comments?

> Please note that xy axis are now in log scale.

Seems much easier to read this way.  Thanks.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: PGSQL - FAQ 4.1
Next
From: Thomas Lockhart
Date:
Subject: Re: SET DATESTYLE to time_t style for client libraries?