← Back to Pull requests

[History Server] Tune CPU, memory, and event logging for cold loads #5095

Closed
unknown closed this pull request without merging on Aug 11, 2026 13:42 UTC
View on GitHub
unknown unknown commented on Aug 06, 2026 01:31 UTC
Author

Why

Cold-loading large sessions is CPU- and memory-intensive. A 500m CPU limit throttles loads, while one Info log per event adds avoidable work and noise.

  • CPU: keep the 500m request and leave the limit to operators. One 50k-task session, five randomized reads per setting: median 84s → 34s.
  •   xychart-beta
          title "Cold load — before vs after"
          x-axis ["Before: 500m limit", "After: no limit"]
          y-axis "Cold-load time (seconds)" 0 --> 100
          bar [84, 34]
      

  • Per-event logging: move Info to Debug. Separate 50k-task runs measured 97.9s → 85.3s (~13%); these runs were not paired, so this is supporting evidence rather than an isolated causal estimate.
  •   xychart-beta
          title "Per-event logging — observed cold-load time"
          x-axis ["Before: Info", "After: Debug"]
          y-axis "Cold-load time (seconds)" 0 --> 110
          bar [97.9, 85.3]
      

  • Memory: use a 2Gi request, an 8Gi encoded-cache soft bound, and a 12Gi limit in all standalone examples. This leaves room for roughly one 100k-task decode; larger concurrent reads still need workload-specific tuning.
  • <img width="1179" height="577" alt="image" src="https://github.com/user-attachments/assets/f2b522c1-ce12-4d71-9baa-21aeb42165f4" />

    <img width="1187" height="616" alt="image" src="https://github.com/user-attachments/assets/0664426d-4717-4e68-88a5-0a603a4d884c" />

    Raw measurements and reproduction scripts.

    Checks

  • History Server build and race tests

  • E2E package compile

  • Manual Kind benchmarks
  • Diff: 210 lines (+157 / -53) across 2 files Reviewer: Future-Outlier Review duration: 7931m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 210 lines diff across 2 files
    0.36
    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%
    56%
    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
    Diff Size diff_size
    0.320
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5095"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    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: 36.5% (MEDIUM) · Higher = larger blast radius
    36.5%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 15.8% · Safe to merge
    15.8%