sched/order: in a wave a head's image chain starts when the older heads' test waves drain; ten heads stood up to 12 min on it alone (02:49-03:07Z 11-17) #93

Open
opened 2026-11-17 03:10:34 +00:00 by xemmerling · 0 comments
Owner

Not a fault: a measurement of what the line's order costs a head's tail in a wave, for sched::order. Production on f4172b7f, 2026-11-17, 02:00-03:07Z: about 30 head runs of tilo asked an hour, 16-19 open at once, the node full.

What happened

For ten heads asked 02:14-02:32Z the image chain (source-date-ci-fast, then image-ci-fast, then image-ci-fast-smoke and publish-ci-fast) started only at 02:49Z, all within 25 seconds, and each head then stood on that chain alone after every other check of it was told.

job check asked handed to the node waited ran
j594-6547 source-date-ci-fast 02:14:11 02:14:15 4 s 1 s
j594-6803 source-date-ci-fast 02:14:18 02:49:11 34.9 min 1 s
j594-7015 source-date-ci-fast 02:16:26 02:49:15 32.8 min 5 s
j594-9775 source-date-ci-fast 02:30:57 02:49:32 18.6 min 20 s
j594-6682 image-ci-fast 02:14:17 02:49:10 34.9 min 9.4 min

CI jobs asked 02:14-02:45Z that waited over 15 minutes for the node: source-date-ci-fast 14 (median 23.7 min), relay-upgrade 11 (25.4), cloud-rystic-build 7 (22.9), and one each of image-ci-fast, sdk-native-build, docs-examples-build, docs-reference-bins, docs-reference. All of the first batch were handed out 02:49:09-02:49:35Z; a second batch (asked 02:41-02:52Z) at 02:59:40-43Z. In the same half hour 2,374 test/* jobs asked after 02:20Z were started, median wait 340 s.

The jobs view at 02:39:38Z shows why: one line, every one of these jobs waits for room at places 914-1,132, where its run stands; the test jobs ahead of them are the older heads' shards, asked as their binaries were built. That is the order as sched/order.rs states it (tier, the session's cores, the run, the oldest first), working as written.

What it cost

When the head's last verdict outside the image chain was told, against the chain's last verdict:

head asked last other verdict image chain's last verdict stood on the chain alone
r9167a22173 02:31:37 02:55:34 03:07:25 11.8 min
re107dc65bd 02:18:14 02:57:55 03:07:28 9.5 min
r857eacb64c 02:20:32 02:58:29 03:07:28 9.0 min
r9c1e4520c3 02:24:00 02:59:26 03:07:28 8.0 min
r238f54ebc4 02:17:41 02:55:04 02:59:06 4.0 min
r3d9c7cf800 02:16:26 02:55:03 02:59:02 4.0 min
rc2f6de6960 02:14:18 02:55:06 02:58:58 3.9 min
rac61b4a78b 02:25:01 03:04:35 03:07:26 2.9 min
r0ba64cbb5e 02:14:10 03:00:28 03:00:46 0.3 min
rd9c95fa2a9 02:26:38 03:05:22 02:49:52 (skipped) 0

About 53 head-minutes over ten heads, 5 minutes a head on verdicts of 41-49 minutes. The chain is a head's longest run of needs: one second of source-date-ci-fast, then 8.1-9.7 minutes of image-ci-fast on two cores in a VM (steady in every hour since 20:00Z, p50 8.4, p90 9.2), then the smoke and the publish, each standing in the line again (image-ci-fast-smoke waited 564 s at the median in that half hour). Started at the ask, the chain ends about 12 minutes later, long before the head's tests do, and the verdict comes with the last test.

What moving it would take from the others

Ten chains are 10 x 2 cores x 9.5 minutes, about 3.2 core-hours, the same work, earlier: 1.2% of the node for that half hour, out of the older heads' shards.

Question for the order

Within a run the waiting compiles already stand by the longest critical path (spec, "Order within a node"). Across runs a younger head's one-second job at the head of its longest chain of needs stands behind every one-core shard of every older head. Would a run's chain of needs that outlasts some bound (here 10 minutes in sequence, three jobs) stand at the run's place for its first job only when the node is short, or should its first job stand as "work already started" does? I have no patch; this is yours. The files behind the tables: ~/.cache/t-factory/open-heads-0256/, jobs views saved 02:39Z and 03:06Z.

05:28Z 11-17, on a98a041d: the same checks now stand 34-45 minutes, and they are all a head has left

This time the line ahead of them is people's work, not older heads' shards. From 04:30Z one person's session asked 63-82 runs each quarter hour (narrow asks: clippy for the wasm target, single test checks; about 180 source states in 90 minutes), and jobs ended per half hour were, in CPU hours:

half hour from CI people
03:30Z 36.4 34.1
04:00Z 32.0 30.9
04:30Z 19.7 61.5
05:00Z 14.3 54.9

At 05:25Z the eight oldest open heads had told 1,285 to 1,292 of their 1,293 checks and stood 42 to 59 minutes on what was left: image-ci-fast with its smoke and publish, relay-upgrade, cloud-rystic-build. Example: r39e5d37a0d asked 04:25:50Z, its last other verdict came at 04:29:49Z (nearly all answered from kept answers), and its chain's jobs started at 05:24:00Z. Its verdict would have stood about 14 minutes after the ask; it took over an hour. Over the 90 minutes to 05:28Z the wait in line was: source-date-ci-fast 34.4 min at the median and 45.2 at the 90th percentile, relay-upgrade 33.8 at the median, cloud-rystic-build 10.4 and 44.8. In the hour to 05:28Z 25 heads were asked and 7 judged.

So the cost of the chain's place is not five minutes a head in general: it is the whole time the node is short, for heads that need nothing else. People standing first is the rule and I do not question it here; the data is that a head whose every other check is answered holds its verdict for an hour on two cores of work. Files: ~/.cache/t-factory/open-heads-0525/, jobs-view-0510.json.

07:00Z 11-17, on f9cb88e3: CI starts nothing at all

After the 06:30Z start (which ended 34 heads, issue 95) the new heads' work is mostly builds and their first shards, and one person's session holds the node:

started in the five minutes from CI jobs people's jobs
06:25Z 266 404
06:30Z 101 308
06:35Z 31 124
06:40Z 5 25
06:45Z 1 114
06:50Z 0 69
06:55Z 0 101

(Jobs that had ended by 06:59Z, by when they started.) At 07:00Z the node ran 491 jobs of one session, 20 of five other sessions, and 4 of CI with one probe; booked 160 of 157 cores. Among that session's jobs: web-desktop-gate-wasm four times (width about 35), web-desktop-wasm four times (about 30), lounge-gate-binaries twice (about 31), and 50 test/tilo-session, 32 test/tilo-relay, 20 test/notes shards. CI's line holds 1,219 asks; its first twelve are each short by one core, 626 of the line by four cores (the test and clippy builds). CPU hours of jobs ended 06:45Z to 07:00Z: CI 4.3, people 33.4.

People standing first is the rule; this is what it does when one session asks more than the node. Whether CI keeps a share is the user's decision and has been put to them.

08:22Z 11-17: heads are done but for these checks, and none is judged

70 head runs are open, the oldest asked 06:23Z; 6 were judged in the hour to 08:13Z of 26 asked. The eight oldest, read one run at a time (checks planned, told, missing; the missing ones' jobs in the jobs view):

head asked told of 1,296 missing their jobs
r1acb40200e 06:23:49 1,293 test/tilo-session, test/tilo-workspace-host, test/video-editor 2 running, 1 queued for room
r827e173d20 06:35:48 1,294 image-ci-fast-smoke, publish-ci-fast queued for room
r16a188155f 06:38:45 1,295 cloud-rystic-build queued for room
r64b610b95b 06:40:14 1,293 cloud-rystic-build, image-ci-fast-smoke, publish-ci-fast queued for room
r04cf1c4f9a 06:40:37 1,293 cloud-rystic-build, image-ci-fast-smoke, publish-ci-fast queued for room
r89bac94ede 06:41:28 1,294 image-ci-fast-smoke, publish-ci-fast queued for room
r06a8aea648 06:42:58 1,293 image-ci-fast, image-ci-fast-smoke, publish-ci-fast queued for room
r26ab6b9500 06:43:27 1,295 cloud-rystic-build queued for room

Seven of the eight have nothing left but one to three command checks of a few cores, and have stood on them for about 100 minutes. Each of these heads would be judged minutes after those jobs start; they stand in the line behind the newer heads' builds and shards and behind people's jobs, on a node booked to its offer.

Beside them 119 probe runs are open, the oldest asked 02:39Z (single checks, each queued for room; 443 probe jobs wait), and 5 idle runs, the oldest from 01:37Z.

14:06Z 11-17 (production 2868c3f2): six hours measured. A head's verdict waits about an hour for a one-second job to get a place.

Each head's own source-date-ci-fast is the first link of its image chain. CI jobs of the chain and of the other late command checks over the six hours to 14:03Z (t.job_history):

check jobs wait from ask to start, median p90 longest then runs, median width core-minutes used
source-date-ci-fast 76 96.2 min 112.0 116.0 1 s 2 0.0
image-ci-fast 67 0.1 min 8.6 59.1 557 s 2 10.4
image-ci-fast-smoke 38 2.5 min 50.3 54.2 160 s 1 1.6
publish-ci-fast 15 6.4 min 23.9 24.0 31 s 2 0.1
cloud-rystic-build 67 15.6 min 109.0 116.0 65 s 6 0.5
relay-upgrade 85 28.1 min 111.1 122.1 428 s 9 13.3
all CI jobs 7,248 3.1 min 28.2 21 s

What that does to a head, for the 84 head runs judged in the same six hours that ran their own source-date-ci-fast (of 183 judged):

median p90
asked to verdict 119 min 140
asked until source-date-ci-fast started 59 min 112
from its start to the verdict 19 min 62

By the hour of the verdict the wait before it started was 59, 106, 31, 31, 24 and 16 minutes (08:00Z to 13:00Z); it fell after the 10:16Z rollback ended 47 heads and emptied the line, and is rising again.

The line at 14:01:48Z (jobs view; node booked 176 of 155 cores offered, 1,184 ci asks queued): the thirteen queued source-date-ci-fast asks stood at places 209, 1,003, 1,098, 1,716, 1,722, 1,723, 1,730, 1,758, 1,936, 1,940, 1,947, 1,948 and 1,949. r4891dcfaf5, asked 13:17:17Z, had that one ask and nothing else, had run no job in 44 minutes, and stood at place 209; r67ab5ebbf2 (13:19:50Z) at 1,098 and r78185703e4 (13:34:50Z) at 1,722 the same. Ahead of them stand the test shards and policy checks of newer heads: the head asked at 14:00:08Z had its first queued ask at place 180. That fits what the line does with checks a head leaves to the next: they keep the place of the head that left them, while a head's own chain link gets the head's own place, behind all of it.

So the chain's first link is a job that needs one core for one second and decides when everything after it may start. Whatever rule lets it go when it is asked would take about an hour off the median head today, for no core time. The order is yours; I am not changing it.

19:44Z 11-17 (production 2885a521), the same thing with no people's wave to blame. CI had started 2,061 jobs in the quarter hour before and was 0.7 h behind; nine heads were open and one was judged per quarter hour. From the jobs view at 19:44:19Z, what each open head still had:

head asked age what it still had
re1e6c9d6f6 19:00:22Z 44 min one job running: test/tilo-session-client (#74)
r29f9fc8375 19:08:16Z 36 min two jobs running: test/tilo-fs, test/tilo-session-client
r5020f580f2 19:18:41Z 26 min six jobs running; image-ci-fast-smoke and docs-examples queued at places 5 and 6
rf5388a7f75 19:22:50Z 22 min nothing running; source-date-ci-sdk, source-date-ci-fast at places 8 and 9, cloud-rystic-build at 251
r64905e722d 19:23:05Z 21 min nothing running; source-date-ci-fast at place 264, cloud-rystic-build at 291
r6129e1fcd5 19:32:09Z 12 min nothing running; source-date-ci-fast at 295, cloud-rystic-build at 306
r4464805344 19:36:11Z 8 min 189 test asks answered by other runs' jobs; source-date-ci-fast at 307
r31650c8dbb 19:39:47Z 5 min nothing running; source-date-ci-fast at 309, cloud-rystic-build at 312
r921441d595 19:43:26Z 1 min 711 asks queued, holding 295 of the first 300 places

Four heads asked 5 to 22 minutes earlier had nothing left but their chain's first link, and it stood behind the bulk of a head asked one minute before the reading: 497, 699, 711 and 713 asks were ahead of the four source-date-ci-fast asks at places 264 to 309, every one of them an ask of r921441d595. So the newest head's wave is served before older heads' last one-second job. Thirty-nine jobs were on the node, 9 of them CI's.

Followed to 20:06Z. The five source-date-ci-fast jobs started together between 19:47:55Z and 19:48:31Z, once the newest head's bulk had been handed out: 25.1, 25.4, 16.4, 12.3 and 8.7 minutes after they were asked, each then running 2 to 8 seconds. rf5388a7f75 was judged 35 minutes after it was asked, 25 of them before that job started; the two oldest heads were judged at 54 and 46 minutes, in the second their test/tilo-session-client job ended; four of the nine were still open.

21:14Z 11-17: the chain's later link waits the same way. Each link of a head's image chain over the three hours to 21:14Z (t.job_history, CI jobs that ended):

check jobs median wait from ask to start median run median width
source-date-ci-fast 40 7.2 min 0.0 min 2
image-ci-fast 33 0.3 min 9.6 min 2
image-ci-fast-smoke 25 8.4 min 2.9 min 1
cloud-rystic-build 33 3.7 min 1.2 min 10

So a head spends about a quarter of an hour waiting for one core twice, before and after the one link that does work. At 21:14Z twelve heads were open and CI was 1.1 h behind: five heads (18 to 39 minutes old) had nothing left but image-ci-fast-smoke, two of them running it and three queued at places 1, 2 and 3 of the line, each "short by 1 core"; the three oldest (45 to 65 minutes) stood on test/tilo-session-client alone (#74). The node had 155 of 155 cores booked: people's 33 jobs used 89.9 cores and CI's 15 used 66.3 (20 s of cpu.stat). A one-core job at the head of the line waited while another class held the slots, which is #97's rule meeting this chain.

23:32Z 11-17: a restart closed 19 heads that stood on their chain alone

Your promote of 7710cc0d restarted production's server at 23:32:19Z. Seventeen head runs ended between 23:32:38Z and 23:32:40Z and two more by 23:33:32Z, each with its verdict, none with an error, none stopped. What ended in those 19 heads from the restart on (run_events):

check outcome checks what it was told
publish-ci-fast skipped 17 its need image-ci-fast did not pass (Skipped)
image-ci-fast-smoke skipped 16 the same
cloud-rystic-build skipped 16 superseded by a newer head of the branch (cd96b17583, 0653514b58), which publishes instead
source-date-ci-fast skipped 13 superseded, the same wording
image-ci-fast skipped 13 superseded, the same wording
publish-ci-fast pass 1
test/tilo-workspace-host fail 1 a test of its own

Nothing else was open in them. Each head's last other check had ended between 22:58:05Z and 23:28:50Z, so before the restart they had stood open 3.5 to 34.2 minutes (median 22.3; 6.2 head-hours together) on one to five chain checks that were asked, waited in the queue for room (the wave of this issue, with people holding the node, #97), and that a newer head had reached meanwhile.

Why the restart closed them and the newer head did not. Run::superseded_now (src/runs/run.rs) answers the rule "as c is asked", and the sweep asks it of a head it plans (src/ci/sweep.rs:712). A check asked before a newer head reached it stays in the queue afterwards: nothing asks the rule of it again until its run is driven again, which the restart did for all of them at once.

What it costs. No cores, they never started. But the head stays open and unjudged for as long as the queue holds its chain: 19 of the 23 heads open at 23:27Z were only this. It is in a wave, when the chain waits longest, that an older head's verdict waits for a place in the queue it will never use, and those asks stand in the queue before others.

Proposal, small; I will commission it unless you object. When a head reaches a publishing-only check (Db::reach moves the branch's mark for it), the older heads of the branch that have that check asked and not yet started are told superseded by the same rule and in the same words, and their asks leave the queue. The rule itself stays as it is: a newer head that merely exists still leaves nothing, and a check already started goes on.

00:19Z 11-18: no head judged for 47 minutes; 43 of 52 open heads wait for the chain alone

Since the 19 heads the restart closed (23:32Z to 23:33Z) no head run has been judged: the goal line reads 0 judged in each quarter hour at 23:54Z, 00:00Z and 00:10Z, while 49 heads were asked in the hour to 00:13Z and CI's lag went from 0.4 h (22:58Z) to 1.6 h. No job erred; CI holds about a third of the node (46 to 67 cores, people the rest, #97).

For every open head run, its planned checks without a result (one statement over run_events at 00:19Z, set against the jobs view of 00:15Z):

open heads unfinished checks each
19 exactly 1
24 2 to 5
7 6 to 50
2 over 50

What the 43 heads with at most five wait for, by check (heads): cloud-rystic-build 38, publish-ci-fast 24, source-date-ci-fast 23, image-ci-fast-smoke 23, image-ci-fast 23, test/tilo-session-client 4, test/tilo-fs 1, docs-site 1. Of the 19 with exactly one, 15 wait for cloud-rystic-build. The chain's asked links (source-date-ci-fast in 23 heads, cloud-rystic-build in 15) stand queued for room at places 1,420 to 1,474 of the queue (median 1,444), behind the newest head's test asks; the links behind them are not asked yet.

Example: head run ra2c22e5105, asked 23:38:14Z, planned 1,303 checks; by 23:38:17Z 1,291 were left to a newer head, 10 had passed, one was skipped for a secret; it has stood open since on cloud-rystic-build alone.

So tonight the verdict of 43 heads waits for a job of one core and a few seconds at the back of the queue, and each new head that arrives adds one more such head and pushes those places further back. This is both halves of this issue at once: the order (a head's last link behind a newer head's whole fan of tests), and the superseding told only when a run is driven.

I am commissioning the proposal above now rather than waiting longer for an objection: at a head's reach of a publishing-only check, the older heads' asked-and-not-started asks of that check are told superseded in the same words. Nothing lands before t's whole check set and the 250-run take-over test; an objection here stops it. The order itself stays yours.

A display fault seen on the way (separate, small): the jobs view still lists a head's checks that were left to a newer head as queued with no place: for ra2c22e5105 484 items at 00:15Z, 37 minutes after all of them were told skipped. The view's count of waiting asks (and "wait for None" in my readings: 6,178 at 00:15Z) is mostly that.

How that wait ended, read at 00:43Z. The queue drained down to the links: 15 head runs were judged between 00:24Z and 00:43Z, none with an error. Eleven of them ended in the second their own cloud-rystic-build passed; nine of those eleven had run nothing else themselves or next to nothing (summaries of 1 to 12 passes) and had been open 3,169 to 3,610 seconds, 54 minutes at the median, for that one job. So the publishing step ran eleven times in ten minutes for eleven commits that newer heads had long reached, after each head had waited most of an hour for it. With the change being built those asks are told superseded when the newer head reaches the check: no wait and no job.

00:52Z, the change as it is being built (forge branch dev/superseded-at-reach when pushed; nothing landed). It reuses the heads-leave machinery, no new one: Runs::reached is called where Run::superseded_now records a reach and finds this head the newest there; each older live head of the branch whose ask of the check waits unstarted takes it into its left map under the lock that marks a check started (Live::reached_first), its drivers drop the waiting work as for any left check, and its drive tells it in leave's words. One point I sent back in review: the superseding head's ask must stand at the superseded head's place in line, as Live::leave_to_newer lifts every check it leaves. At the newest head's own place no head's link would ever start while heads arrive faster than the queue drains to them (tonight: 49 heads an hour, a link 54 minutes from the front), which is the 2026-10-27 failure your comment there records. So the link keeps the oldest waiting head's place, passes from head to head, and runs once, for the newest head that reached it. sched::order itself is not touched.

What the drained queue then ran, 00:20Z to 00:48Z (all runs, from run_events). 44 head runs were judged in those 28 minutes, none with an error, none stopped. The chain's checks in that time:

check passed skipped failed
source-date-ci-fast 49
cloud-rystic-build 48
image-ci-fast 24 12 (superseded) 1 (tilo's own)
image-ci-fast-smoke 5 25 (its need did not pass)
publish-ci-fast 3 26 (superseded)

So the first links ran once per waiting head, 48 and 49 times, and the image was built 24 times in half an hour, for a chain of which three heads published. With the change the first links are told superseded while they wait, and the chain behind them is never asked in those heads.

A question your af1953d0 raises, yours to answer. It says a tag naming {commit} "is each head's own and always pushed", and keys such a check by the commit. The superseding rule does not look at tags: tonight it left 26 of 29 publish-ci-fast (which pushes sha-{commit}) superseded, as it has since 11-03. My change applies that same rule sooner and changes nothing about which heads it covers. If a commit's own tag must be pushed for every head, the rule needs an exemption for such checks, and then those heads' chains will go on standing in the queue; say so here and I will build the change to match.

01:54Z 11-18: the change is on main, 84cb9365 (not on production)

It is the developer's 830a8252 picked on your d41aae82. What it does, as landed:

  • Where a head records its reach of a publishing-only check and is the newest there (Run::superseded_now with reaching), Runs::reached leaves each older live head's waiting, unstarted ask of that check to it (Live::reached_first, under the lock that marks a check started), and the older run's drive tells it in leave's words; a dependent not yet asked ends through the existing left branch.
  • The superseding head's ask stands at the superseded head's place in line, lifted exactly as Live::leave_to_newer lifts a left check, to the earliest place when one reach supersedes several (Live::lift keeps the earlier). After your 101797e8 that place still orders it among runs; only its rank among jobs at that place is the new longest-first.
  • A run stopped between being superseded and telling it ends telling the check superseded, not Cancelled (your 95f8b4ab's rule, run::drive's last pass).
  • Nothing is stored, no wire type, nothing under src/sched or src/node.

Seven tests in src/ci/tests.rs; the ones for the waiting ask, the three heads' place and the admission order are each red without their part of the change.

Gates. The 250-run take-over test on the commit, from a clean tree on testing, before it landed: "a takeover over 250 open runs led in 16.2s; every one planned again 16.2s after it began, 250 live; peak memory 6225 MiB, the most resident 6233 MiB, 0 MiB above the 6233 MiB at the takeover" (570 s). Then t's whole check set on testing for the candidate on d41aae82: green.

My question about {commit} tags is answered by your d41aae82 (a pass publishes as the run's effect, forward only; an older head's pass moves nothing a newer head moved): nothing to exempt.

Promote. Main's head carries your d41aae82 too, which is on testing since about 01:27Z and not on production. I ship 84cb9365 to testing now (a fast-forward of your pin) and read it there. I will promote main's head myself once the forge run on it is green and testing has served it cleanly, not before 02:30Z and not within 45 minutes of another restart, unless you promote first; if d41aae82 is not ready for production, say so here or pin otherwise, I read both before I promote. After it: heads open on their chain alone, and cloud-rystic-build and source-date-ci-fast runs per hour, against tonight's 48 and 49 in half an hour.

02:36Z 11-18: not promoted; I hold for your 3c246317. Main's head moved to your 3c246317 on top of da23690a (this change and #63's) while my gate waited for the forge run, which your push cancelled; the gate promoted nothing. One restart should carry your scope change and these two, and yours is yours to prove and promote: when you promote main's head they ride with it. If production still serves ab189001 at 03:15Z and testing still serves da23690a, I promote da23690a alone then (an ancestor of main), provided a forge run from 1563 on is green and nothing is said here. If you have moved testing to your head by then I do nothing.

The measure to read after either promote, against production on ab189001 at 02:24Z: 8 of 13 open heads had nothing open but the chain, and in the hour before it image-ci-fast passed 30 times, source-date-ci-fast 30, cloud-rystic-build 28, while publish-ci-fast passed 11 times and was superseded 12.

03:44Z 11-18: live with your promote of 7d7c6593 (03:29:31Z), and it does what it should

In the first fourteen minutes the server logged "superseded by a newer head that reached it" six times, the first at 03:34:26Z (run r02894e289f, cloud-rystic-build), then 03:35:57Z, 03:36:11Z and, for source-date-ci-fast, 03:41:10Z. The chain's checks ended since 03:30Z, all runs:

check passed superseded skipped for its need
cloud-rystic-build 2 4
source-date-ci-fast 4 1
image-ci-fast 1
image-ci-fast-smoke 1
publish-ci-fast 1

Against the hour before on ab189001 (28, 30 and 30 passes of the first three, for 11 publishes), the first links now end told while they wait. Too short a window to give a rate, and your narrower heads change the count of chains too; I read a full hour next and whether a head still publishes in it. The order half of this issue stays open: the one link that remains waits at the oldest superseded head's place, which is the best the lift can give it.

04:30Z 11-18: the first full hour on a build with the fix (7d7c6593, 03:30Z to 04:30Z)

30 head runs were asked in the hour and 27 were judged by 04:31Z, a median 11.2 minutes after they were asked (the longest 19.0). The chain's checks as their finished events tell them, all runs:

check pass superseded by a newer head skipped with its need
source-date-ci-fast 15 15
image-ci-fast 13 15
image-ci-fast-smoke 13 15
cloud-rystic-build 12 17
publish-ci-fast 7 6 15

The server logged "superseded by a newer head that reached it" 54 times in the hour (3, 11, 12, 7, 8, 13 by ten minutes): a waiting check is told as the newer head reaches it and none waits for its own turn first. No head stood open on the chain alone. The hour before the fix had image-ci-fast pass 30 times, source-date-ci-fast 30, cloud-rystic-build 28 and publish-ci-fast 11. The narrower heads of 3c246317 are on the same build, so the two changes are not told apart by these counts.

What stays open is the order half: 13 images were built and 7 published. Six heads built an image and were then superseded at the publish, so an image a newer head publishes instead is still built for nothing. That is the queue order's to settle, not this fix's.

09:19Z 11-18 (production d748ed8d): the order half after a stop of heads (issue 102). Nine heads a few checks short of a verdict stand behind the newest heads' bulk.

After the 32-minute stop of issue 102 the heads came in a burst: two that planned 1,304 checks each (r45c892302c 08:41:46Z, r8a8a34ccf0 08:42:32Z) and seventeen more by 09:15Z. From 08:40Z to 09:20Z two heads were judged (r2769cea34e at 08:53Z after 2.4 minutes, rc59749b3cd at 09:17Z after 35.5), 18 are open and the priority check has CI 1.1 h behind, 0.6 h an hour before. Nothing is stuck: CI started 803 jobs in the 15 minutes to 09:13Z at a median wait of 115 s.

The line at 09:19:27Z (jobs view: CI 79 jobs running and 1,298 asks queued for room, each one core short; people 32 running, none queued; the spare tier 505 queued):

places whose
1 to 547 r8a8a34ccf0 (08:42:32Z): 127 asks, 47 jobs running
569 to 1,324 rc8456a61c8 (08:48:43Z): 194 asks, with single asks of five younger heads among them
1,325 to 1,347 279 asks of the four newest heads (r68f0261e93 09:12:45Z, r665bee75b5 09:13:24Z, r3f97545a20 09:14:02Z, r5789766ff3 09:15:27Z)
1,348 to 1,786 what the nine heads below have left, then the rest of the four newest (604 more) and r738c53d0c1
head asked checks still queued its last one's place queued asks ahead of that of them the four newest heads'
rf214b08e82 08:53:41Z 10 1,474 628 279
rae015f4e88 08:57:25Z 2 1,583 639 279
r05609b08eb 08:58:59Z 1 1,630 643 279
r394bb3b245 08:59:08Z 21 1,644 646 279
r9a5bcb439d 08:59:18Z 4 1,596 640 279
rfc58a070e5 09:00:25Z 1 1,287 318 0
r3533775b0f 09:02:35Z 1 1,736 652 279
r288707e8a8 09:04:16Z 22 1,750 661 279
rd2d7a70432 09:07:23Z 3 1,786 695 310

Six of the nine have at most four checks left, ordinary one-core tests (test/tilo-quick-settings, test/tilo-session, test/tilo-net, test/tilo-session-client, test/tilo-image-policy-check); two of those six also wait for a running rpms-source-x86_64.

How I read it against sched/order.rs (I did not trace each leave): the oldest run first holds for the two wide heads at the front. The 279 asks of heads asked 09:12Z to 09:15Z stand ahead of heads asked 08:53Z to 09:07Z because a check a head leaves to a newer one keeps the leaving head's place (Live::leave_to_newer, reached_first), so the newest heads' bulk stands at an older head's age while what an older head kept for itself stands at its own.

What it costs here: about 640 asks ahead of a head's last check are 12 minutes at the rate CI had before 09:15Z (53 starts a minute) and more since people's wave came back at 09:15Z (people 49 to 75 cores, CI 73 to 86). The six heads with at most four checks left need 12 one-core jobs between them; standing first they would be judged a queue's length earlier and the count of open heads would fall by a third. Data for the order, which is yours. I change nothing here. I read at 09:44Z how the nine ended and add it.

09:44Z 11-18: the nine, 25 minutes on. None of the nine was judged. Four other heads were between 09:17Z and 09:44Z: rc59749b3cd after 35.5 minutes, rd01c49db3e after 10.3, rc8456a61c8 after 50.0 and r679ede4e1f, the last head before the stop, after 90.1.

head open for checks told of planned what is left (jobs view 09:44:22Z)
rae015f4e88 46 min 143 of 147 test/tilo-quick-settings queued, one ask ahead
r05609b08eb 45 min 379 of 380 test/tilo-net queued, three asks ahead; test/click-test-client running
r9a5bcb439d 45 min 87 of 93 all started: rpms-source-x86_64 and four tests running
rfc58a070e5 43 min 91 of 93 rpms-source-x86_64 running
r3533775b0f 41 min 380 of 381 test/tilo-image-policy-check queued, 11 asks ahead
rd2d7a70432 36 min 111 of 117 three checks queued, 34 to 54 asks ahead

The 25 minutes are not the order's alone: from 09:26Z to 09:38Z a people's wave left CI's group 8 to 36 cores (issue 97's last section), and at 09:29Z the asks ahead of these last checks had grown from about 640 to about 1,120. What the order adds is that the heads nearest a verdict waited through all of it behind heads asked after them.

10:20Z 11-18: how the nine ended. Seven were judged between 09:49Z and 10:00Z, 48 to 60 minutes after they were asked: r05609b08eb 50.4, rf214b08e82 55.7, r394bb3b245 51.5, rae015f4e88 54.1, r3533775b0f 50.6, rd2d7a70432 48.3, rfc58a070e5 59.9. Two are still open after 81 and 76 minutes, r9a5bcb439d and r288707e8a8, each on one running test-x86_64/tilo-agent-session job (set up 09:23:59Z and 09:50:21Z; that check's failing CI jobs run up to 64 minutes today), which is tilo's test and not the order's. For comparison, the heads asked from 10:00Z on, with the line short again, were judged after 4.1 to 19.5 minutes (seven heads, 535 to 784 checks planned).

14:33Z 11-18 (production d748ed8d): checks that run for seconds waited 52 to 58 minutes, and two heads' verdicts waited with them.

No stop and no promote this time: an ordinary wave of people's jobs from 13:20Z to 13:47Z (issue 97) and the queue it left. Two heads, from ci_runs and job_history:

head asked judged to verdict
r1ac2ebc872 13:34:50Z 14:33:07Z 58.3 min
r7caa3e2893 13:36:41Z 14:33:08Z 56.5 min

The jobs they ended on:

head check asked started waited ran
r1ac2ebc872 policy/interfaces 13:34:50Z 14:32:56Z 58.1 min 0.2 min
policy/app-window-inputs-contract 13:34:51Z 14:32:46Z 57.9 min 0.3 min
policy/app-resource-action-contract 13:34:51Z 14:28:19Z 53.5 min 0.9 min
r7caa3e2893 policy/formats 13:36:44Z 14:29:18Z 52.6 min 0.3 min
policy/loop-never-blocks 13:36:44Z 14:29:19Z 52.6 min 0.3 min
policy/unit/lock_update 13:36:41Z 14:29:19Z 52.6 min 0.2 min
hakari 13:36:42Z 14:28:29Z 51.8 min 0.7 min
source-date-ci-sdk 13:36:41Z 14:28:18Z 51.6 min 0.1 min
suite-workspace-release 13:36:42Z 14:28:12Z 51.5 min 0.1 min
docs-reference-bins 13:36:43Z 14:28:18Z 51.6 min 3.0 min

Eleven jobs of r7caa3e2893 that were asked in its first three seconds started between 14:28:12Z and 14:29:19Z. They need nothing the head builds, take one core each and ran about eight minutes together. At 14:29Z the six of r1ac2ebc872 stood at places 71 to 232 with 98 asks ahead, 70 of them of ra3c153d500, a head asked two minutes after it.

How the rule gets there, as I read sched/order.rs: within a run the longest job goes first and the short ones fill in around it, so a run's shortest jobs are its last in line; across runs, asks a newer head was left stand at an older head's place. On a full node both put a head's one-core, seconds-long jobs behind everything else, and the head is judged when the line is empty, not when its work is done. These two heads had done their work within minutes and waited most of an hour for the line.

Either of two rules would have judged them some fifty minutes earlier for a few core-minutes: a run's jobs that take one core for seconds start as they are asked, or the jobs that finish a head go before those that do not. The order is yours; this is what it cost today. The reading is a statement per run on job_history (asked, started and ended of its jobs that ended in the last minutes before its verdict).

Not a fault: a measurement of what the line's order costs a head's tail in a wave, for `sched::order`. Production on f4172b7f, 2026-11-17, 02:00-03:07Z: about 30 head runs of tilo asked an hour, 16-19 open at once, the node full. **What happened** For ten heads asked 02:14-02:32Z the image chain (`source-date-ci-fast`, then `image-ci-fast`, then `image-ci-fast-smoke` and `publish-ci-fast`) started only at 02:49Z, all within 25 seconds, and each head then stood on that chain alone after every other check of it was told. | job | check | asked | handed to the node | waited | ran | |---|---|---|---|---|---| | j594-6547 | source-date-ci-fast | 02:14:11 | 02:14:15 | 4 s | 1 s | | j594-6803 | source-date-ci-fast | 02:14:18 | 02:49:11 | 34.9 min | 1 s | | j594-7015 | source-date-ci-fast | 02:16:26 | 02:49:15 | 32.8 min | 5 s | | j594-9775 | source-date-ci-fast | 02:30:57 | 02:49:32 | 18.6 min | 20 s | | j594-6682 | image-ci-fast | 02:14:17 | 02:49:10 | 34.9 min | 9.4 min | CI jobs asked 02:14-02:45Z that waited over 15 minutes for the node: source-date-ci-fast 14 (median 23.7 min), relay-upgrade 11 (25.4), cloud-rystic-build 7 (22.9), and one each of image-ci-fast, sdk-native-build, docs-examples-build, docs-reference-bins, docs-reference. All of the first batch were handed out 02:49:09-02:49:35Z; a second batch (asked 02:41-02:52Z) at 02:59:40-43Z. In the same half hour 2,374 `test/*` jobs asked after 02:20Z were started, median wait 340 s. The jobs view at 02:39:38Z shows why: one line, every one of these jobs `waits for room` at places 914-1,132, where its run stands; the test jobs ahead of them are the older heads' shards, asked as their binaries were built. That is the order as `sched/order.rs` states it (tier, the session's cores, the run, the oldest first), working as written. **What it cost** When the head's last verdict outside the image chain was told, against the chain's last verdict: | head | asked | last other verdict | image chain's last verdict | stood on the chain alone | |---|---|---|---|---| | r9167a22173 | 02:31:37 | 02:55:34 | 03:07:25 | 11.8 min | | re107dc65bd | 02:18:14 | 02:57:55 | 03:07:28 | 9.5 min | | r857eacb64c | 02:20:32 | 02:58:29 | 03:07:28 | 9.0 min | | r9c1e4520c3 | 02:24:00 | 02:59:26 | 03:07:28 | 8.0 min | | r238f54ebc4 | 02:17:41 | 02:55:04 | 02:59:06 | 4.0 min | | r3d9c7cf800 | 02:16:26 | 02:55:03 | 02:59:02 | 4.0 min | | rc2f6de6960 | 02:14:18 | 02:55:06 | 02:58:58 | 3.9 min | | rac61b4a78b | 02:25:01 | 03:04:35 | 03:07:26 | 2.9 min | | r0ba64cbb5e | 02:14:10 | 03:00:28 | 03:00:46 | 0.3 min | | rd9c95fa2a9 | 02:26:38 | 03:05:22 | 02:49:52 (skipped) | 0 | About 53 head-minutes over ten heads, 5 minutes a head on verdicts of 41-49 minutes. The chain is a head's longest run of needs: one second of `source-date-ci-fast`, then 8.1-9.7 minutes of `image-ci-fast` on two cores in a VM (steady in every hour since 20:00Z, p50 8.4, p90 9.2), then the smoke and the publish, each standing in the line again (`image-ci-fast-smoke` waited 564 s at the median in that half hour). Started at the ask, the chain ends about 12 minutes later, long before the head's tests do, and the verdict comes with the last test. **What moving it would take from the others** Ten chains are 10 x 2 cores x 9.5 minutes, about 3.2 core-hours, the same work, earlier: 1.2% of the node for that half hour, out of the older heads' shards. **Question for the order** Within a run the waiting compiles already stand by the longest critical path (spec, "Order within a node"). Across runs a younger head's one-second job at the head of its longest chain of needs stands behind every one-core shard of every older head. Would a run's chain of needs that outlasts some bound (here 10 minutes in sequence, three jobs) stand at the run's place for its first job only when the node is short, or should its first job stand as "work already started" does? I have no patch; this is yours. The files behind the tables: `~/.cache/t-factory/open-heads-0256/`, jobs views saved 02:39Z and 03:06Z. **05:28Z 11-17, on a98a041d: the same checks now stand 34-45 minutes, and they are all a head has left** This time the line ahead of them is people's work, not older heads' shards. From 04:30Z one person's session asked 63-82 runs each quarter hour (narrow asks: clippy for the wasm target, single test checks; about 180 source states in 90 minutes), and jobs ended per half hour were, in CPU hours: | half hour from | CI | people | |---|---|---| | 03:30Z | 36.4 | 34.1 | | 04:00Z | 32.0 | 30.9 | | 04:30Z | 19.7 | 61.5 | | 05:00Z | 14.3 | 54.9 | At 05:25Z the eight oldest open heads had told 1,285 to 1,292 of their 1,293 checks and stood 42 to 59 minutes on what was left: `image-ci-fast` with its smoke and publish, `relay-upgrade`, `cloud-rystic-build`. Example: r39e5d37a0d asked 04:25:50Z, its last other verdict came at 04:29:49Z (nearly all answered from kept answers), and its chain's jobs started at 05:24:00Z. Its verdict would have stood about 14 minutes after the ask; it took over an hour. Over the 90 minutes to 05:28Z the wait in line was: `source-date-ci-fast` 34.4 min at the median and 45.2 at the 90th percentile, `relay-upgrade` 33.8 at the median, `cloud-rystic-build` 10.4 and 44.8. In the hour to 05:28Z 25 heads were asked and 7 judged. So the cost of the chain's place is not five minutes a head in general: it is the whole time the node is short, for heads that need nothing else. People standing first is the rule and I do not question it here; the data is that a head whose every other check is answered holds its verdict for an hour on two cores of work. Files: `~/.cache/t-factory/open-heads-0525/`, `jobs-view-0510.json`. **07:00Z 11-17, on f9cb88e3: CI starts nothing at all** After the 06:30Z start (which ended 34 heads, issue 95) the new heads' work is mostly builds and their first shards, and one person's session holds the node: | started in the five minutes from | CI jobs | people's jobs | |---|---|---| | 06:25Z | 266 | 404 | | 06:30Z | 101 | 308 | | 06:35Z | 31 | 124 | | 06:40Z | 5 | 25 | | 06:45Z | 1 | 114 | | 06:50Z | 0 | 69 | | 06:55Z | 0 | 101 | (Jobs that had ended by 06:59Z, by when they started.) At 07:00Z the node ran 491 jobs of one session, 20 of five other sessions, and 4 of CI with one probe; booked 160 of 157 cores. Among that session's jobs: `web-desktop-gate-wasm` four times (width about 35), `web-desktop-wasm` four times (about 30), `lounge-gate-binaries` twice (about 31), and 50 `test/tilo-session`, 32 `test/tilo-relay`, 20 `test/notes` shards. CI's line holds 1,219 asks; its first twelve are each short by one core, 626 of the line by four cores (the `test` and `clippy` builds). CPU hours of jobs ended 06:45Z to 07:00Z: CI 4.3, people 33.4. People standing first is the rule; this is what it does when one session asks more than the node. Whether CI keeps a share is the user's decision and has been put to them. **08:22Z 11-17: heads are done but for these checks, and none is judged** 70 head runs are open, the oldest asked 06:23Z; 6 were judged in the hour to 08:13Z of 26 asked. The eight oldest, read one run at a time (checks planned, told, missing; the missing ones' jobs in the jobs view): | head | asked | told of 1,296 | missing | their jobs | |---|---|---|---|---| | r1acb40200e | 06:23:49 | 1,293 | test/tilo-session, test/tilo-workspace-host, test/video-editor | 2 running, 1 queued for room | | r827e173d20 | 06:35:48 | 1,294 | image-ci-fast-smoke, publish-ci-fast | queued for room | | r16a188155f | 06:38:45 | 1,295 | cloud-rystic-build | queued for room | | r64b610b95b | 06:40:14 | 1,293 | cloud-rystic-build, image-ci-fast-smoke, publish-ci-fast | queued for room | | r04cf1c4f9a | 06:40:37 | 1,293 | cloud-rystic-build, image-ci-fast-smoke, publish-ci-fast | queued for room | | r89bac94ede | 06:41:28 | 1,294 | image-ci-fast-smoke, publish-ci-fast | queued for room | | r06a8aea648 | 06:42:58 | 1,293 | image-ci-fast, image-ci-fast-smoke, publish-ci-fast | queued for room | | r26ab6b9500 | 06:43:27 | 1,295 | cloud-rystic-build | queued for room | Seven of the eight have nothing left but one to three command checks of a few cores, and have stood on them for about 100 minutes. Each of these heads would be judged minutes after those jobs start; they stand in the line behind the newer heads' builds and shards and behind people's jobs, on a node booked to its offer. Beside them 119 probe runs are open, the oldest asked 02:39Z (single checks, each queued for room; 443 probe jobs wait), and 5 idle runs, the oldest from 01:37Z. **14:06Z 11-17 (production 2868c3f2): six hours measured. A head's verdict waits about an hour for a one-second job to get a place.** Each head's own `source-date-ci-fast` is the first link of its image chain. CI jobs of the chain and of the other late command checks over the six hours to 14:03Z (`t.job_history`): | check | jobs | wait from ask to start, median | p90 | longest | then runs, median | width | core-minutes used | |---|---|---|---|---|---|---|---| | source-date-ci-fast | 76 | 96.2 min | 112.0 | 116.0 | 1 s | 2 | 0.0 | | image-ci-fast | 67 | 0.1 min | 8.6 | 59.1 | 557 s | 2 | 10.4 | | image-ci-fast-smoke | 38 | 2.5 min | 50.3 | 54.2 | 160 s | 1 | 1.6 | | publish-ci-fast | 15 | 6.4 min | 23.9 | 24.0 | 31 s | 2 | 0.1 | | cloud-rystic-build | 67 | 15.6 min | 109.0 | 116.0 | 65 s | 6 | 0.5 | | relay-upgrade | 85 | 28.1 min | 111.1 | 122.1 | 428 s | 9 | 13.3 | | all CI jobs | 7,248 | 3.1 min | 28.2 | | 21 s | | | What that does to a head, for the 84 head runs judged in the same six hours that ran their own `source-date-ci-fast` (of 183 judged): | | median | p90 | |---|---|---| | asked to verdict | 119 min | 140 | | asked until `source-date-ci-fast` started | 59 min | 112 | | from its start to the verdict | 19 min | 62 | By the hour of the verdict the wait before it started was 59, 106, 31, 31, 24 and 16 minutes (08:00Z to 13:00Z); it fell after the 10:16Z rollback ended 47 heads and emptied the line, and is rising again. The line at 14:01:48Z (jobs view; node booked 176 of 155 cores offered, 1,184 ci asks queued): the thirteen queued `source-date-ci-fast` asks stood at places 209, 1,003, 1,098, 1,716, 1,722, 1,723, 1,730, 1,758, 1,936, 1,940, 1,947, 1,948 and 1,949. r4891dcfaf5, asked 13:17:17Z, had that one ask and nothing else, had run no job in 44 minutes, and stood at place 209; r67ab5ebbf2 (13:19:50Z) at 1,098 and r78185703e4 (13:34:50Z) at 1,722 the same. Ahead of them stand the test shards and policy checks of newer heads: the head asked at 14:00:08Z had its first queued ask at place 180. That fits what the line does with checks a head leaves to the next: they keep the place of the head that left them, while a head's own chain link gets the head's own place, behind all of it. So the chain's first link is a job that needs one core for one second and decides when everything after it may start. Whatever rule lets it go when it is asked would take about an hour off the median head today, for no core time. The order is yours; I am not changing it. **19:44Z 11-17 (production 2885a521), the same thing with no people's wave to blame.** CI had started 2,061 jobs in the quarter hour before and was 0.7 h behind; nine heads were open and one was judged per quarter hour. From the jobs view at 19:44:19Z, what each open head still had: | head | asked | age | what it still had | |---|---|---|---| | re1e6c9d6f6 | 19:00:22Z | 44 min | one job running: `test/tilo-session-client` (#74) | | r29f9fc8375 | 19:08:16Z | 36 min | two jobs running: `test/tilo-fs`, `test/tilo-session-client` | | r5020f580f2 | 19:18:41Z | 26 min | six jobs running; `image-ci-fast-smoke` and `docs-examples` queued at places 5 and 6 | | rf5388a7f75 | 19:22:50Z | 22 min | nothing running; `source-date-ci-sdk`, `source-date-ci-fast` at places 8 and 9, `cloud-rystic-build` at 251 | | r64905e722d | 19:23:05Z | 21 min | nothing running; `source-date-ci-fast` at place 264, `cloud-rystic-build` at 291 | | r6129e1fcd5 | 19:32:09Z | 12 min | nothing running; `source-date-ci-fast` at 295, `cloud-rystic-build` at 306 | | r4464805344 | 19:36:11Z | 8 min | 189 test asks answered by other runs' jobs; `source-date-ci-fast` at 307 | | r31650c8dbb | 19:39:47Z | 5 min | nothing running; `source-date-ci-fast` at 309, `cloud-rystic-build` at 312 | | r921441d595 | 19:43:26Z | 1 min | 711 asks queued, holding 295 of the first 300 places | Four heads asked 5 to 22 minutes earlier had nothing left but their chain's first link, and it stood behind the bulk of a head asked one minute before the reading: 497, 699, 711 and 713 asks were ahead of the four `source-date-ci-fast` asks at places 264 to 309, every one of them an ask of r921441d595. So the newest head's wave is served before older heads' last one-second job. Thirty-nine jobs were on the node, 9 of them CI's. **Followed to 20:06Z.** The five `source-date-ci-fast` jobs started together between 19:47:55Z and 19:48:31Z, once the newest head's bulk had been handed out: 25.1, 25.4, 16.4, 12.3 and 8.7 minutes after they were asked, each then running 2 to 8 seconds. rf5388a7f75 was judged 35 minutes after it was asked, 25 of them before that job started; the two oldest heads were judged at 54 and 46 minutes, in the second their `test/tilo-session-client` job ended; four of the nine were still open. **21:14Z 11-17: the chain's later link waits the same way.** Each link of a head's image chain over the three hours to 21:14Z (`t.job_history`, CI jobs that ended): | check | jobs | median wait from ask to start | median run | median width | |---|---|---|---|---| | source-date-ci-fast | 40 | 7.2 min | 0.0 min | 2 | | image-ci-fast | 33 | 0.3 min | 9.6 min | 2 | | image-ci-fast-smoke | 25 | 8.4 min | 2.9 min | 1 | | cloud-rystic-build | 33 | 3.7 min | 1.2 min | 10 | So a head spends about a quarter of an hour waiting for one core twice, before and after the one link that does work. At 21:14Z twelve heads were open and CI was 1.1 h behind: five heads (18 to 39 minutes old) had nothing left but `image-ci-fast-smoke`, two of them running it and three queued at places 1, 2 and 3 of the line, each "short by 1 core"; the three oldest (45 to 65 minutes) stood on `test/tilo-session-client` alone (#74). The node had 155 of 155 cores booked: people's 33 jobs used 89.9 cores and CI's 15 used 66.3 (20 s of `cpu.stat`). A one-core job at the head of the line waited while another class held the slots, which is #97's rule meeting this chain. ## 23:32Z 11-17: a restart closed 19 heads that stood on their chain alone Your promote of 7710cc0d restarted production's server at 23:32:19Z. Seventeen head runs ended between 23:32:38Z and 23:32:40Z and two more by 23:33:32Z, each with its verdict, none with an error, none stopped. What ended in those 19 heads from the restart on (`run_events`): | check | outcome | checks | what it was told | |---|---|---|---| | `publish-ci-fast` | skipped | 17 | its need image-ci-fast did not pass (Skipped) | | `image-ci-fast-smoke` | skipped | 16 | the same | | `cloud-rystic-build` | skipped | 16 | superseded by a newer head of the branch (cd96b17583, 0653514b58), which publishes instead | | `source-date-ci-fast` | skipped | 13 | superseded, the same wording | | `image-ci-fast` | skipped | 13 | superseded, the same wording | | `publish-ci-fast` | pass | 1 | | | `test/tilo-workspace-host` | fail | 1 | a test of its own | Nothing else was open in them. Each head's last other check had ended between 22:58:05Z and 23:28:50Z, so before the restart they had stood open 3.5 to 34.2 minutes (median 22.3; 6.2 head-hours together) on one to five chain checks that were asked, waited in the queue for room (the wave of this issue, with people holding the node, #97), and that a newer head had reached meanwhile. **Why the restart closed them and the newer head did not.** `Run::superseded_now` (`src/runs/run.rs`) answers the rule "as `c` is asked", and the sweep asks it of a head it plans (`src/ci/sweep.rs:712`). A check asked before a newer head reached it stays in the queue afterwards: nothing asks the rule of it again until its run is driven again, which the restart did for all of them at once. **What it costs.** No cores, they never started. But the head stays open and unjudged for as long as the queue holds its chain: 19 of the 23 heads open at 23:27Z were only this. It is in a wave, when the chain waits longest, that an older head's verdict waits for a place in the queue it will never use, and those asks stand in the queue before others. **Proposal, small; I will commission it unless you object.** When a head reaches a publishing-only check (`Db::reach` moves the branch's mark for it), the older heads of the branch that have that check asked and not yet started are told superseded by the same rule and in the same words, and their asks leave the queue. The rule itself stays as it is: a newer head that merely exists still leaves nothing, and a check already started goes on. ## 00:19Z 11-18: no head judged for 47 minutes; 43 of 52 open heads wait for the chain alone Since the 19 heads the restart closed (23:32Z to 23:33Z) no head run has been judged: the goal line reads 0 judged in each quarter hour at 23:54Z, 00:00Z and 00:10Z, while 49 heads were asked in the hour to 00:13Z and CI's lag went from 0.4 h (22:58Z) to 1.6 h. No job erred; CI holds about a third of the node (46 to 67 cores, people the rest, #97). For every open head run, its planned checks without a result (one statement over `run_events` at 00:19Z, set against the jobs view of 00:15Z): | open heads | unfinished checks each | |---|---| | 19 | exactly 1 | | 24 | 2 to 5 | | 7 | 6 to 50 | | 2 | over 50 | What the 43 heads with at most five wait for, by check (heads): `cloud-rystic-build` 38, `publish-ci-fast` 24, `source-date-ci-fast` 23, `image-ci-fast-smoke` 23, `image-ci-fast` 23, `test/tilo-session-client` 4, `test/tilo-fs` 1, `docs-site` 1. Of the 19 with exactly one, 15 wait for `cloud-rystic-build`. The chain's asked links (`source-date-ci-fast` in 23 heads, `cloud-rystic-build` in 15) stand queued for room at places 1,420 to 1,474 of the queue (median 1,444), behind the newest head's test asks; the links behind them are not asked yet. Example: head run ra2c22e5105, asked 23:38:14Z, planned 1,303 checks; by 23:38:17Z 1,291 were left to a newer head, 10 had passed, one was skipped for a secret; it has stood open since on `cloud-rystic-build` alone. So tonight the verdict of 43 heads waits for a job of one core and a few seconds at the back of the queue, and each new head that arrives adds one more such head and pushes those places further back. This is both halves of this issue at once: the order (a head's last link behind a newer head's whole fan of tests), and the superseding told only when a run is driven. **I am commissioning the proposal above now** rather than waiting longer for an objection: at a head's reach of a publishing-only check, the older heads' asked-and-not-started asks of that check are told superseded in the same words. Nothing lands before t's whole check set and the 250-run take-over test; an objection here stops it. The order itself stays yours. **A display fault seen on the way (separate, small):** the jobs view still lists a head's checks that were left to a newer head as queued with no place: for ra2c22e5105 484 items at 00:15Z, 37 minutes after all of them were told skipped. The view's count of waiting asks (and "wait for None" in my readings: 6,178 at 00:15Z) is mostly that. **How that wait ended, read at 00:43Z.** The queue drained down to the links: 15 head runs were judged between 00:24Z and 00:43Z, none with an error. Eleven of them ended in the second their own `cloud-rystic-build` passed; nine of those eleven had run nothing else themselves or next to nothing (summaries of 1 to 12 passes) and had been open 3,169 to 3,610 seconds, 54 minutes at the median, for that one job. So the publishing step ran eleven times in ten minutes for eleven commits that newer heads had long reached, after each head had waited most of an hour for it. With the change being built those asks are told superseded when the newer head reaches the check: no wait and no job. **00:52Z, the change as it is being built (forge branch `dev/superseded-at-reach` when pushed; nothing landed).** It reuses the heads-leave machinery, no new one: `Runs::reached` is called where `Run::superseded_now` records a reach and finds this head the newest there; each older live head of the branch whose ask of the check waits unstarted takes it into its `left` map under the lock that marks a check started (`Live::reached_first`), its drivers drop the waiting work as for any left check, and its drive tells it in `leave`'s words. One point I sent back in review: the superseding head's ask must stand at the superseded head's place in line, as `Live::leave_to_newer` lifts every check it leaves. At the newest head's own place no head's link would ever start while heads arrive faster than the queue drains to them (tonight: 49 heads an hour, a link 54 minutes from the front), which is the 2026-10-27 failure your comment there records. So the link keeps the oldest waiting head's place, passes from head to head, and runs once, for the newest head that reached it. `sched::order` itself is not touched. **What the drained queue then ran, 00:20Z to 00:48Z (all runs, from `run_events`).** 44 head runs were judged in those 28 minutes, none with an error, none stopped. The chain's checks in that time: | check | passed | skipped | failed | |---|---|---|---| | `source-date-ci-fast` | 49 | | | | `cloud-rystic-build` | 48 | | | | `image-ci-fast` | 24 | 12 (superseded) | 1 (tilo's own) | | `image-ci-fast-smoke` | 5 | 25 (its need did not pass) | | | `publish-ci-fast` | 3 | 26 (superseded) | | So the first links ran once per waiting head, 48 and 49 times, and the image was built 24 times in half an hour, for a chain of which three heads published. With the change the first links are told superseded while they wait, and the chain behind them is never asked in those heads. **A question your af1953d0 raises, yours to answer.** It says a tag naming `{commit}` "is each head's own and always pushed", and keys such a check by the commit. The superseding rule does not look at tags: tonight it left 26 of 29 `publish-ci-fast` (which pushes `sha-{commit}`) superseded, as it has since 11-03. My change applies that same rule sooner and changes nothing about which heads it covers. If a commit's own tag must be pushed for every head, the rule needs an exemption for such checks, and then those heads' chains will go on standing in the queue; say so here and I will build the change to match. ## 01:54Z 11-18: the change is on main, 84cb9365 (not on production) It is the developer's 830a8252 picked on your d41aae82. What it does, as landed: - Where a head records its reach of a publishing-only check and is the newest there (`Run::superseded_now` with `reaching`), `Runs::reached` leaves each older live head's waiting, unstarted ask of that check to it (`Live::reached_first`, under the lock that marks a check started), and the older run's drive tells it in `leave`'s words; a dependent not yet asked ends through the existing `left` branch. - The superseding head's ask stands at the superseded head's place in line, lifted exactly as `Live::leave_to_newer` lifts a left check, to the earliest place when one reach supersedes several (`Live::lift` keeps the earlier). After your 101797e8 that place still orders it among runs; only its rank among jobs at that place is the new longest-first. - A run stopped between being superseded and telling it ends telling the check superseded, not Cancelled (your 95f8b4ab's rule, `run::drive`'s last pass). - Nothing is stored, no wire type, nothing under `src/sched` or `src/node`. Seven tests in `src/ci/tests.rs`; the ones for the waiting ask, the three heads' place and the admission order are each red without their part of the change. **Gates.** The 250-run take-over test on the commit, from a clean tree on testing, before it landed: "a takeover over 250 open runs led in 16.2s; every one planned again 16.2s after it began, 250 live; peak memory 6225 MiB, the most resident 6233 MiB, 0 MiB above the 6233 MiB at the takeover" (570 s). Then t's whole check set on testing for the candidate on d41aae82: green. **My question about `{commit}` tags is answered by your d41aae82** (a pass publishes as the run's effect, forward only; an older head's pass moves nothing a newer head moved): nothing to exempt. **Promote.** Main's head carries your d41aae82 too, which is on testing since about 01:27Z and not on production. I ship 84cb9365 to testing now (a fast-forward of your pin) and read it there. I will promote main's head myself once the forge run on it is green and testing has served it cleanly, not before 02:30Z and not within 45 minutes of another restart, unless you promote first; if d41aae82 is not ready for production, say so here or pin otherwise, I read both before I promote. After it: heads open on their chain alone, and `cloud-rystic-build` and `source-date-ci-fast` runs per hour, against tonight's 48 and 49 in half an hour. **02:36Z 11-18: not promoted; I hold for your 3c246317.** Main's head moved to your 3c246317 on top of da23690a (this change and #63's) while my gate waited for the forge run, which your push cancelled; the gate promoted nothing. One restart should carry your scope change and these two, and yours is yours to prove and promote: when you promote main's head they ride with it. If production still serves ab189001 at 03:15Z and testing still serves da23690a, I promote da23690a alone then (an ancestor of main), provided a forge run from 1563 on is green and nothing is said here. If you have moved testing to your head by then I do nothing. The measure to read after either promote, against production on ab189001 at 02:24Z: 8 of 13 open heads had nothing open but the chain, and in the hour before it `image-ci-fast` passed 30 times, `source-date-ci-fast` 30, `cloud-rystic-build` 28, while `publish-ci-fast` passed 11 times and was superseded 12. ## 03:44Z 11-18: live with your promote of 7d7c6593 (03:29:31Z), and it does what it should In the first fourteen minutes the server logged "superseded by a newer head that reached it" six times, the first at 03:34:26Z (run r02894e289f, `cloud-rystic-build`), then 03:35:57Z, 03:36:11Z and, for `source-date-ci-fast`, 03:41:10Z. The chain's checks ended since 03:30Z, all runs: | check | passed | superseded | skipped for its need | |---|---|---|---| | `cloud-rystic-build` | 2 | 4 | | | `source-date-ci-fast` | 4 | 1 | | | `image-ci-fast` | | 1 | | | `image-ci-fast-smoke` | | | 1 | | `publish-ci-fast` | | | 1 | Against the hour before on ab189001 (28, 30 and 30 passes of the first three, for 11 publishes), the first links now end told while they wait. Too short a window to give a rate, and your narrower heads change the count of chains too; I read a full hour next and whether a head still publishes in it. The order half of this issue stays open: the one link that remains waits at the oldest superseded head's place, which is the best the lift can give it. ## 04:30Z 11-18: the first full hour on a build with the fix (7d7c6593, 03:30Z to 04:30Z) 30 head runs were asked in the hour and 27 were judged by 04:31Z, a median 11.2 minutes after they were asked (the longest 19.0). The chain's checks as their finished events tell them, all runs: | check | pass | superseded by a newer head | skipped with its need | |---|---|---|---| | source-date-ci-fast | 15 | 15 | | | image-ci-fast | 13 | 15 | | | image-ci-fast-smoke | 13 | | 15 | | cloud-rystic-build | 12 | 17 | | | publish-ci-fast | 7 | 6 | 15 | The server logged "superseded by a newer head that reached it" 54 times in the hour (3, 11, 12, 7, 8, 13 by ten minutes): a waiting check is told as the newer head reaches it and none waits for its own turn first. No head stood open on the chain alone. The hour before the fix had image-ci-fast pass 30 times, source-date-ci-fast 30, cloud-rystic-build 28 and publish-ci-fast 11. The narrower heads of 3c246317 are on the same build, so the two changes are not told apart by these counts. What stays open is the order half: 13 images were built and 7 published. Six heads built an image and were then superseded at the publish, so an image a newer head publishes instead is still built for nothing. That is the queue order's to settle, not this fix's. **09:19Z 11-18 (production d748ed8d): the order half after a stop of heads (issue 102). Nine heads a few checks short of a verdict stand behind the newest heads' bulk.** After the 32-minute stop of issue 102 the heads came in a burst: two that planned 1,304 checks each (r45c892302c 08:41:46Z, r8a8a34ccf0 08:42:32Z) and seventeen more by 09:15Z. From 08:40Z to 09:20Z two heads were judged (r2769cea34e at 08:53Z after 2.4 minutes, rc59749b3cd at 09:17Z after 35.5), 18 are open and the priority check has CI 1.1 h behind, 0.6 h an hour before. Nothing is stuck: CI started 803 jobs in the 15 minutes to 09:13Z at a median wait of 115 s. The line at 09:19:27Z (jobs view: CI 79 jobs running and 1,298 asks queued for room, each one core short; people 32 running, none queued; the spare tier 505 queued): | places | whose | |---|---| | 1 to 547 | r8a8a34ccf0 (08:42:32Z): 127 asks, 47 jobs running | | 569 to 1,324 | rc8456a61c8 (08:48:43Z): 194 asks, with single asks of five younger heads among them | | 1,325 to 1,347 | 279 asks of the four newest heads (r68f0261e93 09:12:45Z, r665bee75b5 09:13:24Z, r3f97545a20 09:14:02Z, r5789766ff3 09:15:27Z) | | 1,348 to 1,786 | what the nine heads below have left, then the rest of the four newest (604 more) and r738c53d0c1 | | head | asked | checks still queued | its last one's place | queued asks ahead of that | of them the four newest heads' | |---|---|---|---|---|---| | rf214b08e82 | 08:53:41Z | 10 | 1,474 | 628 | 279 | | rae015f4e88 | 08:57:25Z | 2 | 1,583 | 639 | 279 | | r05609b08eb | 08:58:59Z | 1 | 1,630 | 643 | 279 | | r394bb3b245 | 08:59:08Z | 21 | 1,644 | 646 | 279 | | r9a5bcb439d | 08:59:18Z | 4 | 1,596 | 640 | 279 | | rfc58a070e5 | 09:00:25Z | 1 | 1,287 | 318 | 0 | | r3533775b0f | 09:02:35Z | 1 | 1,736 | 652 | 279 | | r288707e8a8 | 09:04:16Z | 22 | 1,750 | 661 | 279 | | rd2d7a70432 | 09:07:23Z | 3 | 1,786 | 695 | 310 | Six of the nine have at most four checks left, ordinary one-core tests (`test/tilo-quick-settings`, `test/tilo-session`, `test/tilo-net`, `test/tilo-session-client`, `test/tilo-image-policy-check`); two of those six also wait for a running `rpms-source-x86_64`. How I read it against `sched/order.rs` (I did not trace each leave): the oldest run first holds for the two wide heads at the front. The 279 asks of heads asked 09:12Z to 09:15Z stand ahead of heads asked 08:53Z to 09:07Z because a check a head leaves to a newer one keeps the leaving head's place (`Live::leave_to_newer`, `reached_first`), so the newest heads' bulk stands at an older head's age while what an older head kept for itself stands at its own. What it costs here: about 640 asks ahead of a head's last check are 12 minutes at the rate CI had before 09:15Z (53 starts a minute) and more since people's wave came back at 09:15Z (people 49 to 75 cores, CI 73 to 86). The six heads with at most four checks left need 12 one-core jobs between them; standing first they would be judged a queue's length earlier and the count of open heads would fall by a third. Data for the order, which is yours. I change nothing here. I read at 09:44Z how the nine ended and add it. **09:44Z 11-18: the nine, 25 minutes on.** None of the nine was judged. Four other heads were between 09:17Z and 09:44Z: rc59749b3cd after 35.5 minutes, rd01c49db3e after 10.3, rc8456a61c8 after 50.0 and r679ede4e1f, the last head before the stop, after 90.1. | head | open for | checks told of planned | what is left (jobs view 09:44:22Z) | |---|---|---|---| | rae015f4e88 | 46 min | 143 of 147 | `test/tilo-quick-settings` queued, one ask ahead | | r05609b08eb | 45 min | 379 of 380 | `test/tilo-net` queued, three asks ahead; `test/click-test-client` running | | r9a5bcb439d | 45 min | 87 of 93 | all started: `rpms-source-x86_64` and four tests running | | rfc58a070e5 | 43 min | 91 of 93 | `rpms-source-x86_64` running | | r3533775b0f | 41 min | 380 of 381 | `test/tilo-image-policy-check` queued, 11 asks ahead | | rd2d7a70432 | 36 min | 111 of 117 | three checks queued, 34 to 54 asks ahead | The 25 minutes are not the order's alone: from 09:26Z to 09:38Z a people's wave left CI's group 8 to 36 cores (issue 97's last section), and at 09:29Z the asks ahead of these last checks had grown from about 640 to about 1,120. What the order adds is that the heads nearest a verdict waited through all of it behind heads asked after them. **10:20Z 11-18: how the nine ended.** Seven were judged between 09:49Z and 10:00Z, 48 to 60 minutes after they were asked: r05609b08eb 50.4, rf214b08e82 55.7, r394bb3b245 51.5, rae015f4e88 54.1, r3533775b0f 50.6, rd2d7a70432 48.3, rfc58a070e5 59.9. Two are still open after 81 and 76 minutes, r9a5bcb439d and r288707e8a8, each on one running `test-x86_64/tilo-agent-session` job (set up 09:23:59Z and 09:50:21Z; that check's failing CI jobs run up to 64 minutes today), which is tilo's test and not the order's. For comparison, the heads asked from 10:00Z on, with the line short again, were judged after 4.1 to 19.5 minutes (seven heads, 535 to 784 checks planned). **14:33Z 11-18 (production d748ed8d): checks that run for seconds waited 52 to 58 minutes, and two heads' verdicts waited with them.** No stop and no promote this time: an ordinary wave of people's jobs from 13:20Z to 13:47Z (issue 97) and the queue it left. Two heads, from `ci_runs` and `job_history`: | head | asked | judged | to verdict | |---|---|---|---| | r1ac2ebc872 | 13:34:50Z | 14:33:07Z | 58.3 min | | r7caa3e2893 | 13:36:41Z | 14:33:08Z | 56.5 min | The jobs they ended on: | head | check | asked | started | waited | ran | |---|---|---|---|---|---| | r1ac2ebc872 | `policy/interfaces` | 13:34:50Z | 14:32:56Z | 58.1 min | 0.2 min | | | `policy/app-window-inputs-contract` | 13:34:51Z | 14:32:46Z | 57.9 min | 0.3 min | | | `policy/app-resource-action-contract` | 13:34:51Z | 14:28:19Z | 53.5 min | 0.9 min | | r7caa3e2893 | `policy/formats` | 13:36:44Z | 14:29:18Z | 52.6 min | 0.3 min | | | `policy/loop-never-blocks` | 13:36:44Z | 14:29:19Z | 52.6 min | 0.3 min | | | `policy/unit/lock_update` | 13:36:41Z | 14:29:19Z | 52.6 min | 0.2 min | | | `hakari` | 13:36:42Z | 14:28:29Z | 51.8 min | 0.7 min | | | `source-date-ci-sdk` | 13:36:41Z | 14:28:18Z | 51.6 min | 0.1 min | | | `suite-workspace-release` | 13:36:42Z | 14:28:12Z | 51.5 min | 0.1 min | | | `docs-reference-bins` | 13:36:43Z | 14:28:18Z | 51.6 min | 3.0 min | Eleven jobs of r7caa3e2893 that were asked in its first three seconds started between 14:28:12Z and 14:29:19Z. They need nothing the head builds, take one core each and ran about eight minutes together. At 14:29Z the six of r1ac2ebc872 stood at places 71 to 232 with 98 asks ahead, 70 of them of ra3c153d500, a head asked two minutes after it. How the rule gets there, as I read `sched/order.rs`: within a run the longest job goes first and the short ones fill in around it, so a run's shortest jobs are its last in line; across runs, asks a newer head was left stand at an older head's place. On a full node both put a head's one-core, seconds-long jobs behind everything else, and the head is judged when the line is empty, not when its work is done. These two heads had done their work within minutes and waited most of an hour for the line. Either of two rules would have judged them some fifty minutes earlier for a few core-minutes: a run's jobs that take one core for seconds start as they are asked, or the jobs that finish a head go before those that do not. The order is yours; this is what it cost today. The reading is a statement per run on `job_history` (asked, started and ended of its jobs that ended in the last minutes before its verdict).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tilo/t#93
No description provided.