Skip to content

docs(agent): CPU and memory limits - #106

Merged
amitava82 merged 1 commit into
kloudmate:masterfrom
ansh-devs:docs/agent-resource-limits
Nov 20, 2026
Merged

amitava82 merged 1 commit into
kloudmate:masterfrom
ansh-devs:docs/agent-resource-limits

Conversation

@ansh-devs

Copy link
Copy Markdown
Member

How the agent sizes its memory budget and protects itself, and how to set a hard CPU and memory cap on Linux, Docker, Kubernetes and Windows: systemd drop-ins, docker update, the Helm resources values, and the Windows service environment. Covers tuning the protection, turning eBPF back on and checking the limits in effect, with a pointer from troubleshooting.

@ansh-devs
ansh-devs requested a review from amitava82 as a code owner November 19, 2026 12:34
@amitava82

Copy link
Copy Markdown
Member

This seems lot of engineering (specially ebpf off/on) that memroylimit processor could have done?

@ansh-devs
ansh-devs force-pushed the docs/agent-resource-limits branch from d32136f to b595d8e Compare November 20, 2026 09:12
Add KloudMate Agent > CPU and memory limits: how to cap the agent's
CPU and memory with the operating system or container runtime.

- Linux: a systemd drop-in with MemoryMax, MemorySwapMax=0 and
  CPUQuota, how to check it with systemctl show, and MemoryLimit for
  hosts still on cgroup v1.
- Docker: docker update --memory --memory-swap --cpus on the km-agent
  container, kept across upgrades from KloudMate and lost on reinstall.
- Kubernetes: the Helm resources limits, with an example.
- Windows: no system-level cap is available for a service.
- How to choose the limits from observed usage, and how to tell from
  the journal that the kernel stopped the agent at its limit.

Troubleshooting gets a line that points here when the agent is stopped
at a memory limit.

Co-Authored-By: Ansh Garhewal <anshdevsin@gmail.com>
@ansh-devs
ansh-devs force-pushed the docs/agent-resource-limits branch from b595d8e to 5e54f30 Compare November 20, 2026 09:12
@ansh-devs

Copy link
Copy Markdown
Member Author

This seems lot of engineering (specially ebpf off/on) that memroylimit processor could have done?

shall do benchmarks with otelcol off then monitor allocs. etc. so cross-compare. Meanwhile this is safe to merge as this will do hard cap from the system level rather we handling it in the agent process

@amitava82
amitava82 merged commit 29202b2 into kloudmate:master Nov 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants