envoyproxy/envoy

Envoy Overload Manager CPU Utilization monitor only supports cgroupv1

Open

#39,978 opened on Jun 20, 2025

View on GitHub
 (4 comments) (1 reaction) (0 assignees)C++ (5,373 forks)batch import
area/overload_managerenhancementhelp wanted

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

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:

[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:

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:

[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.

Contributor guide