envoyproxy / envoyproxy/envoy

Envoy Overload Manager CPU Utilization monitor only supports cgroupv1

Open
#39,978 4 comments 1 reaction 0 assignees View on GitHub
area/overload_manager enhancement help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

**If you are reporting *any* crash or *any* potential security issue, *do not*
open an issue in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged appropriately.**

*Title*: Envoy Overload Manager CPU Utilization monitor only supports cgroupv1

*Description*:

I am attempting to use the overload_manager CPU utilization monitor as described here: https://www.envoyproxy.io/docs/envoy/latest/configuration/operations/overload_manager/overload_manager#loadshedding-in-k8s-environment

I am seeing these errors in my pod:
```shell
[2025-06-20 22:22:10.320][22][error][misc] [source/extensions/resource_monitors/cpu_utilization/linux_cpu_stats_reader.cc:67] Can't open linux cpu allocated file /sys/fs/cgroup/cpu/cpu.shares
[2025-06-20 22:22:10.320][22][info][main] [source/server/overload_manager_impl.cc:754] Failed to update resource envoy.resource_monitors.cpu_utilization: Can't open file to read CPU utilization
```

In reading through some information, the files there are for cgroupV1, whereas my pod is using cgroupv2. This means I cannot use the CONTAINER mode for CPU utilization metrics.

*Repro steps*:
- K8S version: 1.30.7
- Cloud provider: Azure
- Envoy version: v1.34.0

Output of my file system showing that it uses cgroupv2:
```shell
ls /sys/fs/cgroup/
cgroup.controllers
cgroup.events
cgroup.freeze
cgroup.kill
cgroup.max.depth
cgroup.max.descendants
cgroup.procs
cgroup.stat
cgroup.subtree_control
cgroup.threads
cgroup.type
cpu.idle
cpu.max
...
```

*Admin and Stats Output*:
Not necessary

*Config*:
>Include the config used to configure Envoy.
Not entirely necessary

*Logs*:
>Include the access logs and the Envoy logs.
Main error:
```shell
[2025-06-20 22:39:25.595][22][error][misc] [source/extensions/resource_monitors/cpu_utilization/linux_cpu_stats_reader.cc:67] Can't open linux cpu allocated file /sys/fs/cgroup/cpu/cpu.shares
[2025-06-20 22:39:25.595][22][info][main] [source/server/overload_manager_impl.cc:754] Failed to update resource envoy.resource_monitors.cpu_utilization: Can't open file to read CPU utilization
```

>**Note**: If there are privacy concerns, sanitize the data prior to
sharing.

*Call Stack*:
> If the Envoy binary is crashing, a call stack is **required**.
Please refer to the [Bazel Stack trace documentation](https://github.com/envoyproxy/envoy/tree/main/bazel#stack-trace-symbol-resolution).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.