agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Sergei Kornilov <sk@zsrv.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: legrand legrand <legrand_legrand@hotmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)
Date: Fri, 6 Sep 2019 16:19:16 +0200
Message-ID: <20190906141916.etcdgjc66peyy4y5@development> (raw)
In-Reply-To: <33867131567613987@iva1-adac53ff5c48.qloud-c.yandex.net>
References: <CAOBaU_YY1paFNxPoeP7=WUZh5g92rSjMYLdnNqpNzyEiEAY9nw@mail.gmail.com>
	<1553726396218-0.post@n3.nabble.com>
	<7091891553759108@iva3-2961a207771d.qloud-c.yandex.net>
	<CAOBaU_YsFEKmU31JVjnuxkTgAPYaSKrKmCUh6Ea1EM_10=n3CQ@mail.gmail.com>
	<CAOBaU_abWF8Q-qKr3f6Q1M3MN7nVrfvwF6P105C-kCds85Lzww@mail.gmail.com>
	<1554150919882-0.post@n3.nabble.com>
	<CAOBaU_aYyZ2GEyb4QTmrE9O5k0C1n0aDLbRCaH771sSn0eq7VA@mail.gmail.com>
	<DB6PR0301MB2135811EFF4391A031339D5690560@DB6PR0301MB2135.eurprd03.prod.outlook.com>
	<CAOBaU_bP3VN6O20kpuHX595HSmHhVS_DEXSCiMEFQrrDyLNBZA@mail.gmail.com>
	<33867131567613987@iva1-adac53ff5c48.qloud-c.yandex.net>

On Wed, Sep 04, 2019 at 07:19:47PM +0300, Sergei Kornilov wrote:
>
> ...
>
>Results:
>
>         test         |   mode   | average_tps | degradation_perc
>----------------------+----------+-------------+------------------
> head_no_pgss         | extended |       13816 |            1.000
> patch_not_loaded     | extended |       13755 |            0.996
> head_track_none      | extended |       13607 |            0.985
> patch_track_none     | extended |       13560 |            0.981
> head_track_top       | extended |       13277 |            0.961
> patch_track_top      | extended |       13189 |            0.955
> patch_track_planning | extended |       12983 |            0.940
> head_no_pgss         | prepared |       29101 |            1.000
> head_track_none      | prepared |       28510 |            0.980
> patch_track_none     | prepared |       28481 |            0.979
> patch_not_loaded     | prepared |       28382 |            0.975
> patch_track_planning | prepared |       28046 |            0.964
> head_track_top       | prepared |       28035 |            0.963
> patch_track_top      | prepared |       27973 |            0.961
> head_no_pgss         | simple   |       16733 |            1.000
> patch_not_loaded     | simple   |       16552 |            0.989
> head_track_none      | simple   |       16452 |            0.983
> patch_track_none     | simple   |       16365 |            0.978
> head_track_top       | simple   |       15867 |            0.948
> patch_track_top      | simple   |       15820 |            0.945
> patch_track_planning | simple   |       15739 |            0.941
>
>So I found slight slowdown with track_planning = off compared to HEAD. Possibly just at the level of measurement error. I think this is ok.
>track_planning = on also has no dramatic impact. In my opinion proposed design with pgss_store call is acceptable.
>

FWIW I've done some benchmarking on this too, with a single pgbench client
running select-only test on a tiny database, in different modes (simple,
extended, prepared). I've done that on two systems with different CPUs
(spreadsheet with results attached).

I don't see any performance regression - there are some small variations
in both directions (say, ~1%) but that's well within the noise. So I think
the patch is fine in this regard.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services






view thread (127+ messages)  latest in thread

Message-ID: <20190906141916.etcdgjc66peyy4y5@development>
Permalink:  ../20190906141916.etcdgjc66peyy4y5@development/
Also on:    postgresql.org/message-id/20190906141916.etcdgjc66peyy4y5@development

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, sk@zsrv.org, rjuju123@gmail.com, legrand_legrand@hotmail.com
  Subject: Re: Planning counters in pg_stat_statements (using pgss_store)
  In-Reply-To: <20190906141916.etcdgjc66peyy4y5@development>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox