From 4a1d6539bf6e67b825421cd68a76ec68c5a24841 Mon Sep 17 00:00:00 2001 From: tegwick Date: Wed, 21 Oct 2026 20:54:00 +0200 Subject: [PATCH] FORGE-WP-0011: Forgejo and runner resource requests (CUST-WP-0071 wave 1) Co-Authored-By: Claude Opus 5.5 Assistant: claude-code Assistant-Model: opus Assistant-Process: 276069@bnt-lap001 Assistant-Session: 2e192b3d-b3e8-4403-94d4-d55a2c8b476c --- helm/forgejo-values.yaml | 13 +++++++++++++ manifests/forgejo-runner.yaml | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/helm/forgejo-values.yaml b/helm/forgejo-values.yaml index 3bb9812..08a219e 100644 --- a/helm/forgejo-values.yaml +++ b/helm/forgejo-values.yaml @@ -4,6 +4,19 @@ strategy: type: Recreate +# Main Forgejo container sizing (FORGE-WP-0011, CUST-WP-0071, RESOURCE-WP-0008). +# Evidence 2026-10-21 (7d): CPU p95 133-160m, peak ~1030m; memory working set +# p95 ~956Mi, per-pod peak 1252Mi, RSS peak 500Mi; no OOM events. +# Request = p95 rule (200m / 1104Mi). Memory limit 1536Mi = 1.23x working-set +# peak and ~3x RSS peak (the rest is reclaimable page cache). No CPU limit: +# bursts to ~1 core are normal for git pack/clone work and must not throttle. +resources: + requests: + cpu: 200m + memory: 1104Mi + limits: + memory: 1536Mi + service: http: type: ClusterIP diff --git a/manifests/forgejo-runner.yaml b/manifests/forgejo-runner.yaml index ccbb94b..a886adb 100644 --- a/manifests/forgejo-runner.yaml +++ b/manifests/forgejo-runner.yaml @@ -100,6 +100,16 @@ spec: - -H - tcp://127.0.0.1:2375 - --tls=false + # FORGE-WP-0011: job workload runs here (one job at a time, + # runner capacity: 1). Request covers idle p95 (391Mi); the limit + # bounds a build burst. Peak 7d: 200m / 693Mi working set. + resources: + requests: + cpu: 100m + memory: 432Mi + limits: + cpu: 1500m + memory: 2Gi readinessProbe: exec: command: ["sh", "-c", "wget -q -O- -T 3 http://127.0.0.1:2375/_ping | grep -qx OK"] @@ -108,6 +118,13 @@ spec: - name: runner image: code.forgejo.org/forgejo/runner@sha256:5071e6832313bafe71577e05631bece88caff08fcfb372193e4a21941f4ed54b imagePullPolicy: IfNotPresent + # FORGE-WP-0011: runner daemon; p95 2m / 56Mi, peak 124m / 459Mi + # (host-label jobs run in this container). Pod request total + # 125m / 496Mi. No limit set in this change (see FORGE-WP-0011). + resources: + requests: + cpu: 25m + memory: 64Mi env: - name: DOCKER_HOST value: tcp://127.0.0.1:2375