Re: Avoid stack frame setup in performance critical routines using tail calls - Mailing list pgsql-hackers

From David Rowley
Subject Re: Avoid stack frame setup in performance critical routines using tail calls
Date
Msg-id CAApHDvpQQc67NbYJkM0GZWVw_wZvUvOuuANCPiOyobV=q1=owA@mail.gmail.com
Whole thread Raw
In response to Avoid stack frame setup in performance critical routines using tail calls  (Andres Freund <andres@anarazel.de>)
Responses Re: Avoid stack frame setup in performance critical routines using tail calls  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Tue, 20 Jul 2021 at 08:00, Andres Freund <andres@anarazel.de> wrote:
> I have *not* carefully benchmarked this, but a quick implementation of this
> does seem to increase readonly pgbench tps at a small scale by 2-3% (both

Interesting.

I've not taken the time to study the patch but I was running some
other benchmarks today on a small scale pgbench readonly test and I
took this patch for a spin to see if I could see the same performance
gains.

This is an AMD 3990x machine that seems to get the most throughput
from pgbench with 132 processes

I did: pgbench -T 240 -P 10 -c 132 -j 132 -S -M prepared
--random-seed=12345 postgres

master = dd498998a

Master: 3816959.53 tps
Patched: 3820723.252 tps

I didn't quite get the same 2-3% as you did, but it did come out
faster than on master.

David

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Introduce pg_receivewal gzip compression tests
Next
From: Thomas Munro
Date:
Subject: Re: O_DIRECT on macOS