ops(siriussec): bound CPU bursts to the 15W power budget

siriussec is a T480 on a 5V/3A (15W) USB-C supply and died 2026-11-22 04:20
after ~12h on battery. Host PL1 was 25W with turbo on, so any sustained burst
outran the adapter. Cap the two workload-side bursts that can pin cores:

- forgejo-runner-amd64 dind: no CPU limit before -> add cpu: 3
- metabase + farrisilk metabase: cpu limit 2 -> 1 each (two JVMs = 4 threads)

Host-side cap (PL1 12W/PL2 15W, no_turbo=1) is applied by
cpu-power-cap.service on the node itself, not by this repo.
This commit is contained in:
Lance Walters 2026-11-22 05:42:52 -05:00
commit 530320bbfe
3 changed files with 12 additions and 2 deletions

View file

@ -87,7 +87,8 @@ spec:
cpu: 250m
memory: 1Gi
limits:
cpu: "2"
# Capped with the main Metabase: see apps/base/metabase/deployment.yaml
cpu: "1"
memory: 2Gi
---
apiVersion: v1

View file

@ -117,6 +117,11 @@ spec:
cpu: 200m
memory: 512Mi
limits:
# Hard ceiling on CI burst draw: siriussec is a laptop on a 15 W
# USB-C supply, and dind previously had no CPU limit, so one
# Android/x86_64 build could pin all 8 threads (~25 W package)
# and drain the battery faster than the adapter refills it.
cpu: 3
memory: 4Gi
- name: runner
image: code.forgejo.org/forgejo/runner:5.0.1

View file

@ -79,5 +79,9 @@ spec:
cpu: 250m
memory: 1Gi
limits:
cpu: "2"
# 2 → 1: two Metabase JVMs on the gateway node could together
# burst to 4 threads on a 15 W adapter. 1 core each keeps the
# node inside its power budget; UI latency is unaffected at this
# query volume.
cpu: "1"
memory: 2Gi