Tweak gitlab CI concurrency, parallelism and test running order for 11 minute test runs

Created on 21 September 2023, about 1 year ago
Updated 4 October 2023, about 1 year ago

Problem/Motivation

Soft-postponed on the following issues: 📌 Split up update semver tests Fixed

The reason to postpone this is that without the test refactoring, you don't see the effect on overall run times because individual tests 'book end' the test runs, overrunning all the other tests by up to 3-5 minutes in some cases, this obscures all perceived performance improvements (or regressions) from tweaking the runners.

After the various issues above, we still have several individual functional tests that require 6 minutes to run on gitlab (down from ~13 minutes for InstallUninstallTest and 7-9 minutes for some of the others), but we'll be close to or at diminishing returns with the current strategy at that point. Functional test jobs will finish in 4m30-6m with most tests finishing around the same time vs long overhanging jobs.

This leads to a current best case of 11 minute MR test runs give or take job/runner queuing: https://git.drupalcode.org/project/drupal/-/pipelines/24323

Once we get to that, we can then optimise more tests (probably another 30-60s shaved off is achievable with the splitting strategy for a handful of tests) and tweak more gitlab configuration, but with a much better idea of what the actual effects on performance are.

What this issue does:

1. Moves the functional tests to the top of the child pipeline, this ensures that the slowest tests are queued first. i.e. if we need to queue 15 jobs, we might as well have the 6 minute job queued 30-60s quicker than the 3 minute job. Doesn't affect the UI which gitlab appears to handle alphabetically, although it's hard to tell given our icons.

2. Reduces concurrency to 24, this is because I think we might be hitting CPU contention with 32 concurrency, dropping from 32 to 24 is either a performance improvement or at least performance-neutral. @bbrala has been working on getting numbers, but per above summary the amount of book ending/overruns we have currently makes average CPU usage hard to gauge.

3. Increases functional test parallelism from 6 to 7. This means we go from 6*32=192 to 7 * 24=168 functional tests running at once - as discussed above this results in quicker jobs afaict.

4. Creates 2 parallel jobs each for kernel and functional javascript instead of a single job, this balances out the concurrency lowering (for kernel tests, functional javascript stays at the current core level of 15) and also results in overall faster finish times for those two, which would otherwise be the longest running jobs once functional tests are optimized.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

(previous runs as blockers got committed)

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

11.0 🔥

Component
PHPUnit  →

Last updated 1 day ago

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024