Re: slowest tap tests - split or accelerate?
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-01-19T17:03:30Z
Lists: pgsql-hackers
Hi,
On 2022-01-19 11:54:01 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2022-01-18 13:40:40 -0800, Andres Freund wrote:
> >> Maybe we really should do at least the most simplistic caching for initdbs, by
> >> doing one initdb as part of the creation of temp_install. Then Cluster::init
> >> would need logic to only use that if $params{extra} is empty.
>
> > I hacked this together. And the wins are bigger than I thought.
>
> Me too ;-). As I remarked earlier, I'd tried this once before and
> gave up because it didn't seem to be winning much. But that was
> before we had so many initdb's triggered by TAP tests, I think.
What approach did you use? Do you have a better idea than generating
tmp_install/initdb_template?
I for a bit wondered whether initdb should do this internally instead. But it
seemed more work than I wanted to tackle.
The bit in the patch about generating initdb_template in Install.pm definitely
needs to be made conditional, but I don't precisely know on what. The
buildfarm just calls it as
perl install.pl "$installdir
> So this looks like it'll be a nice win for low-end hardware, too.
Nice!
> (Note that all four runs have the "fsync = on" removed from
> 008_fsm_truncation.pl.)
I assume you're planning on comitting that?
Greetings,
Andres Freund
Commits
-
Don't clean initdb files on template creation failure
- 00edb2061fcf 17.0 landed
-
Avoid non-POSIX cp flags
- 1a4fd77db85a 17.0 landed
-
Use "template" data directory in tests
- 252dcb32397f 17.0 landed
-
tests: Consistently use pg_basebackup -cfast --no-sync to accelerate tests.
- 839f9636b374 15.0 landed