Memory limits for the mutation build (v1.38.2) #134

Merged
ai-reviewer merged 3 commits from mihoe/mutation-build-memory into main 2026-10-09 23:25:53 +02:00
Collaborator

Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation.

The Problem

The nightly mutation build nearly ran mih09 out of memory on 2026-10-09 (5.8 GiB RAM, 4 GiB swap, 3 CPUs).
No other build ran at the same time.

Measure Average in the 2 h before Peak during the run
RAM used 3.3 GiB 5.7 GiB
Swap used 2.6 GiB 4.0 GiB, all of it
Memory pressure 1 % 85 %
Load 1.3 111
IO pressure 4 % 72 %

A PIT run starts a main process and one test process (minion) per thread, two by default.
None of them had a heap limit, so each could grow to a quarter of the RAM, about 1.45 GiB on mih09.
The JVM grows its heap rather than collect garbage while it may, so the three together pushed the host into swap.

Non-Goals

  • No fewer threads: two minions keep the run at about 35 minutes.
  • No change of the Gradle daemon, which already runs with Gradle's default of 512 MiB.

The Solution

  • pitest.mainProcessJvmArgs limits the main process to 768 MiB.
  • pitest.jvmArgs limits each minion to 512 MiB and gives it the serial garbage collector, which needs the least memory beside the heap and suits a single-threaded test run.

A local run of the whole nightly command checks the limits: no mutant may end in MEMORY_ERROR, since one such mutant turns the gate red.
In that run a minion used about 300 to 400 MiB of resident memory and the main process about 530 MiB.

The change is merged before its local run has finished, so that the next nightly build already runs with the limits.
The result of the local run follows as a comment on this pull request.

🤖 Generated with Claude Code

> Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation. ## The Problem The nightly mutation build nearly ran mih09 out of memory on 2026-10-09 (5.8 GiB RAM, 4 GiB swap, 3 CPUs). No other build ran at the same time. | Measure | Average in the 2 h before | Peak during the run | |-----------------|--------------------------:|--------------------:| | RAM used | 3.3 GiB | 5.7 GiB | | Swap used | 2.6 GiB | 4.0 GiB, all of it | | Memory pressure | 1 % | 85 % | | Load | 1.3 | 111 | | IO pressure | 4 % | 72 % | A PIT run starts a main process and one test process (minion) per thread, two by default. None of them had a heap limit, so each could grow to a quarter of the RAM, about 1.45 GiB on mih09. The JVM grows its heap rather than collect garbage while it may, so the three together pushed the host into swap. ## Non-Goals - No fewer threads: two minions keep the run at about 35 minutes. - No change of the Gradle daemon, which already runs with Gradle's default of 512 MiB. ## The Solution - `pitest.mainProcessJvmArgs` limits the main process to 768 MiB. - `pitest.jvmArgs` limits each minion to 512 MiB and gives it the serial garbage collector, which needs the least memory beside the heap and suits a single-threaded test run. A local run of the whole nightly command checks the limits: no mutant may end in `MEMORY_ERROR`, since one such mutant turns the gate red. In that run a minion used about 300 to 400 MiB of resident memory and the main process about 530 MiB. The change is merged before its local run has finished, so that the next nightly build already runs with the limits. The result of the local run follows as a comment on this pull request. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 1 commit 2026-10-09 22:52:57 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 2 commits 2026-10-09 23:15:22 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Memory limits for the mutation build (v1.38.2)
werkator build succeeded after 02:16
ai-review/assessment human review required; a human approval unlocks the merge; review requested from mi; merge scheduled for when the checks succeed
ai-review/gate build succeeded after 00:29
3d2ad6f0e4
PIT's main process gets 768 MiB, each minion 512 MiB and the serial
collector: without limits each could take a quarter of the RAM, and on
mih09 the nightly run filled RAM and swap at a load of 111.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code changed title from WIP: Memory limits for the mutation build to Memory limits for the mutation build (v1.38.2) 2026-10-09 23:17:54 +02:00
Collaborator

