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

From Dilip Kumar
Subject Re: Move PinBuffer and UnpinBuffer to atomics
Date
Msg-id CAFiTN-uE_3vi=bDcOCQdBvA9YNHeWy4mB0POQsXyM=37p9hYcg@mail.gmail.com
Whole thread Raw
In response to Re: Move PinBuffer and UnpinBuffer to atomics  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Move PinBuffer and UnpinBuffer to atomics  (Andres Freund <andres@anarazel.de>)
Re: Move PinBuffer and UnpinBuffer to atomics  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers

On Sun, Apr 3, 2016 at 2:28 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:

What is the conclusion of this test?  As far as I see, with the patch (0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect), the performance degradation is not fixed, but with pin-unpin patch, the performance seems to be better in most of the runs, however still you see less performance in some of the runs.  Is that right?  

Summary Of the Run:
-----------------------------
1. Throughout one run if we observe TPS every 30 seconds its stable in one run.
2. With Head 64 client run vary between ~250,000 to ~450000. you can see below results.

run1: 434860    (5min)
run2: 275815    (5min)
run3: 437872    (5min)
run4: 237033   (5min)
run5: 347611    (10min)
run6: 435933   (20min) 

3. With Head + 0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect  with 64 client I always saw ~450,000 TPS

run1: 429520   (5min)
run2: 446249   (5min)
run3: 431066   (5min)
run4: 441280   (10min)
run5: 429844   (20 mins)

4. With Head+ 0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect  with 128 Client something performance is as low as ~150,000 which is never observed with Head (with head it is constantly ~ 350,000 TPS).

run1: 372958  (5min)
run2: 167189  (5min)
run3: 381592  (5min)
run4: 441280  (10min)
run5: 362742  (20 min)
 
5. With Head+pinunpin-cas-8, with 64 client its ~ 550,000 TPS and with 128 client ~650,000 TPS.

6. With Head+ pinunpin-cas-8 + 0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect performance is almost same as with 
Head+pinunpin-cas-8, only sometime performance at 128 client is low (~250,000 instead of 650,000)

Seems like Head+ pinunpin-cas-8 is giving best performance and without much fluctuation.

 
Can you answer some of the questions asked by Andres upthread[1]?




Non Default Parameter:
--------------------------------
shared_buffer 8GB
Max Connections 150

./pgbench -c $threads -j $threads -T 1200 -M prepared -S -P 30 postgres 

BufferDesc Size:
------------------------
Head: 80 Bytes
Head+0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect : 72Bytes
Head+0001-WIP-Avoid-the-use-of-a-separate-spinlock-to-protect+ Pinunpin-cas-8 : 64 Bytes

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Choosing parallel_degree
Next
From: Tomas Vondra
Date:
Subject: Re: Using quicksort for every external sort run