feat(web3): drop hugepages, fold the xmrig guard into monero - #4383
feat(web3): drop hugepages, fold the xmrig guard into monero#4383Tanguille wants to merge 10 commits into
Conversation
…ctoria-metrics-k8s-stack (0.89.0 ➔ 0.90.0) (#4380) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
48 slots (16x concurrency ratio) was a guess; 14d telemetry shows slots hit 32 in 0.055% of samples and never higher. Capping at 32 frees 16 slots (~1.2G) back to the shared byte budget for KV cache headroom.
v2.2.0 adds review_verbosity, which patches the bundled prompt with a ~300-word target and moves minor/info out of prose into the findings array. The hand-written "keep review length proportional" rule in the system_prompt addendum now duplicates it, so drop it.
Upstream #426 landed in v2.1.11: system_prompt_file and system_prompt are concatenated (file first, inline second) instead of the file being silently dropped. The standing rules move to .github/pr-review-prompt.md, leaving the scalar to hold only the per-PR release-notes branch.
tool_evidence_memory is on by default and seeds a corpus section telling the model to reuse prior evidence instead of re-gathering. The addendum is appended after the bundled default, so "cite only sources fetched this run" overrode it and forced a re-fetch every incremental review. Narrow the rule to the failure it was written for: claiming "confirmed" for a source that was never read.
…lumbing 42 of the last 83 reviews stopped at exactly the default 4 tool calls and none exceeded it, so the call budget bound every second review while the 900s wall clock went unspent. All 20 run_command calls in that sample were git_diff_stat, git_diff_name_only or git_status_short, re-deriving a diff the corpus already carries; on #4370 that was half the budget, and the review then called an unterminated regex correct without ever opening .renovaterc.json5.
PR #4349 emitted "Release notes: no release notes apply" and "Tool Harness Findings: the tool loop issued no tool calls" on a two-file Ceph change. The release-notes instruction fired on every PR regardless of whether anything was bumped; gate it on a version change and tell the reviewer to drop empty sections.
|
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: Organization UI 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:
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 |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 6, 2026 9:43p.m. | Review ↗ | |
| Shell | Aug 6, 2026 9:43p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
vm.nr_hugepages withheld 2368Mi from every node's allocatable memory even at 0 replicas, while control-2/3 sat at 99% booked with a 150Mi exporter Pending. Drop the sysctl and move xmrig to regular pages. xmrig requests 2Gi against the ~2336Mi RandomX needs: post-reclaim headroom is 2389Mi/2373Mi, and the true figure parks the miner Pending forever behind preemptionPolicy: Never. /tmp gains a sizeLimit since the dataset now shares the container's memory limit rather than living in hugetlb. Move xmrig-guard to monero/guard and rename its resources. Metrics stay xmrig_guard_* : the KEDA triggers, five alerts, the dashboard and 180d of series all reference them. Tuning, replayed over 180d at the native 20s cadence: - recovery dwell 300->180s, +0.8pp/+1.1pp over 30d, no change above 65C - panic 68->67C, zero measured cost, caps the hottest safe sample at 66.8C - recover 62 / trip 65 / trip_dwell 60 held against a 612-candidate grid Nothing is loosened: real bursts peak at 69.8C against a 70C rating, and the rise is p99 1.35C/min, not the 1.1 the design was sized on. control-1's flapping was telemetry, not policy. cadvisor scrapes at 60s where the other six sources scrape at 20s and query_cpu dates the observation by min() across them, so it self-invalidated 465 times in 10.26d against 45 and 49 on the NVMe nodes, each latching a 600s recovery dwell. Its budget is now 180s and carried on the policy, so the freshness check, the anti-replay gap and the dwell reset cannot drift apart; the VM step follows or the samples would never be returned.
15a3c13 to
f2e1c58
Compare
|
Recreating against |
Stacked on #4381. 4th layer: #4378 <- #4379 <- #4381 <- this.
Hugepages
vm.nr_hugepages: 1184withheld 2368Mi from every node's allocatable memory even at 0 replicas. xmrig has been 0/0 on all three nodes for 6d12h under the thermal guard;HugePages_Free == HugePages_Totaland cluster-widehugepages-2Mirequests were 0%.Unblocks
rook-ceph-exporter-control-2(150Mi, Pending 2h).Applies on next reboot. Nothing was applied to the cluster.
Coupled edits required by the removal:
--huge-pages->--no-huge-pages, bothhugepages-2Miblocks, the HugePages emptyDir, andIPC_LOCK(xmrig takes it only to raiseRLIMIT_MEMLOCKforMAP_HUGETLB).xmrig memory 32Mi/128Mi -> 2Gi/3Gi. Requested under the ~2336Mi RandomX needs: at the true figure the miner never schedules and
preemptionPolicy: Nevermeans it waits rather than preempts./tmpgainssizeLimit: 64Mibecause the dataset now shares the container limit instead of living in hugetlb.Net reclaim is 2368Mi idle, ~320Mi while mining. RandomX loses hashrate without hugepages; accepted.
Guard move
web3/xmrig-guard/app/->web3/monero/guard/, standalone ks.yaml folded intomonero/ks.yaml. Resources renamed toguard.Metrics stay
xmrig_guard_*. The KEDA triggers, 5 alert rules, the dashboard and 180d of series reference them.No
dependsOnadded: KEDA'sfallback: {failureThreshold: 1, replicas: 0}plus thecount == bool 1andtimestamp >= time() - 120gates mean an absent guard yields 0 replicas, so ordering cannot produce mining without a gate.Tuning
Replayed 180d of
node_hwmon_temp_celsiusat the native 20s cadence over a 612-candidate grid. Only 2026-07-27 14:02 onward reflects the deployed policy; before that the guard read all sensors rather thantemp1(~9C hotter), and 07-17..21 it emitted without enforcing.Nothing loosened. Measured bursts peak at p50 67.8 / p90 68.8 / max 69.8C against a 70C rating. Rise is p50 0.88 / p90 1.13 / p99 1.35 C/min, not the 1.1 the design was sized on; the budget test now uses 1.35 and pins the panic path, which governs on a fast ramp (68.69C at 75s) since the trip path models 68.04C above the panic limit.
Guard is working: zero samples >=70C while
safe=1. Before it existed, ungated mining put control-3 over its rating 51% of the time it mined, peaking at 86C.The prior
55.0%/38.8% vs 44.7%/31.5%figures do not reproduce on either sensor set. Direction holds, magnitudes were stale; restated in the doc.control-1 freshness
Flapping was telemetry, not policy: 465 query errors in 10.26d against 45 and 49 on the NVMe nodes,
source_age_secondsp99 102s against a 120s ceiling. cadvisor scrapes at 60s where the other six sources scrape at 20s andquery_cpudates the observation bymin()across them. Self-reinforcing at 1.7 errors/h idle vs 4.8/h with a miner, because the cadvisor join only engages when one is present. 85 of 118 mining bursts died under 5 minutes.Budget is now 180s for the CPU path, carried on the policy so the freshness check, anti-replay gap and dwell reset read one number and cannot drift. VM
stepfollows, or the samples would never be returned. Its thresholds replay at 93.8% safe against 75.8% observed.Follow-ups, not in this PR
evictionHard: 7%->1GiandsystemReserved: 1Gi->512Mi: another +1.54Gi/node.kubeReservedmust NOT be cut, measured/podruntimeis already above its 2Gi.nvme1Micron 7450 480GB runs ~10C hotter than the 980 PRO beside it and sets the gate on both nodes. Sun-hour idle baseline is 63-64C against a workload adding 8.5C in 7 min, so 68-72% of surplus goes unmined. Cooling it beats any threshold change.Verification
26/26 tests pass;
kustomize buildclean on web3, monero/guard, monero/xmrig, cnpg cluster.