Skip to content

Home / Proof

Telemetry lab: real production

295 MiB reclaimed on production AKS with zero restarts

Node memory, aks-omega-zero

80%90%100%BeforeTrim startsKEDA removedAfter96.3%85.7%
Replayable trace of the recorded before and after readings. Intermediate points are interpolated for display; the raw output is in the drawer.
  • Environment: Production Azure AKS (aks-omega-zero)
  • Type: Real production case study

Before asking any enterprise team to trust Trimline on their infrastructure, we ran our own audit discipline on our live production AKS cluster. We reclaimed 10.6 percentage points of memory headroom and avoided an unnecessary Azure VM SKU upgrade without interrupting a single active AI workload.

The context

Our production cluster (aks-omega-zero) runs the Singularity / Hope AI platform alongside core API services inside a tight 2,794 MiB node envelope. Memory utilization climbed to 96.3% (2,690 of 2,794 MiB), leaving almost no margin against out-of-memory kills during routine releases.

The challenge

The default reaction to a 96% memory alert is vertical scaling: paying for a larger node SKU every month. Our own read-only audit confirmed zero orphaned resources and showed that two idle components, KEDA (whose only GPU target job was already scaled to zero) and an unused Azure Files CSI driver, were consuming hundreds of megabytes around the clock, while static storefront files were coupled to application container releases.

How we solved it

  • Rollback saved first. We captured the exact pre-change manifests and reinstall commands (ROLLBACK.md) before touching a single object.
  • Targeted infrastructure trim. We removed KEDA and the unused Azure Files driver while keeping hope-instruct and every live API endpoint online, polling HTTP 200 health checks every 10 seconds.
  • Edge decoupling. We moved static Trimline web assets and worker routes off AKS onto Cloudflare Pages and Workers, separating storefront deployments from production AI compute.

Verified result

Cluster memory dropped from 2,690 MiB (96.3%) to 2,395 MiB (85.7%): 295 MiB reclaimed with zero restarts, zero downtime, and no node upgrade.

Transparency note. Avoiding a future node SKU upgrade is documented cost avoidance, not a prior-bill reduction, so we never count it toward verified savings.

Raw output

kubectl, verbatim.

Captured before and after the change. Pod-level lists and internal addresses are omitted.

Before: 2026-11-18 17:43:36 EST

===== kubectl top node =====
NAME                             CPU(cores)   CPU(%)   MEMORY(bytes)   MEMORY(%)   
aks-system-10882984-vmss000000   71m          3%       2692Mi          96%         

After: ===== AFTER SNAPSHOT 2026-11-18 17:49:05 EST =====

===== kubectl top node =====
NAME                             CPU(cores)   CPU(%)   MEMORY(bytes)   MEMORY(%)   
aks-system-10882984-vmss000000   66m          3%       2395Mi          85%         

Health poll (25 checks, every 10 to 15 seconds)

poll start 2026-11-18 17:44:17 EST
2026-11-18 17:44:17 EST nodes=1 ready=Ready, | gateway-66f887f9c6-6fw8v 1/1 Running; hope-856758b5b4-98rc8 1/1 Running; hope-instruct-76454954d-7fhgk 1/1 Running;  | health=200 healthz=200 finops/=200
2026-11-18 17:44:30 EST nodes=1 ready=Ready, | gateway-66f887f9c6-6fw8v 1/1 Running; hope-856758b5b4-98rc8 1/1 Running; hope-instruct-76454954d-7fhgk 1/1 Running;  | health=200 healthz=200 finops/=200
...
2026-11-18 17:49:07 EST nodes=1 ready=Ready, | gateway-66f887f9c6-6fw8v 1/1 Running; hope-856758b5b4-98rc8 1/1 Running; hope-instruct-76454954d-7fhgk 1/1 Running;  | health=200 healthz=200 finops/=200
2026-11-18 17:49:20 EST nodes=1 ready=Ready, | gateway-66f887f9c6-6fw8v 1/1 Running; hope-856758b5b4-98rc8 1/1 Running; hope-instruct-76454954d-7fhgk 1/1 Running;  | health=200 healthz=200 finops/=200
poll stop 2026-11-18 17:49:32 EST

Rollback

The rollback manifest we saved first.

Written before any object was touched. No secrets in this file.

ROLLBACK.md

# Rollback: restore KEDA and Azure Files CSI (pre-h20 memory trim)

Recorded 2026-11-18 America/New_York. No secrets in this file.

KEDA was a Helm install (chart keda-2.16.1, app 2.16.1, release name `keda`, namespace `keda`), not the AKS add-on (`workloadAutoScalerProfile.keda` was null). User-supplied Helm values were empty (chart defaults). Do not use `az aks update --enable-keda` unless you intentionally want the AKS-managed add-on instead of this Helm release.

## Restore KEDA (Helm)

```bash
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm install keda kedacore/keda --namespace keda --create-namespace --version 2.16.1
# Then restore the paused ScaledObject and TriggerAuthentication (secret sb-connection was left in place):
kubectl apply -f ./backups/keda-pre-h20/triggerauthentications.yaml
kubectl apply -f ./backups/keda-pre-h20/scaledobjects.yaml
```

The ScaledObject `omega-zero/crystallizer-gpu` was paused (`autoscaling.keda.sh/paused-replicas: "0"`), target deploy at 0 replicas.

## Restore Azure Files CSI driver (AKS add-on)

```bash
az aks update -g rg-omega-zero -n aks-omega-zero --enable-file-driver
```

Do not use `--enable-disk-driver` (disk CSI stayed enabled; gateway-data uses disk.csi.azure.com).