From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: slowest tap tests - split or accelerate? |
Date: | 2022-01-17 18:41:44 |
Message-ID: | 20220117184144.5bfyd3l7koe3rahw@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2021-12-31 11:25:28 -0800, Andres Freund wrote:
> cfbot now runs most tests on windows, the windows task is by far the slowest,
> and the task limitted most in concurrency [2]. Running tap tests is the
> biggest part of that. This is a bigger issue on windows because we don't have
> infrastructure (yet) to run tests in parallel.
>
> There's a few tests which stand out in their slowness, which seem worth
> addressing even if we tackle test parallelism on windows at some point. I
> often find them to be the slowest tests on linux too.
>
> Picking a random successful cfbot run [1] I see the following tap tests taking
> more than 20 seconds:
>
> 67188 ms pg_basebackup t/010_pg_basebackup.pl
> 25751 ms pg_verifybackup t/002_algorithm.pl
The reason these in particular are slow is that they do a lot of
pg_basebackups without either / one-of -cfast / --no-sync. The lack of -cfast
in particularly is responsible for a significant proportion of the test
time. The only reason this didn't cause the tests to take many minutes is that
spread checkpoints only throttle when writing out a buffer and there aren't
that many dirty buffers...
Attached is a patch changing the parameters in all the instances I
found. Testing on a local instance it about halves the runtime of
t/010_pg_basebackup.pl on linux and windows (but there's still a 2x time
difference between the two), it's less when running the tests concurrently CI.
It might be worth having one explicit use of -cspread. Perhaps combined with
an explicit checkpoint beforehand?
Greetings,
Andres Freund
Attachment | Content-Type | Size |
---|---|---|
v1-0001-tests-Consistently-use-pg_basebackup-cfast-no-syn.patch | text/x-diff | 16.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2022-01-17 18:50:04 | Re: Adding CI to our tree |
Previous Message | Andres Freund | 2022-01-17 18:19:46 | Re: Adding CI to our tree |