← Back to Pull requests

perf(infra): configure GCP runner host THP madvise/defer #3272

Closed
unknown closed this pull request without merging on Dec 04, 2026 09:48 UTC
View on GitHub
unknown unknown commented on Dec 03, 2026 07:54 UTC
Author

TL;DR

Configure GCP runner hosts with THP enabled=madvise and defrag=defer on first boot and via OS Config (runner-thp), keeping KRUN_USE_THP opt-in via mstage.

Design doc: https://github.com/boxlite-ai/boxlite/issues/3153

Documentation: [runners.md](apps/infra/docs/runners.md), [gcp/runners.md](apps/infra/docs/gcp/runners.md)

How it works

runner-thp.ts writes /etc/tmpfiles.d/boxlite-thp.conf (0644) and applies sysfs madvise/defer without restarting boxlite-runner. First boot runs install before starting the service; GCP OS Config runs runner-thp before runner-unit-env. Stages opt in via BOXLITE_RUNNER_ENV='{"KRUN_USE_THP":"1"}'.

Verification

  • typecheck:mdeploy + targeted mdeploy tests (runner-thp, runner-boot, gcp-pitfalls, runner-update) -> 126/126 passed.

  • Scoped eslint on modified apps/infra/mdeploy files -> 0 errors.

  • Pending: Linux CI make test:apps:infra (macOS lacks flock) and staging verification.
  • Diff: 123 lines (+92 / -31) across 1 files Reviewer: DefeatMan Review duration: 1554m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 123 lines diff across 1 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.289
    Diff Size diff_size
    0.288
    Sensitive Paths sensitive_paths
    0.055
    Real PR Conversation Timeline
    1 comments
    "Review active on #3272"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55% (MEDIUM) · Higher = larger blast radius
    55%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.7% · Safe to merge
    21.7%