Repository navigation
build: cap engine compile jobs by available RAM - #1
Merged
Merged
Conversation
Cargo's NUM_JOBS is the CPU count (32 here); 32 concurrent cc1plus on the
engine sources OOM-kills the compiler ("Terminated signal terminated
program cc1plus"). Default to one job per 2 GB of MemAvailable, capped at
NUM_JOBS; SK33P_JOBS still overrides.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 jobs still tripped earlyoom on a shared box (each cc1plus is ~350 MB, but other services spike). 4 jobs builds clean in 43s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
cargo build --releasefailed on a 32-core box withc++: fatal error: Terminated signal terminated program cc1plus: build.rs passed cargo'sNUM_JOBS(32) tocmake --build --parallel.The SIGTERM comes from earlyoom (
-m 6,3 -s 100,100 --prefer ...cc1plus...), not the kernel: once MemAvailable drops under 6% with swap full, it kills cc1plus first. Each cc1plus is only ~350 MB, but on a shared box other services spike; 8 jobs still got killed.SK33P_JOBSstill overrides. README updated.Verified: clean
cargo build --releaseon the same box picks 4 jobs and finishes in 43s with no kills (32 and 8 jobs both failed).🤖 Generated with Claude Code