sched: with the heads' queue thin, main's idle checks took the node whole (95 spare-tier jobs, 1,079 cores by width, in 40 s) and the heads then started 23 jobs in 15 minutes with 430 asks waiting for room #79

Open
opened 2026-11-15 06:33:39 +00:00 by xemmerling · 0 comments
Owner

On t.tilo.so (1b22804f) at 06:14Z on 11-15, as the heads' backlog thinned for the first time in days, main's idle checks took the node whole, and for the next fifteen minutes main's heads started almost nothing while more than 430 of their asks waited for room. Fourteen heads were open, most of them a few checks from their verdict; none finished from 06:13Z to 06:29Z.

What happened

minute (11-15) CI jobs started (cores by width) spare-tier jobs started (cores by width) CI asks queued for room
06:13Z 138 (286) 0 454
06:14Z 140 (431) 95 (1,079) 340
06:15Z to 06:22Z 0 0 131, then 433 to 440
06:23Z to 06:29Z 23 in all 0 440 to 486
06:30Z 120 (132) 0

The 95 spare-tier jobs started between 06:14:20Z and 06:15:00Z: 25 runs of main's idle checks on main's newest head (request.ci: seq 0, reference main, Priority::Probe). By width: lounge-gate-binaries 4 jobs, 376 cores; web-examples 159; web-desktop-wasm 36; sdk-web-qualify 36; goldens 29; real-fuse-relay 28; hakari 22; lounge-gate-cli 22; 20 jobs of test-x86_64/tilolang-tilo; and smaller ones. The node offers 159 cores; granted tokens went from 379 to 1,442 and stayed above 1,000 until 06:22Z. The jobs ran 6 to 18 minutes; 14 were still running at 06:32Z. From 06:13Z to 06:15Z 269 CI jobs had ended (649 cores by width), which is the room they took.

Meanwhile head 56464's last check, test/tilo-session-client, which head 56463 waits on, sat queued; so did the last two to five checks of heads 56509 to 56525.

Over the last 36 hours the spare tier started 139 jobs in all, this burst included, and only one other twenty-minute window had more than 20 (22 at 05:12Z to 05:32Z on 11-14, with 67,138 CI asks queued): with a long queue it never gets room, so this is the first time the rule met a thin queue.

Why I think it is worth a look

sched/order.rs says the spare tier is "work that fills room heads don't need", and ci/triggers.rs that "nothing here looks at room: an idle check is work that fills room main's heads don't need, so its jobs queue behind them". At the instant of 06:14:20Z that held: what the heads had ready was placed first. But a spare-tier job is not taken back, and these are wide and long. Admitted in the gap between two waves of the heads' asks (the next wave was ready seconds later), they held the node for their whole length, at almost seven times its offer by width. At the tail of a backlog every open head is a few checks from done, so that is where a quarter of an hour costs most.

I change nothing here: the order and admission are yours. Two shapes that would have avoided it, for you to weigh: the spare tier takes only the room left once the heads' queued asks are counted in (they were 131 to 340 at that moment), or wide spare-tier jobs wait while any head has an ask waiting for room. How to re-measure: t_pickup_seconds_count{priority} per minute, t_sched_queued_by_wait{kind="room"}, t_node_granted_tokens, and jobs started by class and width from t.job_history and t.jobs.

Added 09:20Z 11-15: spare-tier jobs that hold room and use none. In the 24 hours to 09:18Z these jobs of the spare tier ended at their time limit (t.job_history, cause timed_out):

