[DRAFT] CI: Split up tests evenly on runner VMs - #19084
Open
tonyhutter wants to merge 1 commit into
Open
tonyhutter wants to merge 1 commit into
tonyhutter wants to merge 1 commit into
Conversation
14 tasks
gmelikov
reviewed
Sep 9, 2026
tonyhutter
force-pushed
the
zfs-balance
branch
from
September 9, 2026 16:23
667e8ec to
fff39ee
Compare
behlendorf
reviewed
Sep 9, 2026
14 tasks
behlendorf
force-pushed
the
zfs-balance
branch
from
September 10, 2026 02:17
fff39ee to
60e3e77
Compare
tonyhutter
force-pushed
the
zfs-balance
branch
from
September 10, 2026 17:15
60e3e77 to
85c672d
Compare
behlendorf
reviewed
Sep 10, 2026
tonyhutter
force-pushed
the
zfs-balance
branch
from
September 10, 2026 23:44
85c672d to
0b55345
Compare
Our CI spawns two VMs on each github runner, and runs half the test suite on each. It naively splits up the tests by count, and doesn't take into account how long the individual tests groups take to run. This leads to one VM finishing the test suite before the other. For example, one recent run on Fedora 44: vm1 03:16:28 vm2 02:50:54 This commit attempts to balance the tests on the VMs by runtime. It does this by adding a test completion time database to zfs-tests.sh which is use to portion out the test groups equally. The database is just a big associative array that is generated by the new 'make-testdb.sh' helper script. Just point make-testdb.sh at a test results tarball and it will generate the new test times database. Note that the database will get stale over time and will periodically have to be re-generated (maybe every couple years). It doesn't hurt anything if it is stale though. If a new test is added that is not in the database, zfs-test.sh is smart enough to assign it a default value of whatever the average test runtime is, so it still stays relatively balanced. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
tonyhutter
force-pushed
the
zfs-balance
branch
from
September 14, 2026 16:58
0b55345 to
c3febc0
Compare
Contributor
Author
|
I'm thinking now that I want to get the test times from a single VM running locally. That will isolate the test times from the noisy neighbor problem of running two VMs at once. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Faster CI runs
Description
Our CI spawns two VMs on each github runner, and runs half the test suite on each. It naively splits up the tests by count, and doesn't take into account how long the individual tests groups take to run. This leads to one VM finishing the test suite before the other. For example, one recent run on Fedora 44:
This commit attempts to balance the tests on the VMs by runtime. It does this by adding a test completion time database to
zfs-tests.shwhich is use to portion out the test groups equally. The database is just a big associative array that is generated by the newmake-testdb.shhelper script. Just pointmake-testdb.shat a test results tarball and it will generate the new test times database.Note that the database will get stale over time and will periodically have to be re-generated (maybe every couple years). It doesn't hurt anything if it is stale though. If a new test is added that is not in the database, zfs-test.sh is smart enough to assign it a default value of whatever the average test runtime is, so it still stays relatively balanced.
How Has This Been Tested?
CI showed closer runtimes between vm1 & vm2:
ubuntu22 & alma8 are still 30+min apart though, so marking this as draft. I still need to tune this to pick the right test results to use for the test time database. It's currently using data from Fedora 43 results.
Types of Changes
Checklist
Signed-off-by.