Re: PG15 beta1 sort performance regression due to Generation context change

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG15 beta1 sort performance regression due to Generation context change
Date: 2022-05-31 05:39:51
Message-ID: CAApHDvrivwkM2R1nb9gdWr2YzM=D-OCMSYZOU7Gw_VykvwR76w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 31 May 2022 at 09:37, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> Likely it would have been more relevant to have tested this against
> master with 40af10b57 reverted. I'm running those now.

My machine just finished running the tests on master with the
generation context in tuplesort.c commented out so that it always uses
the allocset context.

In the attached graph, anything below 100% means that using the
generation context performs better than without.

In the test, each query runs 5 times. If I sum the average run time of
each query, master takes 41 min 43.8 seconds and without the use of
generation context it takes 43 mins 31.3 secs. So it runs in 95.88%
with the generation context.

Looking at the graph, you can easily see the slower performance for
the 64-byte tuples with 64MB of work_mem. That's the only regression
of note. Many other cases are much faster.

I'm wondering if we should just do nothing about this. Any thoughts?

David

Attachment Content-Type Size
image/png 71.8 KB
Sort benchmark PG14 vs PG15 vs PG15_no_gen_cxt.ods application/vnd.oasis.opendocument.spreadsheet 57.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-05-31 06:20:48 Re: Skipping schema changes in publication
Previous Message Kyotaro Horiguchi 2022-05-31 05:05:45 Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485)