Re: Move PinBuffer and UnpinBuffer to atomics - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Move PinBuffer and UnpinBuffer to atomics
Date
Msg-id CAA4eK1+4tOJjgbMomg452SD4ohupoLEjhzhrKPunhheDdBmPwA@mail.gmail.com
Whole thread Raw
In response to Re: Move PinBuffer and UnpinBuffer to atomics  (Andres Freund <andres@anarazel.de>)
Responses Re: Move PinBuffer and UnpinBuffer to atomics  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
On Thu, Apr 14, 2016 at 8:05 AM, Andres Freund <andres@anarazel.de> wrote:
>
> On 2016-04-14 07:59:07 +0530, Amit Kapila wrote:
> > What you want to see by prewarming?
>
> Prewarming appears to greatly reduce the per-run variance on that
> machine, making it a lot easier to get meaningful results.
>

I think you are referring the tests done by Robert on power-8 m/c, but the performance results I have reported were on intel x86.  In last two days, I have spent quite some effort to do the performance testing of this patch with pre-warming by using the same query [1] as used by Robert in his tests.  The tests are done such that first it start server, pre-warms the relations, ran read-only test, stop server, again repeat this for next test.  I have observed that the variance in run-to-run performance still occurs especially at higher client count (128).  Below are results for 128 client count both when the tests ran first with patch and then with HEAD and vice versa.

Test-1
----------
client count - 128 (basically -c 128 -j 128)

first tests ran with patch and then with HEAD 

Patch_ver/RunsHEAD (commit -70715e6a)Patch
Run-1156748174640
Run-2151352150115
Run-3177940165269


Test-2
----------
client count - 128 (basically -c 128 -j 128)

first tests ran with HEAD and then with patch  

Patch_ver/RunsHEAD (commit -70715e6a)Patch
Run-1173063151282
Run-2173187140676
Run-3177046166726
 

I think this patch (padding pgxact) certainly is beneficial as reported above thread. At very high client count some variation in performance is observed with and without patch, but I feel in general it is a win.


[1] - psql -c "select sum(x.x) from (select pg_prewarm(oid) as x from pg_class where relkind in ('i', 'r') order by oid) x;"

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Pgbench with -f and -S
Next
From: Amit Kapila
Date:
Subject: Re: Move PinBuffer and UnpinBuffer to atomics