feat(bernese): USER.CPU maxjobs sizing + V_CLUFIN/V_CLU plumbing (RH-006) - #43
Merged
alfieprojectsdev merged 1 commit intoJul 2, 2026
Merged
Conversation
…006) Plumbing for the 502 GPSCLU_P single-cluster bottleneck (gap #13). The 40-min single-core final solve came from V_CLUFIN=A auto-clustering the whole network into ONE dense inversion; the fix is final-solution clustering + USER.CPU maxjobs across cores. That win is CONFIG, and its empirical value needs the R740 (BRN-001) — this ships the mechanisms. - cpu_config.compute_maxjobs(): maxjobs from PHYSICAL cores (sub-solves are FPU-bound, hyperthreads don't help), RAM-capped and reserve-aware. - cpu_config.set_user_cpu_maxjobs(): rewrites the localhost maxjobs field in USER.CPU, leaving command/speed/other CPUs/MSG lines intact. - PCFContext exposes v_clu (10) + v_clufin ('A', a MODE flag N/A per the real PCF — corrected from the readiness doc's 'set to a number' framing); the template now templates both (V_CLUFIN was absent). test_cpu_config.py +13. 88 pass, ruff + mypy clean. Verified via the rh-004 worktree venv (no uv sync — BPE running). Worktree .trees/rh-006-clustering. RH-006 stays PARTIAL: the actual V_CLUFIN split value is an R740 tuning task.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
RH-006 (plumbing) — USER.CPU maxjobs sizing + V_CLUFIN/V_CLU (gap #13)
Stacked on #38; base retargets to
mainonce #38 merges. Ships the orchestrator plumbing for the biggest R740 lever; the empirical clustering value is an R740 tuning task (see below).Problem
Every daily run spent ~40 min of ~2 h in PID 502 GPSCLU_P — a single-core GPSEST at 99% CPU. Cause:
V_CLUFIN=Aauto-clustering collapsed the whole network into one dense normal-equation inversion, unparallelized. On the R740 this is the single highest-value tuning win; without it, 270 stations/day is infeasible.Change (plumbing)
cpu_config.compute_maxjobs(physical_cores, ram_gb=…, reserve_cores=…)(task L) — maxjobs from physical cores, not logical CPUs (sub-solves are FPU-bound; hyperthreads sharing an FPU don't help), RAM-capped (floor(ram_gb / ram_per_job_gb)) and reserve-aware.cpu_config.set_user_cpu_maxjobs(text, n)— rewrites thelocalhostmaxjobs field inUSER.CPU, leaving command/speed/other CPU rows/MSG lines intact.PCFContextnow exposesv_clu(default10) andv_clufin(default"A"); the template templates both —V_CLUFINwas absent from the template entirely.Correction to the readiness doc
The real PCF shows
V_CLUFINis a mode flag (Aauto /Nskip), not a cluster-size number as the readiness doc implied.Aproduced the one-giant-cluster solve. The orchestrator can now inject a chosenV_CLUFIN+ a core-sizedmaxjobs, but the value that actually parallelizes the final solve is empirical and needs the R740's core count + real timing (BRN-001, not installed). So RH-006 stays PARTIAL — mechanisms shipped, tuning value deferred.Tests
test_cpu_config.py+13 (maxjobs cores/reserve/floor/RAM-cap/validation; set_user_cpu_maxjobs localhost-only rewrite + no-op + reject; PCFContext clustering defaults/override; template exposes the vars). 88 pass, ruff + mypy clean. Verified via the rh-004 worktree venv (nouv sync— BPE running). Worktree.trees/rh-006-clustering.