Re: 7.1 vs. 7.2 on AIX 5L - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 7.1 vs. 7.2 on AIX 5L
Date
Msg-id 7440.1011158533@sss.pgh.pa.us
Whole thread Raw
In response to Re: 7.1 vs. 7.2 on AIX 5L  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> BTW, I'm still wondering why 7.2 is slower than 7.1 on AIX. Tom said
>> cs() is responsible for that. But not only 7.2 but 7.1 uses cs(). It
>> seems cs() does not explain the difference of the performance.

> cs() may be used more heavily on 7.2 --- not sure.

Most of the places that were SpinLockAcquire ... SpinRelease on 7.1 are
now LWLockAcquire ... LWLockRelease on 7.2.  And each of LWLockAcquire
and LWLockRelease does a SpinLockAcquire + SpinRelease + some other
computation.  So there's no doubt that we expend more cycles; cycles
that are wasted in a pure-single-backend scenario.  However, if the
spinlock operations are as cheap as they should be, it's hard to believe
that the extra cost would be enough to notice.  And indeed we haven't
been able to measure any penalty on Linux, HPUX, nor BSD (right Bruce?).
So I'm still suspicious that our cs()-based spinlock for AIX is carrying
some unexpected cost.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Procedural language permissions and consequences
Next
From: erigeneni srinivasulu
Date:
Subject: Oracle to Postgres comparision