Re: spinlocks on HP-UX
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Date: 2011-10-18T04:34:45Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Typo fixes.
- 0510b62d9115 9.2.0 cited
On Tue, Oct 18, 2011 at 12:11 AM, Tatsuo Ishii <ishii@postgresql.org> wrote: >>> That would be great. What I've been using as a test case is pgbench >>> -S -c $NUM_CPU_CORES -j $NUM_CPU_CORES with scale factor 100 and >>> shared_buffers=8GB. >>> >>> I think what you'd want to compare is the performance of unpatched >>> master, vs. the performance with this line added to s_lock.h for your >>> architecture: >>> >>> #define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock)) >>> >>> We've now added that line for ia64 (the line is present in two >>> different places in the file, one for GCC and the other for HP's >>> compiler). So the question is whether we need it for any other >>> architectures. >> >> Ok. Let me talk to IBM guys... > > With help from IBM Japan Ltd. we did some tests on a larger IBM > machine than Tom Lane has used for his > test(http://archives.postgresql.org/message-id/8292.1314641721@sss.pgh.pa.us). > In his case it was IBM 8406-71Y, which has 8 physical cores and > 4SMT(32 threadings). Ours is IBM Power 750 Express, which has 32 > physical cores and 4SMT(128 threadings), 256GB RAM. > > The test method was same as the one in the article above. The > differences are OS(RHEL 6.1), gcc version (4.4.5) and shared buffer > size(8GB). > > We tested 3 methods to enhance spin lock contention: > > 1) Add "hint" parameter to lwarx op which is usable POWER6 or later > architecure. > > 2) Add non-locked test in TAS() > > 3) #1 + #2 > > We saw small performance enhancement with #1, larger one with #2 and > even better with #1+#2. Hmm, so you added the non-locked test in TAS()? Did you try adding it just to TAS_SPIN()? On Itanium, I found that it was slightly better to do it only in TAS_SPIN() - i.e. in the contended case. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company