check jobs minutes each width CPU used what it waited on
run-headless 7 21.6 1 0.6 CPU-minutes each DNS at udp 10.96.0.10:53, refused by its sandbox 148 to 160 times: its egress names none
run-desktop 4 21.6 1 0.6 CPU-minutes each the same
publish-os-dev-x86_64 3 of 3 by 12:27Z 60.5 to 61.5 16 0.8 to 0.9 CPU-minutes each stood in Copying blob to its limit each time (the upload fault of #81): 48.7 core-hours booked, and it returns about forty minutes after each end

The first two are tilo's own declaration and cost little. The third is the shape that matters here: one idle job of the spare tier kept 16 cores booked for an hour. Data only; the planner is yours.

Added 03:42Z 11-16: the same again, larger, on 8d736d69: 162 probe jobs took the node in three minutes and CI then started nothing. Between 03:32:46Z and 03:35:36Z a caller stopped all 29 open head runs of main (t.runs.stop = cancel, oldest first, 2 to 3 s apart; who is not in the server's log). Job launches by the minute from the worker's log, and probe starts from t.jobs and t.job_history:

minute (UTC) CI launches people's probe jobs started their widths summed
03:33 519 7 0
03:34 595 7 0
03:35 304 2 52 688
03:36 0 2 100 786
03:37 0 1 10 100
03:38 0 9 0

At 03:40Z the view read: 84 probe asks running in 44 runs and 52 more queued, 467 CI asks running in 3 runs, 922 CI asks of 2 head runs waiting for room, 4 of people waiting for room, the node healthy and booked 159 of 159 with 205 cores in use. The 82 probe jobs then running summed 1,374 by width and 412 by lease.cores_milli: lounge-gate-binaries 11 jobs at 297, lounge-gate-cli 10 at 200, one canary-ci-builder-browser-test at 159, web-desktop-wasm 12 at 144, layout-check 3 at 139, test 14 at 87. CI ran 7 jobs at 47.

So in the minute the stopped heads' jobs went, the probes were placed on the whole node, and the heads that came after wait behind them. With heads now leaving their unstarted checks to the next head and those checks counting as idle at their commits, a thin queue of heads is the normal state and the probes are many. Data only; the planner is yours.

Added 03:55Z 11-16: the same wave booked twice the node's memory. From Prometheus, one value every three minutes, GiB:

03:33 03:36 03:39 03:42 03:45 03:48 03:51
t_node_booked_memory_bytes 422 555 1,032 986 922 871 779
t_node_kept_memory_bytes 257 235 551 701 654 610 507
t_node_offered_memory_bytes 516 532 517 512 517 520 523
the worker container's working set 232 160 307 487 503 477 431

Booked memory peaked at 1,061 GiB against an offer of 526 (498 was the most in the six hours before), kept memory at 713. The worker's real memory rose to 505 GiB in these samples, against 412 as the most in the six hours before; its cgroup's limit is 620 GiB and its own recorded peak since the pod started at 01:14Z is 593 GiB. Nothing was killed: oom_kill 0 for the worker and both classes, memory pressure 0, no job ended for memory. t_sched_placed_without_room_total rose by one. So the probes' wave was admitted well past the memory the node offers, and the margin to the worker's own limit was real memory's luck, not the booking's. My watch on kept memory over the offer fired (48 of 120 samples in half an hour); a second one now reports if the working set stays at 570 GiB or more.

Added 03:56Z 11-16: eighteen minutes later CI has still started nothing. Job starts by two minutes from t.job_history and t.jobs: 03:32Z CI 1,116; 03:34Z CI 934 and probes 52; 03:36Z CI 0 and probes 110; and CI 0 in every two minutes since, through 03:54Z. At 03:54Z: 58 probe jobs running for a median 19 minutes (widths summed 915: tilo-sh-programs 65, three layout-check at 37 to 57, eleven lounge-gate-binaries at 27), 16 of people, 3 of CI (two clippy-x86_64, one clippy), and 999 CI asks of 6 head runs waiting for room, 65 probe asks behind them. The node reads healthy, booked 159 of 159, 180 cores in use. So the heads asked since 03:35Z cannot start a job until the probes placed in those three minutes end, and those are the long builds. This is the state the heads' new rule makes normal (few open heads, many idle checks), so I think it needs your eye soon.

Correction, 04:06Z 11-16: the probes did not run either. Two people's jobs at width 159 took every compile slot from 03:38:38Z to about 04:00Z. I wrote above that the heads waited behind the probes' long builds. The worker's slot lines say otherwise. Compiles that ended, by the class of their job:

from (UTC) CI people probe
03:38:30 to 03:40 0 199 0
03:40 to 03:50 0 47 1
03:50 to 04:00 0 1,317 0
04:00 to 04:02:44 585 215 302

Of the compiles that ended after 03:38:30Z, 353 of CI's (60%) and 176 of the probes' (58%) had been held for no core free, the longest 1,479 s and 1,581 s; of people's 1,778, 43 were held, each for memory. On the node at 04:01Z the newest head's two clippy drivers (j582-5505, j582-5507) had 3 and 5 wrappers waiting since 03:37Z, no compiler and no slot; the taken-over j582-1642 had 51 wrappers and one compile.

What started at 03:38:38Z: e2e-x1 and e2e-x2 of one of your runs, each at width 159, 13.5 and 13.7 minutes, 64 and 70 CPU-minutes; then tilo-sh-programs at width 65 from 03:51:22Z. In those 22 minutes your runs used 14.0 CPU-hours in 50 jobs, the user's 1.3 in 15.

So the order was: the probes took the node's bookings in three minutes (the table further up stands), then people's wide jobs took the cores from both the probes and CI, and with every booking held by jobs that could not compile, CI started no job from 03:36Z until 04:02Z, 26 minutes. CI's starts are back since 04:02Z (52 CI jobs running at 04:03Z, CPU 80 cores for CI and probes against 78 for people). The memory figures above stand. This belongs with #71 as much as here.

Added 04:53Z 11-16: a clean case of this issue, without people's wide jobs: the next head waited twenty minutes behind probes. At 04:28Z to 04:32Z CI's queue was empty (the view: 3 CI asks waiting, then none), so probes were started: 62 jobs from 04:30Z, 53 from 04:35Z. A head arrived, and at 04:43Z 712 CI asks waited for room beside 783 of the probes'.

from (UTC) CI job starts people's probes' CI compiles ended people's probes'
04:25 6 77 0
04:30 11 70 62 1,297 (to 04:40) 1,655 5,607
04:35 0 51 53
04:40 4 57 0 60 (to 04:50) 718 1,765
04:45 250 40 44

So CI started 21 jobs in the twenty minutes to 04:45Z, and in the ten minutes from 04:40Z it finished 60 compiles against the probes' 1,765. Since 04:20Z, 53% of CI's compiles and 51% of the probes' were held for no core free (people's: none of 4,942). The probes then running were goldens (two at width 62, 20 and 40 minutes old), os-compile-x86_64 (width 37), nested-session (20). With heads leaving their checks to the next head the heads' queue is empty much of the time, so this is now the usual way a head begins: behind whatever the idle tier started in the gap.

09:28Z to 09:48Z 11-16, on b5c5b140: the same wave, read by class of compile

One idle run (t::ci::triggers: idle checks started repo="tilo" sha="844f2f78a0" checks=509 run=r41ba426aa2, 08:46:14Z) waited for room behind CI, as it should, until about 09:14Z, then took what CI's thin queue left. Read from the worker's slot ended lines, each job's class taken from its a job launched line:

class compiles ended compile seconds queued seconds in all queued per second compiled queued over 5 s
probes 5,539 36,729 398,791 10.9 3,705
CI 2,492 12,511 81,597 6.5 1,301
  • In 09:30Z to 09:40Z, when a head's compiles arrived, 1,673 CI compiles queued 76,455 s, 46 s each on average, while probes ended 3,012 compiles in the same ten minutes.
  • CI's job wait p50 over fifteen minutes went from 80 s (09:28Z) to 440 s (09:43Z). At the job level nothing looked wrong: 0 to 39 CI jobs waited for room, booked memory stayed under the offer (413 GB of 564).
  • So the idle tier yields at admission and then holds the compile slots: a head that arrives after the idle run was let in queues compile by compile behind it.

10:50Z to 11:05Z 11-16: one head arriving on a node the idle tier held

After 95 minutes without a push, head run r85dc8aa1bc was asked at 10:50:47Z. Seventeen probe jobs were out and 92 of the head's checks waited for room three seconds later; its jobs then got room quickly (job wait p50 16 to 20 s). In the compile slots, its first fifteen minutes read:

class compiles ended compile seconds queued seconds in all queued per second compiled
CI (this one head) 1,808 9,640 44,001 4.6
probes 2,075 12,621 34,269 2.7

The probes compiled more than the head did in the head's own first quarter hour, and the head's compiles queued 24 s each on average. So the reading of 09:28Z above is not a matter of several heads at once: one head alone meets it.

One thing I drew from the 09:14Z wave I take back, and it never stood in this issue: that it doubled those heads' time to verdict. What a head takes follows one single-core job first (#74, section of 11:35Z); the queueing above is real, its share of a head's time to verdict I have not measured.

20:12Z 11-16 (production 8fb821de): seen again as heads returned, and most of it is the blame walk your ffa05451 reverts

tilo's main was quiet from 14:59Z to 19:55Z. In those hours the node ran probe-class jobs almost alone. Jobs ended, by hour (job_history):

hour (UTC) probe runs started probe job hours probe CPU hours CI job hours people job hours
15 113 34.6 106.4 14.4 0.1
16 76 21.4 91.3
17 36 14.0 48.1
18 26 13.6 45.3
19 35 13.7 50.5 1.7 1.7

(10:00 to 13:00Z: 234, 117, 183 and 167 probe runs an hour.) That is the walk your revert's message describes; I had read the same jobs as idle checks and wide image builds.

Then three heads arrived (19:55:12Z, 20:05:12Z, 20:10:17Z) while about 180 to 195 probe-class jobs were running, 13 probe runs open:

time (UTC) CI queued for room CI running probe-class running
20:04 3 436 185
20:07:19 358 164 193
20:08:00 149 323 194
20:08:40 150 317 191
20:09:32 151 316 184
20:11:38 401 310 179

Each waiting CI job was short of one core (short_by 1,000 millicores, no memory, no disk). At 20:07 to 20:09Z the waiting ones were the first head's test shards (142 of test/…, 6 of test-x86_64/…); at 20:11Z 389 of the 401 were the newest head's first wave. The first head's builds, asked at 19:55:12Z, had started within 32 s, so the hold shows where a head asks hundreds of one-core jobs at once: the probe-class jobs already running keep their cores until they end.

Two things follow. ffa05451 is on main since 20:06Z and not on production, which still serves 8fb821de with eec34cd1 in it; with it promoted the probe runs should fall back to about ten an hour and this table can be read again. And what remains of this issue after that is its first observation alone: an idle wave of 500 checks started while no head is open, met by a head a minute later.

21:10Z 11-16 (production 6ee9a77c since 20:18:45Z, your revert in it): the table read again

Probe runs by when their first job was asked (job_history, priority probe):

first job asked minutes probe runs jobs job hours CPU hours
19:00 to 20:19Z, eec34cd1 live 80 42 494 31.5 109.8
20:20 to 21:09Z, reverted 50 21 197 4.5 12.6

Seven probe jobs were still running at 21:09Z, so the second row is not final.

  • By the hour that is 82 CPU hours of probes before and 15 after. The runs did not fall in number, about 25 an hour against 32: a run now costs 0.6 CPU hours against 2.6. My "about ten an hour" of 20:12Z was wrong on the count; what fell is the load.
  • CI jobs' wait, p50 over 15 minutes: 131 s at 20:13Z, 18 s at 20:28Z, 76 s at 20:43Z, 0 s at 20:58Z. Jobs waiting for room: 70 at 20:13Z (41 ci, 29 probe), 43 at 20:28Z (40 ci, 3 probe), none at 20:43Z and 20:58Z.
  • Heads: six asked and six judged in the hour to 20:58Z. The four judged on this build took 19, 35, 22 and 16 minutes.

What this issue began with, idle checks holding the node as a head arrives, did not show in these 50 minutes: the node stood at 20 to 75 of 159 cores booked with nothing waiting whenever I read it after 20:40Z. It stays open for the next time the heads' queue is thin and a wave of idle checks is on the node.

21:52Z 11-16 (production 6ee9a77c): seen again and measured, forty minutes after the section above

tilo 8e856d7cc8 got its head run r0bdec06a12 at 21:26:24Z and a probe-class run rff9ac7d782 of 68 jobs, every one started between 21:28:00Z and 21:28:09Z: test-idle, the layout checks, web-desktop-wasm, web-examples, the lounge gates, the image and size checks. That run used 17.7 CPU hours in its first twenty minutes. Its costliest jobs (job_history):

check width wall s CPU s
lounge-gate-binaries 22 556 6,244
web-desktop-wasm 127 942 5,315
layout-check/320x568 66 566 5,217
image-ci-builder-x86_64 16 883 5,082
layout-check/390x844 62 580 5,025
layout-check/1280x800 40 526 4,903
app-sizes-x86_64 20 947 4,776
web-examples 141 476 2,908
test-idle 6 1,088 2,799
sdk-web-qualify 46 943 2,110

The node was full two minutes later (159 of 159 booked at 21:30Z) as the next heads' waves came. CI jobs by the ten minutes they were asked, and how long each waited for its start:

asked from CI jobs started p50 s p90 s longest s
21:00Z 365 5 14 21
21:10Z 243 0 21 35
21:20Z 324 0 0 105
21:30Z 235 311 330 355
21:40Z 790 155 236 526

Waiting for room: 7 jobs at 21:30Z, 308 at 21:40Z, 483 at 21:43Z (478 ci, 5 probe). Jobs ended 21:29Z to 21:49Z by class: ci 969 jobs and 10.4 CPU hours, people 105 and 11.1, probe 60 and 19.6.

So a head's jobs asked at 21:30Z stood five minutes behind a check set of the probe class that had started two minutes before them, and the wave after stood two and a half to four. The heads judged on this build took 16 to 35 minutes, so that is a sixth to a third of a head. People's jobs were not touched (p95 0.2 s).

This is data, not a proposal: the order is yours. What the readings say for a rule is only that the idle set's cost is in a dozen wide jobs that all start in the same ten seconds.

22:48Z 11-16 (production 243ff75d since 22:03:58Z): the probe class after the blame change, in a wave of pushes

tilo's main took 25 commits in the 21:00Z hour and 20 in the first 19 minutes of 22:00Z; about 21 heads an hour were asked. Probe runs by the ten minutes their first job was asked (job_history, priority probe):

first job asked from probe runs jobs ended CPU hours
22:00Z 12 48 2.8
22:10Z 2 4 0.0
22:20Z 5 12 1.0
22:30Z (eight minutes) 4 20 0.8

That is about 5 CPU hours of probes an hour, against 15 after the revert and 82 before it. Jobs ended 22:08Z to 22:38Z by class:

class jobs runs CPU hours wait for a start, p50 p90
ci 1,520 22 29.5 160 s 306 s
people 440 132 30.3 0 s 0 s
probe 105 26 13.4 1,200 s 1,224 s

So with 243ff75d the probe class no longer stands in front of CI: its own jobs waited twenty minutes while CI's waited under three, and what CI shares the node with in a wave is people's jobs, which took as much CPU as CI. The heads asked 21:26Z to 21:49Z (behind the idle set of the section above, and across the promote) took 46 to 50 minutes; those asked after 21:56Z took 17 to 28.

For this issue that leaves the one case of the section above: a whole idle check set started two minutes before a head's wave.

10:17Z to 10:37Z 11-17 (production f9cb88e3 since the 10:16Z rollback): two idle checks started as a restart emptied the heads' queue

The start of f9cb88e3 ended 47 open head runs at 10:17:03Z (issue 95). With the heads' asks gone, two checks of main's idle runs asked at 02:56Z and 05:46Z started at once:

job check started cores wanted cores used, 20 s sample at 10:37Z CPU time so far
j599-20 goldens/tilo-app-keeper 10:17:12Z 152 1.8 9,392 s
j599-188 goldens/assistant 10:17:59Z 151 10.5 7,112 s

Both still ran at 10:37Z. CI started 101 and 255 jobs in the five minutes from 10:15Z and from 10:20Z, then none from 10:25Z to 10:35Z, while 959 asks of class ci waited for room (10:28Z). What limits CI in these ten minutes is mostly not these two jobs: in the same 20 s sample the people's class used 146.4 of the node's 163 cores and the whole ci group 12.2. The datum for this issue is the width: 303 cores wanted by two jobs that use 12 between them, admitted in the gap a restart made.

13:18Z 11-18: the figures before 7f98a145 ("the spare tier starts only on a node where no job above it waits for room")

Production still runs d748ed8d, so these are the hours your change is meant for, as they are without it. CPU hours of the jobs that ended in each hour, by class (job_history):

hour CI's jobs CI CPU h spare tier's jobs spare tier CPU h people's CPU h CI's jobs' waits, summed
06:00Z 900 22.0 240 50.6 70.9 18 h
07:00Z 1,565 32.2 863 58.0 73.1 18 h
09:00Z 4,053 66.1 15 9.1 84.6 1,105 h
10:00Z 981 29.1 294 44.8 78.0 61 h
11:00Z 3,052 53.7 177 28.6 71.5 408 h
12:00Z 3,359 68.6 82 18.3 72.5 467 h

In the two hours from 11:00Z, with CI's jobs waiting eight to nine hours for every hour they ran, the spare tier still used 28.6 and 18.3 CPU hours: a third to a quarter of what the heads' jobs got. What it spent them on since 08:00Z: goldens 48.5 CPU hours in 24 jobs (14.8 minutes at width 29), test-x86_64/tilo-agent-session 14.5 in 226, web-desktop-check-wasm 10.7 in 7.

After the promote I read the same table, and with it a head's time to verdict (34.8 minutes at the median for heads judged 11:00Z to 13:00Z, issue 97's last section) and whether the spare tier's backlog drains in the lulls.

