Page MenuHomePhabricator

Speed up the quibble-for-mediawiki-core-vendor-sqlite-php83 job
Closed, ResolvedPublic

Description

The SQLlite is now the slowest job since we do not run PHPUnit in parallel for those.

Acceptance Criteria:

  • Speed up the SQLlite job by running tests in parallel (with one database per shard)

Event Timeline

Change #1289330 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[integration/quibble@master] WIP: Run SQLite tests in parallel by having one db per worker

https://gerrit.wikimedia.org/r/1289330

Change #1289345 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[mediawiki/core@master] tests: make CleanupWatchlistLabelMemberTest run-order independent

https://gerrit.wikimedia.org/r/1289345

Change #1289345 abandoned by Phedenskog:

[mediawiki/core@master] tests: make CleanupWatchlistLabelMemberTest run-order independent

Reason:

This was just a test commit

https://gerrit.wikimedia.org/r/1289345

Change #1289345 restored by Phedenskog:

[mediawiki/core@master] tests: make CleanupWatchlistLabelMemberTest run-order independent

https://gerrit.wikimedia.org/r/1289345

Change #1289345 merged by jenkins-bot:

[mediawiki/core@master] tests: make CleanupWatchlistLabelMemberTest run-order independent

https://gerrit.wikimedia.org/r/1289345

I benchmarked 1289330. I Measured on a dedicated CI agent (10 CPUs) running the real quibble-for-mediawiki-core-vendor-sqlite-php83 job the way Jenkins runs it,
same image (quibble-bookworm-php83:1.21.0), same arguments, same castor cache, with the patched Quibble package bind mounted over the one in the image.

Two variants, 5 runs each, in shuffled order:

  • serial — QUIBBLE_PHPUNIT_PARALLEL unset, which builds the same plan unpatched Quibble builds on SQLite today
  • parallel — QUIBBLE_PHPUNIT_PARALLEL=1, the behaviour this change enables.

All 20 runs exited 0 and executed 44169 tests, the same count as the last 5 successful production builds of the job.

Agent to itself (1 build on the machine)

variantwhole runPHPUnit with databasePHPUnit databaseless
serial559s (532-563)394s (374-402)87s (85-89)
parallel193s (190-196)92s (87-93)24s (24-28)

Agent shared with 2 other builds (the CI maximum)

variantwhole runPHPUnit with databasePHPUnit databaseless
serial648s (631-685)472s (452-504)102s (97-107)
parallel218s (214-220)108s (104-112)28s (28-29)

Median (min-max) of 5 runs each.

Result: the database suite goes from 394s to 92s idle (4.3x) and from 472s to 108s under load (4.4x). The whole job drops by 366s idle and 430s under
load, about 65% either way. The win does not shrink when the agent is busy, which is the case that decides whether it survives in production.

Overhead added by this change is negligible: seeding the 8 per-worker SQLite databases takes ~0.017s, and the test list split adds ~4.98s.

For reference, the last 5 successful production builds of this job as of the time of running these tests are database suite 435s (229-508), databaseless 102s (56-115), 44169 tests. The
serial bench numbers sit inside that spread, so the baseline is a fair stand in for expected production behaviour

pwangai changed the task status from Open to In Progress.Thu, Sep 10, 5:44 PM

Change #1344973 had a related patch set uploaded (by Hashar; author: Phedenskog):

[mediawiki/core@REL1_46] tests: make CleanupWatchlistLabelMemberTest run-order independent

https://gerrit.wikimedia.org/r/1344973

Change #1344973 merged by jenkins-bot:

[mediawiki/core@REL1_46] tests: make CleanupWatchlistLabelMemberTest run-order independent

https://gerrit.wikimedia.org/r/1344973

Change #1289330 merged by jenkins-bot:

[integration/quibble@master] Run SQLite tests in parallel by having one db per worker

https://gerrit.wikimedia.org/r/1289330

Change #1345121 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/quibble@master] release: Quibble 1.22.0

https://gerrit.wikimedia.org/r/1345121

Change #1345121 merged by jenkins-bot:

[integration/quibble@master] release: Quibble 1.22.0

https://gerrit.wikimedia.org/r/1345121

Change #1351195 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: update Quibble jobs to 1.22

https://gerrit.wikimedia.org/r/1351195

Mentioned in SAL (#wikimedia-releng) [2026-10-05T11:45:45Z] <hashar> Updating jobs to Quibble 1.22 (nodejs still at version 24.x) # T437752 T426684

Change #1351195 merged by jenkins-bot:

[integration/config@master] jjb: update Quibble jobs to 1.22

https://gerrit.wikimedia.org/r/1351195

I have sent a dummy change against mediawiki/core gerrit 92621, commented check php on it to trigger the sqlite variant of the job

The quibble-for-mediawiki-core-vendor-sqlite-php83 job ran in 1m45 secs, versus 6-8 minutes! 🎉 🎆