pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: John Naylor <jcnaylor@gmail.com>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
Date: Thu, 10 May 2018 17:08:37 -0400
Message-ID: <10623.1525986517@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZzSJpxjteW=+2HD9SKtmMZJs-VqX+scaMg2HG1qA26pA@mail.gmail.com>
References: <20180509153924.32kvslqeqdyco7c5@alvherre.pgsql>
	<8873.1525881373@sss.pgh.pa.us>
	<21138.1525969099@sss.pgh.pa.us>
	<20180510174057.lxvpwbgbbghz2zrm@alap3.anarazel.de>
	<373.1525981024@sss.pgh.pa.us>
	<CA+TgmoZzSJpxjteW=+2HD9SKtmMZJs-VqX+scaMg2HG1qA26pA@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, May 10, 2018 at 3:37 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yeah, I had hoped that this might make a noticeable difference on slower
>> buildfarm animals, but some testing shows that it's more likely to be
>> barely above the noise floor.

> Any idea why?

Well, maybe the noise floor is too high.  I experimented with "make check"
in src/bin/scripts (TAP tests enabled), which does 13 initdb's as of HEAD.
On dromedary's host (an older macOS release), 3 runs each:

HEAD:   1m47.017s 1m49.548s 1m46.805s
+patch: 1m47.188s 1m45.611s 1m51.520s

If you blame that last run on some background task chewing cycles, which
is certainly possible considering I'd neglected to turn off dromedary's
cron job, then there's some gain but not much.  There *is* a clearly
visible win if you measure "initdb -N" in isolation,

HEAD:   0m5.244s 0m5.025s 0m4.930s
+patch: 0m4.785s 0m4.706s 0m4.824s

but it's just not much compared to the other overhead of a TAP test.
These numbers would support the idea that we're saving about 250 ms
per initdb, which times 13 is circa 3 sec, which is comparable to the
inter-run variation I'm seeing in the scripts test.

I have no doubt that it'd add up to something over a lot of buildfarm
runs, but it's certainly no sort of game-changer.

Running on my RHEL6 dev machine, where I customarily use PROVE_FLAGS='-j4'
for check-world runs, src/bin/scripts takes maybe 14.9s on average.  The
patch itself does nothing for that machine of course, but if I simulate
its effect by setting the TZ environment variable, the runtime drops to
14.2s or so.  So again, there'd be some win for developer testing, but
not enough to get anybody excited.

			regards, tom lane




view thread (52+ messages)  latest in thread

Message-ID: <10623.1525986517@sss.pgh.pa.us>
Permalink:  ../10623.1525986517@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10623.1525986517@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andres@anarazel.de, alvherre@2ndquadrant.com, ilmari@ilmari.org, jcnaylor@gmail.com, andreas@proxel.se
  Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
  In-Reply-To: <10623.1525986517@sss.pgh.pa.us>

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

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