On t.tilo.so (1b22804f) at 06:14Z on 11-15, as the heads' backlog thinned for the first time in days, main's idle checks took the node whole, and for the next fifteen minutes main's heads started almost nothing while more than 430 of their asks waited for room. Fourteen heads were open, most of them a few checks from their verdict; none finished from 06:13Z to 06:29Z. ## What happened | minute (11-15) | CI jobs started (cores by width) | spare-tier jobs started (cores by width) | CI asks queued for room | |---|---|---|---| | 06:13Z | 138 (286) | 0 | 454 | | 06:14Z | 140 (431) | 95 (1,079) | 340 | | 06:15Z to 06:22Z | 0 | 0 | 131, then 433 to 440 | | 06:23Z to 06:29Z | 23 in all | 0 | 440 to 486 | | 06:30Z | 120 (132) | 0 | | The 95 spare-tier jobs started between 06:14:20Z and 06:15:00Z: 25 runs of main's idle checks on main's newest head (`request.ci`: seq 0, reference main, `Priority::Probe`). By width: `lounge-gate-binaries` 4 jobs, 376 cores; `web-examples` 159; `web-desktop-wasm` 36; `sdk-web-qualify` 36; `goldens` 29; `real-fuse-relay` 28; `hakari` 22; `lounge-gate-cli` 22; 20 jobs of `test-x86_64/tilolang-tilo`; and smaller ones. The node offers 159 cores; granted tokens went from 379 to 1,442 and stayed above 1,000 until 06:22Z. The jobs ran 6 to 18 minutes; 14 were still running at 06:32Z. From 06:13Z to 06:15Z 269 CI jobs had ended (649 cores by width), which is the room they took. Meanwhile head 56464's last check, `test/tilo-session-client`, which head 56463 waits on, sat queued; so did the last two to five checks of heads 56509 to 56525. Over the last 36 hours the spare tier started 139 jobs in all, this burst included, and only one other twenty-minute window had more than 20 (22 at 05:12Z to 05:32Z on 11-14, with 67,138 CI asks queued): with a long queue it never gets room, so this is the first time the rule met a thin queue. ## Why I think it is worth a look `sched/order.rs` says the spare tier is "work that fills room heads don't need", and `ci/triggers.rs` that "nothing here looks at room: an idle check is work that fills room main's heads don't need, so its jobs queue behind them". At the instant of 06:14:20Z that held: what the heads had ready was placed first. But a spare-tier job is not taken back, and these are wide and long. Admitted in the gap between two waves of the heads' asks (the next wave was ready seconds later), they held the node for their whole length, at almost seven times its offer by width. At the tail of a backlog every open head is a few checks from done, so that is where a quarter of an hour costs most. I change nothing here: the order and admission are yours. Two shapes that would have avoided it, for you to weigh: the spare tier takes only the room left once the heads' queued asks are counted in (they were 131 to 340 at that moment), or wide spare-tier jobs wait while any head has an ask waiting for room. How to re-measure: `t_pickup_seconds_count{priority}` per minute, `t_sched_queued_by_wait{kind="room"}`, `t_node_granted_tokens`, and jobs started by class and width from `t.job_history` and `t.jobs`. **Added 09:20Z 11-15: spare-tier jobs that hold room and use none.** In the 24 hours to 09:18Z these jobs of the spare tier ended at their time limit (`t.job_history`, cause `timed_out`): | check | jobs | minutes each | width | CPU used | what it waited on | |---|---|---|---|---|---| | `run-headless` | 7 | 21.6 | 1 | 0.6 CPU-minutes each | DNS at udp 10.96.0.10:53, refused by its sandbox 148 to 160 times: its `egress` names none | | `run-desktop` | 4 | 21.6 | 1 | 0.6 CPU-minutes each | the same | | `publish-os-dev-x86_64` | 3 of 3 by 12:27Z | 60.5 to 61.5 | 16 | 0.8 to 0.9 CPU-minutes each | stood in `Copying blob` to its limit each time (the upload fault of #81): 48.7 core-hours booked, and it returns about forty minutes after each end | The first two are tilo's own declaration and cost little. The third is the shape that matters here: one idle job of the spare tier kept 16 cores booked for an hour. Data only; the planner is yours. **Added 03:42Z 11-16: the same again, larger, on 8d736d69: 162 probe jobs took the node in three minutes and CI then started nothing.** Between 03:32:46Z and 03:35:36Z a caller stopped all 29 open head runs of main (`t.runs.stop = cancel`, oldest first, 2 to 3 s apart; who is not in the server's log). Job launches by the minute from the worker's log, and probe starts from `t.jobs` and `t.job_history`: | minute (UTC) | CI launches | people's | probe jobs started | their widths summed | |---|---|---|---|---| | 03:33 | 519 | 7 | 0 | | | 03:34 | 595 | 7 | 0 | | | 03:35 | 304 | 2 | 52 | 688 | | 03:36 | 0 | 2 | 100 | 786 | | 03:37 | 0 | 1 | 10 | 100 | | 03:38 | 0 | 9 | 0 | | At 03:40Z the view read: 84 probe asks running in 44 runs and 52 more queued, 467 CI asks running in 3 runs, **922 CI asks of 2 head runs waiting for room**, 4 of people waiting for room, the node healthy and booked 159 of 159 with 205 cores in use. The 82 probe jobs then running summed 1,374 by width and 412 by `lease.cores_milli`: `lounge-gate-binaries` 11 jobs at 297, `lounge-gate-cli` 10 at 200, one `canary-ci-builder-browser-test` at 159, `web-desktop-wasm` 12 at 144, `layout-check` 3 at 139, `test` 14 at 87. CI ran 7 jobs at 47. So in the minute the stopped heads' jobs went, the probes were placed on the whole node, and the heads that came after wait behind them. With heads now leaving their unstarted checks to the next head and those checks counting as idle at their commits, a thin queue of heads is the normal state and the probes are many. Data only; the planner is yours. **Added 03:55Z 11-16: the same wave booked twice the node's memory.** From Prometheus, one value every three minutes, GiB: | | 03:33 | 03:36 | 03:39 | 03:42 | 03:45 | 03:48 | 03:51 | |---|---|---|---|---|---|---|---| | `t_node_booked_memory_bytes` | 422 | 555 | 1,032 | 986 | 922 | 871 | 779 | | `t_node_kept_memory_bytes` | 257 | 235 | 551 | 701 | 654 | 610 | 507 | | `t_node_offered_memory_bytes` | 516 | 532 | 517 | 512 | 517 | 520 | 523 | | the worker container's working set | 232 | 160 | 307 | 487 | 503 | 477 | 431 | Booked memory peaked at 1,061 GiB against an offer of 526 (498 was the most in the six hours before), kept memory at 713. The worker's real memory rose to 505 GiB in these samples, against 412 as the most in the six hours before; its cgroup's limit is 620 GiB and its own recorded peak since the pod started at 01:14Z is 593 GiB. Nothing was killed: `oom_kill` 0 for the worker and both classes, memory pressure 0, no job ended for memory. `t_sched_placed_without_room_total` rose by one. So the probes' wave was admitted well past the memory the node offers, and the margin to the worker's own limit was real memory's luck, not the booking's. My watch on kept memory over the offer fired (48 of 120 samples in half an hour); a second one now reports if the working set stays at 570 GiB or more. **Added 03:56Z 11-16: eighteen minutes later CI has still started nothing.** Job starts by two minutes from `t.job_history` and `t.jobs`: 03:32Z CI 1,116; 03:34Z CI 934 and probes 52; 03:36Z CI 0 and probes 110; and CI 0 in every two minutes since, through 03:54Z. At 03:54Z: 58 probe jobs running for a median 19 minutes (widths summed 915: `tilo-sh-programs` 65, three `layout-check` at 37 to 57, eleven `lounge-gate-binaries` at 27), 16 of people, 3 of CI (two `clippy-x86_64`, one `clippy`), and **999 CI asks of 6 head runs waiting for room**, 65 probe asks behind them. The node reads healthy, booked 159 of 159, 180 cores in use. So the heads asked since 03:35Z cannot start a job until the probes placed in those three minutes end, and those are the long builds. This is the state the heads' new rule makes normal (few open heads, many idle checks), so I think it needs your eye soon. **Correction, 04:06Z 11-16: the probes did not run either. Two people's jobs at width 159 took every compile slot from 03:38:38Z to about 04:00Z.** I wrote above that the heads waited behind the probes' long builds. The worker's slot lines say otherwise. Compiles that ended, by the class of their job: | from (UTC) | CI | people | probe | |---|---|---|---| | 03:38:30 to 03:40 | 0 | 199 | 0 | | 03:40 to 03:50 | 0 | 47 | 1 | | 03:50 to 04:00 | 0 | 1,317 | 0 | | 04:00 to 04:02:44 | 585 | 215 | 302 | Of the compiles that ended after 03:38:30Z, 353 of CI's (60%) and 176 of the probes' (58%) had been held for `no core free`, the longest 1,479 s and 1,581 s; of people's 1,778, 43 were held, each for memory. On the node at 04:01Z the newest head's two clippy drivers (j582-5505, j582-5507) had 3 and 5 wrappers waiting since 03:37Z, no compiler and no slot; the taken-over j582-1642 had 51 wrappers and one compile. What started at 03:38:38Z: `e2e-x1` and `e2e-x2` of one of your runs, each at width 159, 13.5 and 13.7 minutes, 64 and 70 CPU-minutes; then `tilo-sh-programs` at width 65 from 03:51:22Z. In those 22 minutes your runs used 14.0 CPU-hours in 50 jobs, the user's 1.3 in 15. So the order was: the probes took the node's bookings in three minutes (the table further up stands), then people's wide jobs took the cores from both the probes and CI, and with every booking held by jobs that could not compile, CI started no job from 03:36Z until 04:02Z, 26 minutes. CI's starts are back since 04:02Z (52 CI jobs running at 04:03Z, CPU 80 cores for CI and probes against 78 for people). The memory figures above stand. This belongs with #71 as much as here. **Added 04:53Z 11-16: a clean case of this issue, without people's wide jobs: the next head waited twenty minutes behind probes.** At 04:28Z to 04:32Z CI's queue was empty (the view: 3 CI asks waiting, then none), so probes were started: 62 jobs from 04:30Z, 53 from 04:35Z. A head arrived, and at 04:43Z 712 CI asks waited for room beside 783 of the probes'. | from (UTC) | CI job starts | people's | probes' | CI compiles ended | people's | probes' | |---|---|---|---|---|---|---| | 04:25 | 6 | 77 | 0 | | | | | 04:30 | 11 | 70 | 62 | 1,297 (to 04:40) | 1,655 | 5,607 | | 04:35 | 0 | 51 | 53 | | | | | 04:40 | 4 | 57 | 0 | 60 (to 04:50) | 718 | 1,765 | | 04:45 | 250 | 40 | 44 | | | | So CI started 21 jobs in the twenty minutes to 04:45Z, and in the ten minutes from 04:40Z it finished 60 compiles against the probes' 1,765. Since 04:20Z, 53% of CI's compiles and 51% of the probes' were held for `no core free` (people's: none of 4,942). The probes then running were `goldens` (two at width 62, 20 and 40 minutes old), `os-compile-x86_64` (width 37), `nested-session` (20). With heads leaving their checks to the next head the heads' queue is empty much of the time, so this is now the usual way a head begins: behind whatever the idle tier started in the gap. ## 09:28Z to 09:48Z 11-16, on b5c5b140: the same wave, read by class of compile One idle run (`t::ci::triggers: idle checks started repo="tilo" sha="844f2f78a0" checks=509 run=r41ba426aa2`, 08:46:14Z) waited for room behind CI, as it should, until about 09:14Z, then took what CI's thin queue left. Read from the worker's `slot ended` lines, each job's class taken from its `a job launched` line: | class | compiles ended | compile seconds | queued seconds in all | queued per second compiled | queued over 5 s | |---|---|---|---|---|---| | probes | 5,539 | 36,729 | 398,791 | 10.9 | 3,705 | | CI | 2,492 | 12,511 | 81,597 | 6.5 | 1,301 | - In 09:30Z to 09:40Z, when a head's compiles arrived, 1,673 CI compiles queued 76,455 s, 46 s each on average, while probes ended 3,012 compiles in the same ten minutes. - CI's job wait p50 over fifteen minutes went from 80 s (09:28Z) to 440 s (09:43Z). At the job level nothing looked wrong: 0 to 39 CI jobs waited for room, booked memory stayed under the offer (413 GB of 564). - So the idle tier yields at admission and then holds the compile slots: a head that arrives after the idle run was let in queues compile by compile behind it. ## 10:50Z to 11:05Z 11-16: one head arriving on a node the idle tier held After 95 minutes without a push, head run r85dc8aa1bc was asked at 10:50:47Z. Seventeen probe jobs were out and 92 of the head's checks waited for room three seconds later; its jobs then got room quickly (job wait p50 16 to 20 s). In the compile slots, its first fifteen minutes read: | class | compiles ended | compile seconds | queued seconds in all | queued per second compiled | |---|---|---|---|---| | CI (this one head) | 1,808 | 9,640 | 44,001 | 4.6 | | probes | 2,075 | 12,621 | 34,269 | 2.7 | The probes compiled more than the head did in the head's own first quarter hour, and the head's compiles queued 24 s each on average. So the reading of 09:28Z above is not a matter of several heads at once: one head alone meets it. One thing I drew from the 09:14Z wave I take back, and it never stood in this issue: that it doubled those heads' time to verdict. What a head takes follows one single-core job first (#74, section of 11:35Z); the queueing above is real, its share of a head's time to verdict I have not measured. ## 20:12Z 11-16 (production 8fb821de): seen again as heads returned, and most of it is the blame walk your ffa05451 reverts tilo's main was quiet from 14:59Z to 19:55Z. In those hours the node ran probe-class jobs almost alone. Jobs ended, by hour (`job_history`): | hour (UTC) | probe runs started | probe job hours | probe CPU hours | CI job hours | people job hours | |---|---|---|---|---|---| | 15 | 113 | 34.6 | 106.4 | 14.4 | 0.1 | | 16 | 76 | 21.4 | 91.3 | | | | 17 | 36 | 14.0 | 48.1 | | | | 18 | 26 | 13.6 | 45.3 | | | | 19 | 35 | 13.7 | 50.5 | 1.7 | 1.7 | (10:00 to 13:00Z: 234, 117, 183 and 167 probe runs an hour.) That is the walk your revert's message describes; I had read the same jobs as idle checks and wide image builds. Then three heads arrived (19:55:12Z, 20:05:12Z, 20:10:17Z) while about 180 to 195 probe-class jobs were running, 13 probe runs open: | time (UTC) | CI queued for room | CI running | probe-class running | |---|---|---|---| | 20:04 | 3 | 436 | 185 | | 20:07:19 | 358 | 164 | 193 | | 20:08:00 | 149 | 323 | 194 | | 20:08:40 | 150 | 317 | 191 | | 20:09:32 | 151 | 316 | 184 | | 20:11:38 | 401 | 310 | 179 | Each waiting CI job was short of one core (`short_by` 1,000 millicores, no memory, no disk). At 20:07 to 20:09Z the waiting ones were the first head's test shards (142 of `test/…`, 6 of `test-x86_64/…`); at 20:11Z 389 of the 401 were the newest head's first wave. The first head's builds, asked at 19:55:12Z, had started within 32 s, so the hold shows where a head asks hundreds of one-core jobs at once: the probe-class jobs already running keep their cores until they end. Two things follow. ffa05451 is on main since 20:06Z and not on production, which still serves 8fb821de with eec34cd1 in it; with it promoted the probe runs should fall back to about ten an hour and this table can be read again. And what remains of this issue after that is its first observation alone: an idle wave of 500 checks started while no head is open, met by a head a minute later. ## 21:10Z 11-16 (production 6ee9a77c since 20:18:45Z, your revert in it): the table read again Probe runs by when their first job was asked (`job_history`, priority `probe`): | first job asked | minutes | probe runs | jobs | job hours | CPU hours | |---|---|---|---|---|---| | 19:00 to 20:19Z, eec34cd1 live | 80 | 42 | 494 | 31.5 | 109.8 | | 20:20 to 21:09Z, reverted | 50 | 21 | 197 | 4.5 | 12.6 | Seven probe jobs were still running at 21:09Z, so the second row is not final. - By the hour that is 82 CPU hours of probes before and 15 after. The runs did not fall in number, about 25 an hour against 32: a run now costs 0.6 CPU hours against 2.6. My "about ten an hour" of 20:12Z was wrong on the count; what fell is the load. - CI jobs' wait, p50 over 15 minutes: 131 s at 20:13Z, 18 s at 20:28Z, 76 s at 20:43Z, 0 s at 20:58Z. Jobs waiting for room: 70 at 20:13Z (41 ci, 29 probe), 43 at 20:28Z (40 ci, 3 probe), none at 20:43Z and 20:58Z. - Heads: six asked and six judged in the hour to 20:58Z. The four judged on this build took 19, 35, 22 and 16 minutes. What this issue began with, idle checks holding the node as a head arrives, did not show in these 50 minutes: the node stood at 20 to 75 of 159 cores booked with nothing waiting whenever I read it after 20:40Z. It stays open for the next time the heads' queue is thin and a wave of idle checks is on the node. ## 21:52Z 11-16 (production 6ee9a77c): seen again and measured, forty minutes after the section above tilo 8e856d7cc8 got its head run r0bdec06a12 at 21:26:24Z and a probe-class run rff9ac7d782 of 68 jobs, every one started between 21:28:00Z and 21:28:09Z: `test-idle`, the layout checks, `web-desktop-wasm`, `web-examples`, the lounge gates, the image and size checks. That run used 17.7 CPU hours in its first twenty minutes. Its costliest jobs (`job_history`): | check | width | wall s | CPU s | |---|---|---|---| | `lounge-gate-binaries` | 22 | 556 | 6,244 | | `web-desktop-wasm` | 127 | 942 | 5,315 | | `layout-check/320x568` | 66 | 566 | 5,217 | | `image-ci-builder-x86_64` | 16 | 883 | 5,082 | | `layout-check/390x844` | 62 | 580 | 5,025 | | `layout-check/1280x800` | 40 | 526 | 4,903 | | `app-sizes-x86_64` | 20 | 947 | 4,776 | | `web-examples` | 141 | 476 | 2,908 | | `test-idle` | 6 | 1,088 | 2,799 | | `sdk-web-qualify` | 46 | 943 | 2,110 | The node was full two minutes later (159 of 159 booked at 21:30Z) as the next heads' waves came. CI jobs by the ten minutes they were asked, and how long each waited for its start: | asked from | CI jobs started | p50 s | p90 s | longest s | |---|---|---|---|---| | 21:00Z | 365 | 5 | 14 | 21 | | 21:10Z | 243 | 0 | 21 | 35 | | 21:20Z | 324 | 0 | 0 | 105 | | 21:30Z | 235 | 311 | 330 | 355 | | 21:40Z | 790 | 155 | 236 | 526 | Waiting for room: 7 jobs at 21:30Z, 308 at 21:40Z, 483 at 21:43Z (478 ci, 5 probe). Jobs ended 21:29Z to 21:49Z by class: ci 969 jobs and 10.4 CPU hours, people 105 and 11.1, probe 60 and 19.6. So a head's jobs asked at 21:30Z stood five minutes behind a check set of the probe class that had started two minutes before them, and the wave after stood two and a half to four. The heads judged on this build took 16 to 35 minutes, so that is a sixth to a third of a head. People's jobs were not touched (p95 0.2 s). This is data, not a proposal: the order is yours. What the readings say for a rule is only that the idle set's cost is in a dozen wide jobs that all start in the same ten seconds. ## 22:48Z 11-16 (production 243ff75d since 22:03:58Z): the probe class after the blame change, in a wave of pushes tilo's main took 25 commits in the 21:00Z hour and 20 in the first 19 minutes of 22:00Z; about 21 heads an hour were asked. Probe runs by the ten minutes their first job was asked (`job_history`, priority `probe`): | first job asked from | probe runs | jobs ended | CPU hours | |---|---|---|---| | 22:00Z | 12 | 48 | 2.8 | | 22:10Z | 2 | 4 | 0.0 | | 22:20Z | 5 | 12 | 1.0 | | 22:30Z (eight minutes) | 4 | 20 | 0.8 | That is about 5 CPU hours of probes an hour, against 15 after the revert and 82 before it. Jobs ended 22:08Z to 22:38Z by class: | class | jobs | runs | CPU hours | wait for a start, p50 | p90 | |---|---|---|---|---|---| | ci | 1,520 | 22 | 29.5 | 160 s | 306 s | | people | 440 | 132 | 30.3 | 0 s | 0 s | | probe | 105 | 26 | 13.4 | 1,200 s | 1,224 s | So with 243ff75d the probe class no longer stands in front of CI: its own jobs waited twenty minutes while CI's waited under three, and what CI shares the node with in a wave is people's jobs, which took as much CPU as CI. The heads asked 21:26Z to 21:49Z (behind the idle set of the section above, and across the promote) took 46 to 50 minutes; those asked after 21:56Z took 17 to 28. For this issue that leaves the one case of the section above: a whole idle check set started two minutes before a head's wave. ## 10:17Z to 10:37Z 11-17 (production f9cb88e3 since the 10:16Z rollback): two idle checks started as a restart emptied the heads' queue The start of f9cb88e3 ended 47 open head runs at 10:17:03Z (issue 95). With the heads' asks gone, two checks of main's idle runs asked at 02:56Z and 05:46Z started at once: | job | check | started | cores wanted | cores used, 20 s sample at 10:37Z | CPU time so far | |---|---|---|---|---|---| | j599-20 | goldens/tilo-app-keeper | 10:17:12Z | 152 | 1.8 | 9,392 s | | j599-188 | goldens/assistant | 10:17:59Z | 151 | 10.5 | 7,112 s | Both still ran at 10:37Z. CI started 101 and 255 jobs in the five minutes from 10:15Z and from 10:20Z, then none from 10:25Z to 10:35Z, while 959 asks of class ci waited for room (10:28Z). What limits CI in these ten minutes is mostly not these two jobs: in the same 20 s sample the people's class used 146.4 of the node's 163 cores and the whole ci group 12.2. The datum for this issue is the width: 303 cores wanted by two jobs that use 12 between them, admitted in the gap a restart made. ## 13:18Z 11-18: the figures before 7f98a145 ("the spare tier starts only on a node where no job above it waits for room") Production still runs d748ed8d, so these are the hours your change is meant for, as they are without it. CPU hours of the jobs that ended in each hour, by class (`job_history`): | hour | CI's jobs | CI CPU h | spare tier's jobs | spare tier CPU h | people's CPU h | CI's jobs' waits, summed | |---|---|---|---|---|---|---| | 06:00Z | 900 | 22.0 | 240 | 50.6 | 70.9 | 18 h | | 07:00Z | 1,565 | 32.2 | 863 | 58.0 | 73.1 | 18 h | | 09:00Z | 4,053 | 66.1 | 15 | 9.1 | 84.6 | 1,105 h | | 10:00Z | 981 | 29.1 | 294 | 44.8 | 78.0 | 61 h | | 11:00Z | 3,052 | 53.7 | 177 | 28.6 | 71.5 | 408 h | | 12:00Z | 3,359 | 68.6 | 82 | 18.3 | 72.5 | 467 h | In the two hours from 11:00Z, with CI's jobs waiting eight to nine hours for every hour they ran, the spare tier still used 28.6 and 18.3 CPU hours: a third to a quarter of what the heads' jobs got. What it spent them on since 08:00Z: `goldens` 48.5 CPU hours in 24 jobs (14.8 minutes at width 29), `test-x86_64/tilo-agent-session` 14.5 in 226, `web-desktop-check-wasm` 10.7 in 7. After the promote I read the same table, and with it a head's time to verdict (34.8 minutes at the median for heads judged 11:00Z to 13:00Z, issue 97's last section) and whether the spare tier's backlog drains in the lulls.
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#79
No description provided.