Repository navigation
Clean up macOS runners: disable file-change history, Time Machine and desktop agents, erase logs at boot, reboot every three days - #121990
Merged
leshikus merged 5 commits intoSep 25, 2026
Conversation
On long-running `mac2-m2pro.metal` runners the root volume reached 75-83%: 50-59 GB of swap files left by leaked memory, which only a reboot frees, plus about 7.6 GB of `/.fseventsd` file-change history that survives reboots. - Put a `no_log` marker into `/System/Volumes/Data/.fseventsd` during provisioning, so `fseventsd` stops persisting history from the next boot. - Give macOS runners a three-day `max_life`. The check runs between jobs; the raised exception makes `user_data` reboot the instance. - Bump the version so the fleet re-provisions. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Runners have no backup destination, but an enabled Time Machine can still take local APFS snapshots of the root volume. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [0b5ad25] Summary: ✅ AI ReviewSummaryThis PR reduces persistent disk usage on macOS runners by erasing unified logs at boot, disabling several background services, suppressing Findings
Final Verdict
|
`/private/var/db/uuidtext` reached 6.3-6.6 GB on long-running runners. runner-init starts once per boot, so erasing logs there bounds their size to one boot. Photos analysis, Siri, iCloud and location services have no use on a CI runner. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The disk usage was measured in the middle of a test load, so swap and the `_work` checkout are expected there, not a leak. The persistent leftovers are `/.fseventsd`, unified-log `uuidtext` and about 0.5 GB of Homebrew downloads, which `brew cleanup` now removes after installing packages. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leshikus
marked this pull request as ready for review
September 24, 2026 14:03
Member
|
LGTM |
maxknv
reviewed
Sep 25, 2026
|
|
||
| if config.init_environment == Environment.MACOS: | ||
| # Drop swap files and other state accumulated across test runs. | ||
| config.max_life = 3600 * 24 * 3 |
Member
There was a problem hiding this comment.
I think we need some random offset + 3600 * random(0,24) to not reboot all instances at the same time
Review comment ClickHouse#121990 (comment) asked for a random offset on the 3-day macOS `max_life`, so that not all instances reboot at the same time. The concern holds: bumping the runner-init `version` makes every macOS runner re-provision within minutes of each other, which aligns their `runner_start_time`; with a fixed `max_life` they would all age out and reboot together three days later, taking the whole macOS capacity offline. Add `900 * random.randint(0, 24)` seconds (0 to 6 hours in 15-minute steps) to `max_life`, chosen once per runner-init start. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Collaborator
Author
|
This was referenced Oct 2, 2026
aschoube
pushed a commit
to aschoube/ClickHouse
that referenced
this pull request
Oct 8, 2026
…win) The macOS runners fill their 100G EBS boot container again (Code 243 NOT_ENOUGH_SPACE, e.g. job 112074232546 on ClickHouse#122138 started with / 97% full). The job logs show the growth is host state outside the job workspace: the same jobs leave almost nothing behind on some hosts and 0.6-0.75 GB per job on others, and only a reboot (same instance id) resets a host to 43-45%. No host went back to that level between 2026-09-28 and 2026-10-04, although runner-init v77 (ClickHouse#121990) gives macOS runners a 3-day lifetime. GNU df on APFS prints one container-wide number for every volume, so the existing df -h output cannot say what grows, and the hosts cannot be inspected directly. Print, at job start (what earlier jobs left behind) and at job end: uptime, boot time, memory size, swap usage, memory pressure level, the provisioned and running runner-init versions, the swap files, Capacity Consumed per APFS volume, deleted-but-open regular files with their holders, and the 10 largest processes by memory. At job start, when the data volume is at least 60% used, also list directories of 1 GiB or more (healthy hosts sit at 42-50%, so this only runs on a filling host). Everything is read-only. diskutil, lsof and du run under GNU timeout (30, 60, 120 s; gnubin is first in the macOS job PATH), outside sudo so that sudo's secure_path does not hide it; sudo -n never prompts; listings are head-bounded. The test exit code is captured before the end call and the teardown still always runs (no set -e). The wrapper is in darwin_fast_test_digest_config, so a change to it runs the job, and this commit's own CI samples one host. The fix for whatever the output names follows separately. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disk usage on
mac2-m2pro.metalrunners was measured in the middle of a test load, so most of it (swap, the_workcheckout) is expected. Three things persist across test runs and reboots: up to 7.6 GB of/.fseventsdfile-change history, 6.3-6.6 GB of unified-loguuidtextand 0.5 GB of Homebrew downloads.log erase --allat startup, which happens once per boot.no_logmarker into/System/Volumes/Data/.fseventsd, runsbrew cleanup, disables Time Machine (which can take local APFS snapshots) and disables Photos analysis, Siri, iCloud and location services.max_life, which drops swap and other state accumulated across test runs. The check runs between jobs, and the exception it raises makesuser_datareboot the instance.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/121990]
Version info
26.10.1.688-master(included in26.10and later)