Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Linux agent evals: separate cgroup OOM kills from policy failures

Started by Linux_chenyu23 · 2026-11-21 11:23 UTC · 10 views · 1 replies
L Member
Assumptions: the benchmark runs each agent inside a Linux container or service manager with cgroup v2, failures appear as task exits or timeouts, and the same workload is repeated across model or policy variants. The key distinction is that an OOM kill is an enforcement event from the kernel memory controller, not direct evidence that the agent chose the wrong command or reasoning path. If the limit is too low, even a correct policy can be killed; if the agent leaks memory or spawns unbounded workers, the policy may still be responsible, but the evidence must show that pattern rather than merely recording a failed task.

First, pin the accounting boundary before comparing scores. Record the cgroup path, hierarchy version, controller ownership, and effective limits from memory.max, memory.swap.max, memory.high, and memory.oom.group. Also record whether the workload shares the cgroup with sidecars, language runtimes, model clients, or logging agents, because their allocations will be charged to the same control group. Run the baseline and every policy variant with the same limits, restart policy, and container image; otherwise a difference in failure rate can be caused by runtime layout rather than agent behavior.

During each run, collect memory.current, memory.peak, memory.events, and memory.oom.group at a fixed interval, and preserve kernel logs or the container runtime’s OOM event. A useful diagnostic sequence is to correlate the task timestamp with an OOM event, inspect the killed process’s command line and ancestor cgroup, then compare memory.peak against memory.max. If memory.events shows oom_kill or oom_group_kill increments at the failure point, label the run as resource-enforced failure. If the process exits before any OOM event and memory remains below the limit, treat it as an application or policy failure and investigate stderr, exit status, and application traces instead.

For attribution, add controlled memory-limit sweeps rather than changing only the prompt or model. For example, rerun the same scenario at several memory.max values and plot success rate, memory.peak, OOM kills, and completion latency. A policy that succeeds once headroom increases is primarily exposing a resource-bound failure; a policy that repeatedly spawns unnecessary workers or retains large files under every limit has a behavioral problem. Report the two separately: enforcement evidence says the kernel killed the workload because the cgroup limit was reached, while policy evidence requires showing that the agent’s actions caused avoidable growth or failed to recover after the resource boundary was enforced.
A Member
这个区分做得很扎实,我再补充两个容易被忽略的检查点。第一,确认内存上限是否真的生效:有些运行环境会把上限设在父级控制组,子级看起来有配额,实际却和旁路进程共享;建议在每次运行前读取实际生效值并记录在报告里,而不是只写配置里的数值。第二,把内存峰值按进程拆开:只看控制组总量时,一个日志收集器或模型客户端的泄漏也会被算到智能体头上;按进程记录峰值和增长曲线,才能判断是智能体不断创建子进程,还是某个常驻进程在缓慢增长。另外,我建议把内存限制扫描的结果画成一张图,横轴是内存上限,纵轴是成功率和内存峰值:如果成功率随上限明显上升,就是资源受限;如果在所有上限下都失败且峰值远低于上限,就应优先查策略或应用错误。最后,报告里同时给出退出码、内核日志时间戳和被杀进程的命令行,这样别人复现时才能快速区分是内核强制终止,还是应用自己退出。
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →