Skip to content

Give the macOS arm64 CI runner two test forks, keeping it inside its time limit - #1535

Merged
Frotty merged 3 commits into
masterfrom
macos-ci-limits
Oct 22, 2026
Merged

Frotty merged 3 commits into
masterfrom
macos-ci-limits

Conversation

@Frotty

@Frotty Frotty commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

The macos-latest master job on aee56dd timed out. "Run tests" hit its 22-minute step limit, no test failed, and there were no results. A rerun of that job passed in 16m57s. Over the last five master runs that step took between 12 and 22 minutes on macOS arm64, against 5 to 8 on Ubuntu. That is with macOS skipping -PallBackends, which Ubuntu and Windows run.

Cause. That runner has 3 CPUs and 7 GB of RAM (GitHub-hosted runners). The job measured Apple M1 (Virtual), hw.ncpu 3 and hw.memsize 7516192768 (7.0 GiB). On it testForkCount() gave one fork. Half of 3 cores rounded down to 1, and the memory bound gave (7 − 4 GiB reserve) / 2 GiB = 1. Every other runner gets two forks. The arm64 job was the only one running all 3,361 tests in one JVM, and the suite grows with each fix.

Measurements. A temporary workflow on this branch ran the master test step's command on macos-latest, at commit 7ce6fc1, with -PtestForks set to 1, 2 and 3. It sampled vm.swapusage and memory_pressure every 15 s. All 3,361 tests passed in each run.

Forks Test task wall time Sum of class times Lowest free memory Swap used
1 881 s 853 s 63% 0
2 641 s 1,134 s 53% 0
3 537 s 1,372 s 48% 0

Memory was never the limit, even with three forks. Three forks run six -XX:ActiveProcessorCount=2 JVMs on three cores, and each class ran 60% slower. Two forks keep to the existing half-the-cores rule.

Change.

  • testForkCount() halves the cores rounding up, and reserves 3 GiB instead of 4. On the arm64 runner that gives two forks.
  • Ubuntu, Windows and macOS Intel stay at two forks (4 cores; 16, 16 and 14 GB). An eight-core machine still gets four.
  • With the new default and no override, the temporary workflow started two test executors on macos-latest. The test task took 715 s with --info logging and still had 47% of memory free.

The step and test-task timeouts stay as they are. At the measured 641 s, the arm64 test task now uses about half of its 20-minute limit, so the limit still catches a hang.

The temporary workflow was removed in the last commit. Not verified: the macOS Intel and Windows master jobs, whose fork counts this does not change.

@Frotty Frotty changed the title Keep the macOS arm64 master CI job inside its time limit Give the macOS arm64 CI runner two test forks, keeping it inside its time limit Oct 22, 2026
@Frotty
Frotty marked this pull request as ready for review October 22, 2026 06:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T06:36:36.058170Z c38cf65 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty

Frotty commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: c38cf65ab6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit 01d436c into master Oct 22, 2026
2 checks passed
@Frotty
Frotty deleted the macos-ci-limits branch November 25, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant