Repository navigation
fix: at macOS memory warning, start jobs while memory fits - #23
Merged
Merged
Conversation
macOS keeps its memory warning level for a long time, also with half of memory free. A running dev stack held it there, and the browser proof that needed the stack waited behind it for up to an hour. At warning, a job now starts when memory fits without any leeway, and no first run still grows. A job with a history has its whole need booked from its first second, so the next job may start at once. A first run books a guess, so new jobs wait until it has shown what it takes (the settling rule, at most two minutes). Critical still stops every new job. `warn_admit = false` keeps the old rule. Linux has no warning level and keeps its PSI rule. No queue entry, machine file or database change. Closes #22 Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Closes #22.
Problem
macOS keeps its memory warning level for a long time, also with half of memory free. A running dev stack held it there, and taskguard started nothing new at warning. The browser proof that needed the stack waited behind it: 25 minutes for one proof, an hour of retries for another.
Change
At warning (macOS only), a job starts when:
noise_mem, nooutside_admit, also when only long-lived jobs run), andA job with a history has its whole need booked from its first second, so the next job may start at once. A first run books a guess, so new jobs wait until it has shown what it takes (the existing settling rule, at most two minutes).
Critical still stops every new job.
warn_admit = falsekeeps the old rule. Linux has no warning level and keeps its PSI rule.Evidence
at_warning_jobs_start_while_memory_fits_and_no_first_run_grows.src/sim.rs), with the warning level held from 40% memory: the old rule never finished 4 of 6 scenarios. The new rule finished them in the same time and with the same peak memory as with no warning at all.Mixed versions
No change to
queue::Entry,machine::MachineSample, the database, or job keys.warn_admitis a new setting; older versions ignore it with a warning and keep stopping at warning.Blocker::Pressuregains optional output fields only.🤖 Generated with Claude Code