πŸ“šBook Signing at KubeCon EU 2026Meet us at Booking.com HQ (Mon 18:30-21:00) & vCluster booth #521 (Tue 24 Mar, 12:30-1:30pm) β€” free book giveaway!RSVP Booking.com Event
Autoscaling intermediate ⏱ 15 minutes K8s 1.28+

OpenClaw Resource Limits and Tuning on Kubernetes

Size CPU, memory, and storage for OpenClaw on Kubernetes. Tuning profiles for light usage, browser automation, and production deployments.

By Luca Berton β€’ β€’ πŸ“– 5 min read

πŸ’‘ Quick Answer: Start with 512Mi/250m requests, 2Gi/1 CPU limits for the gateway. Add 1-2Gi for Chromium sidecar. Use VPA to right-size after a week of real usage data. The init container needs minimal resources (64Mi/100m limits).

The Problem

OpenClaw resource needs vary dramatically: a simple chatbot uses 200MB, while an agent running browser automation, multiple concurrent sessions, and heavy tool use can consume 4GB+. Under-provisioning causes OOMKills and slow responses; over-provisioning wastes cluster resources.

The Solution

Resource Profiles

Light β€” Single user, text-only

resources:
  requests:
    memory: 256Mi
    cpu: 100m
  limits:
    memory: 512Mi
    cpu: 500m

Standard β€” The official default

resources:
  requests:
    memory: 512Mi
    cpu: 250m
  limits:
    memory: 2Gi
    cpu: "1"

Heavy β€” Browser automation + multi-agent

# Gateway container
resources:
  requests:
    memory: 1Gi
    cpu: 500m
  limits:
    memory: 4Gi
    cpu: "2"
# Chromium sidecar
resources:
  requests:
    memory: 1Gi
    cpu: 500m
  limits:
    memory: 2Gi
    cpu: "1"

What Consumes Resources

graph TD
    A[OpenClaw Memory Usage] --> B[Node.js Runtime ~150MB base]
    A --> C[Active Sessions ~50MB each]
    A --> D[Tool Execution ~100-500MB]
    A --> E[File Operations ~variable]
    A --> F[Chromium Sidecar ~500MB-2GB]
ComponentMemoryCPUNotes
Node.js base150MBidle ~50mAlways present
Per session50MBburst ~200mConversation context
Shell exec100-500MBburst ~500mDepends on command
Browser page200-500MBburst ~1 CPUPer active tab
Skill loading50MBone-timeCached after first load

Init Container Resources

The init container runs briefly and needs minimal resources:

initContainers:
  - name: init-config
    resources:
      requests:
        memory: 32Mi
        cpu: 50m
      limits:
        memory: 64Mi
        cpu: 100m

Right-Sizing with VPA

Deploy Vertical Pod Autoscaler to get recommendations:

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: openclaw-vpa
  namespace: openclaw
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: openclaw
  updatePolicy:
    updateMode: "Off"  # Recommendation only
  resourcePolicy:
    containerPolicies:
      - containerName: gateway
        minAllowed:
          cpu: 100m
          memory: 256Mi
        maxAllowed:
          cpu: "4"
          memory: 8Gi
# Check recommendations after ~1 week
kubectl get vpa openclaw-vpa -n openclaw -o jsonpath='{.status.recommendation}'

Storage Sizing

Usage PatternPVC SizeNotes
Basic chatbot1GiMinimal state
Personal assistant5GiMemory, skills, logs
DevOps agent10GiDefault β€” repos, logs, artifacts
Multi-agent team20GiShared workspace, many skills

Common Issues

OOMKilled β€” Memory Limit Too Low

kubectl describe pod -n openclaw -l app=openclaw | grep -A3 "Last State"
# OOMKilled β†’ increase memory limit

# Check actual usage
kubectl top pod -n openclaw

CPU Throttling β€” Slow Responses

# Check throttling
kubectl exec -n openclaw deploy/openclaw -- cat /sys/fs/cgroup/cpu.stat
# Look for nr_throttled > 0

Increase CPU limit or switch to burstable QoS (no CPU limit):

resources:
  requests:
    cpu: 250m
    memory: 512Mi
  limits:
    memory: 2Gi
    # No CPU limit β†’ burstable, can burst to node capacity

Best Practices

  • Start with standard profile β€” 512Mi/250m requests, 2Gi/1 CPU limits
  • Use VPA in recommendation mode β€” right-size after real usage data
  • Consider burstable CPU β€” omit CPU limits for bursty workloads
  • Always set memory limits β€” prevent OOM from affecting other pods
  • Size init container separately β€” 64Mi is plenty for config copy
  • Monitor with kubectl top β€” check actual vs requested regularly

Key Takeaways

  • OpenClaw base usage is ~150MB; each session adds ~50MB
  • Browser automation (Chromium sidecar) needs 1-2GB additional memory
  • Use VPA in recommendation mode to right-size after real usage
  • Consider burstable QoS (no CPU limit) for responsive agent sessions
  • The official default (512Mi/250m β†’ 2Gi/1CPU) works for most single-user deployments
#openclaw #resource-limits #tuning #performance #autoscaling
Luca Berton
Written by Luca Berton

Principal Solutions Architect specializing in Kubernetes, AI/GPU infrastructure, and cloud-native platforms. Author of Kubernetes Recipes and creator of CopyPasteLearn courses.

Kubernetes Recipes book cover

Want More Kubernetes Recipes?

This recipe is from Kubernetes Recipes, our 750-page practical guide with hundreds of production-ready patterns.

Luca Berton Ansible Pilot Ansible by Example Open Empower K8s Recipes Terraform Pilot CopyPasteLearn ProteinLens