pg.ddx.io  pgsql-pkg-debian@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causing big performance issues
4+ messages / 3 participants
[nested] [flat]

* pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causing big performance issues
@ 2017-06-10 13:27  Stefan Huehner <stefan@huehner.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Stefan Huehner @ 2017-06-10 13:27 UTC (permalink / raw)
  To: pgsql-pkg-debian; +Cc: stefan.huehner@openbravo.com

Hello,
please CC me on replies as i am not subscribed to the mailing list.

In short:
The following part from latest changelog:
  * debian/rules: Add stub to enable cassert builds (disabled by default).

does not work in practice as in debian/rules file the 

#CASSERT_FLAGS := --enable-cassert

line is not commented out as it should have been.

That causes severe peformance issues at least in our use-case of batch-inserting lots of data with runtime going from ca. 1min to >=6min.

Checking with perf shows lots of cpu-cycles spent in AllocSetCheck.

Doing local rebuilt of the source package with the assert disabled fixes the performance issue for me.
 
apt-cache policy postgresql-9.3
postgresql-9.3:
  Installed: 9.3.17-1.pgdg+1
  Candidate: 9.3.17-1.pgdg+1
  Version table:
     9.3.17-1.pgdg+1 500
        500 https://apt.postgresql.org/pub/repos/apt sid-pgdg/main amd64 Packages

Apart from 9.3 version as mentioned above it seems to affect more versions.

I did not check manually but checked pg_config output from postgresql-server-dev packages searching for 'assert' and got the following:

for i in `ls /usr/lib/postgresql/`; do echo "Version: $i"; /usr/lib/postgresql/$i/bin/pg_config | grep -c assert; done 
Version: 10
0
Version: 8.4
0
Version: 9.0
0
Version: 9.1
0
Version: 9.2
1
Version: 9.3
1
Version: 9.4
1
Version: 9.5
1
Version: 9.6
0

So apparently 9.2..9.5 version has that problem as well.

Regards,
Stefan


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causing big performance issues
@ 2017-06-10 20:21  Christoph Berg <myon@debian.org>
  parent: Stefan Huehner <stefan@huehner.org>
  0 siblings, 2 replies; 4+ messages in thread

From: Christoph Berg @ 2017-06-10 20:21 UTC (permalink / raw)
  To: Stefan Huehner <stefan@huehner.org>; +Cc: pgsql-pkg-debian; stefan.huehner@openbravo.com

Re: Stefan Huehner 2017-06-10 <20170610132747.GD11504@huehner.biz>
> In short:
> The following part from latest changelog:
>   * debian/rules: Add stub to enable cassert builds (disabled by default).
> 
> does not work in practice as in debian/rules file the 
> 
> #CASSERT_FLAGS := --enable-cassert
> 
> line is not commented out as it should have been.
> 
> That causes severe peformance issues at least in our use-case of batch-inserting lots of data with runtime going from ca. 1min to >=6min.

Hi,

I'm sorry for not properly announcing and documenting this recent
change properly, we should put a note on the wiki page.

What's happening is that in git the line is indeed commented out, but
then the apt.postgresql.org build scripts will activate the line when
building for sid-pgdg (which is the whole point why that stub logic
got introduced). The idea is that one of the distributions on
apt.postgresql.org should have cassert enabled so the testsuites
exercise more test cases, for the server packages as well as for
extension packages. As sid is Debian's development branch, it made
sense to enable cassert there.

You seem to use the sid-pgdg packages for production data - is there a
reason you are not using jessie-pgdg or stretch-pgdg?

Christoph


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causing big performance issues
@ 2017-06-10 23:15  Stefan Huehner <stefan@huehner.org>
  parent: Christoph Berg <myon@debian.org>
  1 sibling, 0 replies; 4+ messages in thread

From: Stefan Huehner @ 2017-06-10 23:15 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; pgsql-pkg-debian; stefan.huehner@openbravo.com

On Sat, Jun 10, 2017 at 10:21:02PM +0200, Christoph Berg wrote:
> Re: Stefan Huehner 2017-06-10 <20170610132747.GD11504@huehner.biz>
> > In short:
> > The following part from latest changelog:
> >   * debian/rules: Add stub to enable cassert builds (disabled by default).
> > 
> > does not work in practice as in debian/rules file the 
> > 
> > #CASSERT_FLAGS := --enable-cassert
> > 
> > line is not commented out as it should have been.
> > 
> > That causes severe peformance issues at least in our use-case of batch-inserting lots of data with runtime going from ca. 1min to >=6min.
> 
> Hi,
thanks for the fast reply Christoph,
> 
> I'm sorry for not properly announcing and documenting this recent
> change properly, we should put a note on the wiki page.
> 

Yes, please, mqaybe even news entry in the package?
As at least for our use-case that makes the sid-pgdg completely unusable here. As that overhead is not just small percentage but like factor 5-10 slower.

> What's happening is that in git the line is indeed commented out, but
> then the apt.postgresql.org build scripts will activate the line when
> building for sid-pgdg (which is the whole point why that stub logic
> got introduced). The idea is that one of the distributions on
> apt.postgresql.org should have cassert enabled so the testsuites
> exercise more test cases, for the server packages as well as for
> extension packages. As sid is Debian's development branch, it made
> sense to enable cassert there.
> 


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causing big performance issues
@ 2017-06-10 23:33  Andres Freund <andres@anarazel.de>
  parent: Christoph Berg <myon@debian.org>
  1 sibling, 0 replies; 4+ messages in thread

From: Andres Freund @ 2017-06-10 23:33 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; Stefan Huehner <stefan@huehner.org>; pgsql-pkg-debian; stefan.huehner@openbravo.com

On 2017-06-10 22:21:02 +0200, Christoph Berg wrote:
> Re: Stefan Huehner 2017-06-10 <20170610132747.GD11504@huehner.biz>
> > In short:
> > The following part from latest changelog:
> >   * debian/rules: Add stub to enable cassert builds (disabled by default).
> > 
> > does not work in practice as in debian/rules file the 
> > 
> > #CASSERT_FLAGS := --enable-cassert
> > 
> > line is not commented out as it should have been.
> > 
> > That causes severe peformance issues at least in our use-case of batch-inserting lots of data with runtime going from ca. 1min to >=6min.
> 
> Hi,
> 
> I'm sorry for not properly announcing and documenting this recent
> change properly, we should put a note on the wiki page.
> 
> What's happening is that in git the line is indeed commented out, but
> then the apt.postgresql.org build scripts will activate the line when
> building for sid-pgdg (which is the whole point why that stub logic
> got introduced). The idea is that one of the distributions on
> apt.postgresql.org should have cassert enabled so the testsuites
> exercise more test cases, for the server packages as well as for
> extension packages. As sid is Debian's development branch, it made
> sense to enable cassert there.

FWIW, I think that's a seriously bad default.  We want people to be able
to do performance tests on sid too, and that's just about impossible
with cassert enabled builds.  Besides that, there's plenty people using
sid as their daily driver, while still actually using postgres in some
way.

- Andres


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-06-10 23:33 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-10 13:27 pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causing big performance issues Stefan Huehner <stefan@huehner.org>
2017-06-10 20:21 ` Christoph Berg <myon@debian.org>
2017-06-10 23:15   ` Stefan Huehner <stefan@huehner.org>
2017-06-10 23:33   ` Andres Freund <andres@anarazel.de>

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