HomePhabricator

Run more functional tests in parallel by default

Description

Run more functional tests in parallel by default

Summary:
Defaults should always provide the best dev experience except in specialized cases.

Bumping test_runner's default jobs from 1/3 of CPUs to all of them translates to a ~58% speed up in time to complete ninja check-functional

More detailed rationale:

https://reviews.bitcoinabc.org/D1473#30006 indicates 1/3 of CPUs was chosen because one job might run multiple nodes but there was no basis for this fraction.

If we look at this more empirically, we find that tests with num_nodes set to 1 make up ~68%, 2 is ~21%, and 3+ is ~11% of tests. This suggests we can be more aggressive with the number of default jobs and by not doing so we are wasting valuable dev time.

On my machine (16 cpus), ninja check-functional completed in this amount of time per fraction of cpus:
1/3 = 255s
1/2 = 180s
3/5 = 162s
2/3 = 163s
cpus-1 = 122s
cpus = 106s
cpus+1 = 98s

Given the above, we can actually be way more aggressive than some fraction of CPUs. I suspect this is because a lot of time is spent on tests waiting and for I/O operations to complete.

Test Plan:

ninja check-functional

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: PiRK, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17330

Details

Provenance
roqqitAuthored on Mon, Dec 9, 21:52
roqqitPushed on Tue, Dec 10, 18:08
Reviewer
Restricted Owners Package
Differential Revision
D17330: Run more functional tests in parallel by default
Parents
rABCaeee696108b5: Remove incorrect note in functional tests doc
Branches
Unknown
Tags
Unknown