🟡 werkrevisor: YELLOW / HUMAN_REVIEW

Change kind: mixed.

Reasons

  • YELLOW risky build changes according to Jev: build.gradle.kts (weakens checks 0.06, risk 1.92, security 0.01)
  • hint 1 changed file(s) that neither weaken the checks, touch security nor show a risk category of jvm-spring-backend according to Jev
  • hint 1 changed file was given to the AI as excerpt of the selected lines and 5 lines around each changed line, not in full (each larger than [review] max_full_file_chars = 80000): src/main/resources/templates/releases.html

Classifier

3 of 3 units passed all questions (1 PR document(s)).
1 answer ignored because of a confidence below [classifier] min_confidence.

Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 14795, calls 1, tokens in 14240 / out 1961 (reasoning included in out), duration 24.7 s, cost 0.0066 USD (reported), classifier `jev-1.13.0` calls 3, tokens in 2323, cost 0.0001 USD, excerpt selection `openrouter/openai/gpt-6-luna` calls 1, tokens in 28786 / out 137, cost 0.0037 USD (reported), build file judge `jev-1.13.0` calls 2, tokens in 2325, cost 0.0001 USD, phases: path_judge 0.4 s, classifier 0.2 s, context 4.0 s, model_review 19.9 s, config: defaults + host + repository (.werkrevisor.toml at main 8c334e7).
Reviewed head `3d2ad6f0e49f20419e4b14680e9a2f82dfc1c6eb` against base `8c334e7362eceef90365d62e2d01b1ab87c64d29`, werkrevisor 0.31.1.
<!-- werkrevisor:3d2ad6f0e49f20419e4b14680e9a2f82dfc1c6eb --> <!-- werkrevisor-verdict:YELLOW --> ## 🟡 werkrevisor: YELLOW / HUMAN_REVIEW Change kind: `mixed`. ### Reasons - **YELLOW** risky build changes according to Jev: build.gradle.kts (weakens checks 0.06, risk 1.92, security 0.01) - **hint** 1 changed file(s) that neither weaken the checks, touch security nor show a risk category of jvm-spring-backend according to Jev - **hint** 1 changed file was given to the AI as excerpt of the selected lines and 5 lines around each changed line, not in full (each larger than [review] max_full_file_chars = 80000): src/main/resources/templates/releases.html ### Classifier 3 of 3 units passed all questions (1 PR document(s)). 1 answer ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 14795, calls 1, tokens in 14240 / out 1961 (reasoning included in out), duration 24.7 s, cost 0.0066 USD (reported), classifier `jev-1.13.0` calls 3, tokens in 2323, cost 0.0001 USD, excerpt selection `openrouter/openai/gpt-6-luna` calls 1, tokens in 28786 / out 137, cost 0.0037 USD (reported), build file judge `jev-1.13.0` calls 2, tokens in 2325, cost 0.0001 USD, phases: path_judge 0.4 s, classifier 0.2 s, context 4.0 s, model_review 19.9 s, config: defaults + host + repository (.werkrevisor.toml at main 8c334e7).<br> Reviewed head `3d2ad6f0e49f20419e4b14680e9a2f82dfc1c6eb` against base `8c334e7362eceef90365d62e2d01b1ab87c64d29`, werkrevisor 0.31.1. </sub>
ai-reviewer scheduled this pull request to auto merge when all checks succeed 2026-10-09 23:18:25 +02:00
ai-reviewer requested review from mi 2026-10-09 23:18:25 +02:00
mi approved these changes 2026-10-09 23:25:50 +02:00
ai-reviewer merged commit 8b06894b65 into main 2026-10-09 23:25:53 +02:00
ai-reviewer deleted branch mihoe/mutation-build-memory 2026-10-09 23:25:53 +02:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#134