Review main Merged

95057[TASK] Rebalance functional test job sharding

Stefan Bürk CR +2 V +2 Easy +3 −3 updated 08/06/26, 16:22

Commit message

The functional stage dominates both pipelines: it accounts for 89
percent of the nightly job seconds, and a pipeline lasts as long as
its slowest shard. The shard count per database variant is uniform,
though, while the cost per variant is not - a postgres shard runs
about 1.7 times as long as a mariadb shard, yet both variants split
into 6.

Raise the two nightly postgres variants from 6 to 10 shards, the value
pre-merge already uses for postgres, and pre-merge sqlite from 3 to 4.

Measured on an otherwise idle CI, nightly 105802 against 105808, which
differ only by this change:

- pipeline 679s to 483s, from more than eleven minutes to eight
- the critical path moves off the database matrix: previously
  "functional postgres 18 max" at 673s, now the "e2e playwright
  composer sqlite" job at 482s
- slowest shard of "postgres 18 max" 673s to 464s, of
  "postgres 10 min" 624s to 427s

Pre-merge, pipelines 105806 and 105807 pushed within the same minute,
drops from 518s to 416s. Its slowest sqlite shard goes from 515s to
413s and thereby reaches the postgres shards at 411s, so that pipeline
is now balanced at its bound as well.

Sharding is not free, though. The overhead per job outside phpunit is
only about 24s and the per-test throughput is unchanged at 0.249s, but
the phpunit runtime summed over all shards of a variant grows from
3487s across 6 chunks to 3859s across 10 for exactly the same tests,
because every additional chunk re-pays the per-chunk warm-up. Together
with the eight additional jobs the nightly aggregate rises by 6.6
percent, from 21103s to 22493s. This trades runner CPU on the shared
infrastructure for pipeline wall-clock, which is a deliberate choice
and the reason the counts are not raised further.

They are picked against the new bound instead: at 464s the slowest
postgres shard just fits below the 482s playwright job, so fewer
shards would exceed it while more would not shorten the pipeline. The
counts stay hand-tuned; deriving them from recorded runtimes instead
of test counts remains a follow-up, which the JUnit reports the jobs
now write make possible.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • Simon Schaufelberger +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • Simon Schaufelberger +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 913

  1. Stefan Bürk uploaded patch set 1 08/01/26, 16:25

  2. core-ci voted on patch set 1 V +1 08/01/26, 16:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105807

  3. core-ci commented on patch set 1 08/01/26, 16:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105808

  4. Stefan Bürk updated the commit message in patch set 2 V +1 08/01/26, 17:20

  5. core-ci voted on patch set 2 V +1 08/01/26, 17:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105809

  6. core-ci commented on patch set 2 08/01/26, 17:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105810

  7. Stefan Bürk wrote 08/01/26, 19:29

    Topic set to core-ci
  8. Simon Schaufelberger voted on patch set 2 CR +1 V +1 08/02/26, 08:47

  9. Oliver Klee voted on patch set 2 CR +1 V +1 08/02/26, 08:48

  10. Wouter Wolters voted on patch set 2 CR +1 V +1 08/04/26, 19:44

  11. Benni Mack voted on patch set 2 CR +1 V +1 08/06/26, 16:11

  12. Stefan Bürk voted on patch set 2 CR +2 V +2 08/06/26, 16:22

  13. Stefan Bürk merged patch set 3 08/06/26, 16:22