Warm pool: the refill boot after every lease grant takes half of a 10-core Mac for 90 s, and nothing paces it
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ios, macos, typescript
- 领域
- performance, tooling
调研方向
Start in the warm-pool converger that reacts to lease.granted: find where the replacement is cloned and booted, then the warmPool settings schema defining maxConcurrentBoots, memoryPressure and reserveRunning.ios, and the slim-mode category list that ties widgets to PosterBoard and chronod. Read #1540 for the seed-shutdown context, then reproduce with one warm target and maxConcurrentBoots: 1 while sampling host idle. Done means either a pacing control (a post-grant delay or a host-CPU gate) or an ios.slim wallpaper category, backed by tests.
由索引模型根据 Issue 内容生成。
描述
[!NOTE]
Claude Fable 5.2 responding on behalf of Melvin
The problem
On a Mac that runs builds beside a warm iOS pool, every lease grant is followed by about 90 seconds in which the host has no idle CPU. The cause is not the simulator that was just leased. It is the warm pool's refill: the converger runs on lease.granted, clones a seed and boots the copy at once, and that copy's first boot is the expensive part.
Measured on Simlock 0.7.0, iOS 27 runtime, a 10-core Apple silicon Mac, one warm iPhone 17 target, maxConcurrentBoots: 1, slim mode on without the widgets category. CPU is per-process CPU time sampled and grouped by each simulator's launchd_sim; host idle is from iostat.
One refill boot, from "replacement provisioned" (5 s after the grant) for 92 s. Host idle was 0% in every sample.
| Who | Core-seconds in 92 s |
|---|---|
| The replacement warm simulator (first boot) | 458 (5 of the 10 cores; 88% of all simulator CPU) |
| The simulator leased 5 s earlier | 30 |
| A simulator that was already leased | 32 |
| Host processes (a native build) | 264, down from 550 in the 87 s before (6.3 cores to 2.9) |
The replacement's 458 core-seconds by process class:
| Class | Core-seconds | Share |
|---|---|---|
| Poster extensions and PosterBoard (wallpapers) | 125 | 27% |
Widget extensions and chronod |
122 | 27% |
| Other daemons | 95 | 21% |
lsd, SpringBoard, launchd_sim |
55 | 12% |
diagnosticd, logd |
28 | 6% |
MTLCompilerService |
12 | 3% |
| Below the sampler's floor | 21 | 4% |
Load average on the same host, to separate the boot from the lessee's own work:
- Refill boot alone (the lessee did nothing yet): peaks of 154 and 176.
- Refill boot with the lessee starting its app inside the window: peaks of 197 and 199.
- A release with no new grant (so only the replacement boots): peak 293.
- A grant with no refill (pool at its capacity, so nothing booted): 26 to 65 over two minutes.
So the build beside the pool loses more than half of its CPU, and the lessee's first app start runs on a starved host, once per lease.
Nothing in 0.7.0's warmPool settings changes when or how hard that boot runs. maxConcurrentBoots is already 1. memoryPressure reads memory only, and memory is fine during the burst. reserveRunning.ios set to the target plus one moves the same boot to after the last release and makes every lease taken while another is held wait for a cold clone and boot (3.2 s and 20.9 s median here, 25.5 s p90).
The slim category that would remove most of it is widgets, which disables PosterBoard and chronod together. That is 54% of the burst, but an app under test that has home-screen widgets or a Live Activity needs chronod, so the category cannot be switched on for such a pool. The wallpaper half (27%) has no category of its own.
Who runs into this
Coding agents and CI jobs sharing one Mac: agents lease simulators from a warm pool while native builds and a CI pool run on the same host. Leases come in steadily (37 grants in one day here), so the host spends a noticeable part of the day in these windows, and callers that gate on host load before starting work see the pool itself trip the gate.
What you would like to happen
Two things, either of which helps without the other:
- A way to pace the refill. For example a
warmPooldelay afterlease.grantedbefore the replacement boots, or a host CPU gate beside the memory one that holds warming (without shedding idle devices) while the host is saturated. A lease that arrives while the refill is held would be created on demand, as it is today when nothing is warm. - Wallpapers separable from widgets in slim mode: a category of its own for PosterBoard and the poster extensions, or
ios.slimaccepting launchd labels, so a pool can drop the wallpaper work and keepchronodand Live Activities.
Anything else
- Related: #1540 (the seed is shut down right after
bootstatus, so every clone repeats first-boot work). If seeds settled, this burst would probably shrink at the source; pacing the refill would still help hosts where a boot competes with a build. - Caveats on the numbers: the class split comes from one sampled boot, taken while a build ran beside it, and processes that start and exit between samples are not counted. The load peaks come from five separate grants and releases on the same day.
- No workaround is in use today; the settings above were weighed and left unset for the reasons given.
- 主要语言
- TypeScript
- 星标
- 705
- 派生
- 40
- 平均合并
- 12 小时 9 分钟
- 30 天内合并 PR
- 376
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/simlock 的其他 Issue
-
request:new
难度 2/5 1-3 小时 新手友好度 72/100
callstackincubator/simlock#1806 ·
维护者通常 1 天内回复
-
bug:new
难度 2/5 1-3 小时 新手友好度 78/100
callstackincubator/simlock#1780 · 1 条评论 ·
维护者通常 1 天内回复
-
task:draft
难度 2/5 1-3 小时 新手友好度 72/100
callstackincubator/simlock#1441 ·
维护者通常 1 天内回复
-
bug:new
难度 2/5 1-3 小时 新手友好度 45/100
callstackincubator/simlock#1805 · 1 条评论 ·
维护者通常 1 天内回复
-
bug:new
难度 2/5 1-3 小时 新手友好度 45/100
callstackincubator/simlock#1804 · 1 条评论 ·
维护者通常 1 天内回复
查看 callstackincubator/simlock 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
Update project links after the repository renames可能已有人在做 @JonathanTSilva 今天认领。 未关闭ai-generated priority: p2 size: xs type: bug
难度 2/5 1-3 小时 新手友好度 85/100
JonathanTSilva/jts-website#119 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 74/100
promplate/code-review#158 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not exist可能已有人在做 @franpts2 今天认领。 未关闭docs
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 3 天内回复