Re: spinlocks on powerpc

Поиск
Список
Период
Сортировка
От Manabu Ori
Тема Re: spinlocks on powerpc
Дата
Msg-id CADWW1HEK5ZvsJOk6BBYQH1Ts5=5yFz+LD6hQh8irH54COY5=CA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: spinlocks on powerpc  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: spinlocks on powerpc  (Manabu Ori <manabu.ori@gmail.com>)
Список pgsql-hackers
2012/1/2 Tom Lane <tgl@sss.pgh.pa.us>
> I revised the patch to include a configure test and committed it.

Thank you very much for committing the patch.

> However, I omitted the part that added an unlocked test in TAS_SPIN,
> because (1) that's logically a separate change, and (2) in my testing
> the unlocked test produces a small but undeniable performance loss
> (see numbers below).  We need to investigate a bit more to understand
> why I'm getting results different from yours.  

I ran pgbench again on git head, comparing with and without the
TAS_SPIN unlocked test, and got clearly better performance with
the unlocked test. In your test the unlocked test loss a bit for
sure, but the delta from git head is not so big. On the other
hand, in my test the unlockted test showed significant
win (please find numbers below and attached png file).

With current git head:
  (Note that Power750 generates executables with hint bit from
  current git head.)

pgbench -c 1 -j 1 -S -T 300    tps = 11436.679064 (including ...
pgbench -c 2 -j 1 -S -T 300    tps = 21922.031158 (including ...
pgbench -c 4 -j 2 -S -T 300    tps = 41801.573397 (including ...
pgbench -c 8 -j 4 -S -T 300    tps = 76581.573285 (including ...
pgbench -c 16 -j 8 -S -T 300   tps = 154154.380180 (including ...
pgbench -c 32 -j 16 -S -T 300  tps = 280654.751280 (including ...
pgbench -c 64 -j 32 -S -T 300  tps = 263800.861178 (including ...
pgbench -c 96 -j 48 -S -T 300  tps = 212199.887237 (including ...
pgbench -c 128 -j 64 -S -T 300 tps = 170627.652759 (including ...

With current git head with TAS_SPIN patch:
  (executables have hint bit and TAS_SPIN change)

pgbench -c 1 -j 1 -S -T 300    tps = 11323.652326 (including ...
pgbench -c 2 -j 1 -S -T 300    tps = 22123.674189 (including ...
pgbench -c 4 -j 2 -S -T 300    tps = 43616.374433 (including ...
pgbench -c 8 -j 4 -S -T 300    tps = 86350.153176 (including ...
pgbench -c 16 -j 8 -S -T 300   tps = 166122.891575 (including ...
pgbench -c 32 -j 16 -S -T 300  tps = 269379.747507 (including ...
pgbench -c 64 -j 32 -S -T 300  tps = 361657.417319 (including ...
pgbench -c 96 -j 48 -S -T 300  tps = 333483.557846 (including ...
pgbench -c 128 -j 64 -S -T 300 tps = 299554.099510 (including ...

I'm running another cases includes LWARX stuff etc and send the
results later.

> If the bottom line is
> that the unlocked test loses for smaller numbers of processors and only
> helps with lots of them, I have to question whether it's a good idea to
> apply it.

So such is the case with my result.
I don't have a clear answer to your question but how about adding
a tunable in postgresql.conf named "tas_spin_with_unlocked_test"
so that we can use the unlocked test in TAS_SPIN explicitly on
larger SMP systems?

Regards,
Manabu Ori

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: alternate psql file locations
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: patch: ALTER TABLE IF EXISTS