Skip to content

benchmarking: expand cAdvisor scrape allowlist for kernel PSI, networ… - #1599

Open
Nishanth Kotla (Nishanth29) wants to merge 1 commit into
agent-substrate:mainfrom
Nishanth29:benchmarking/monitoring-psi
Open

benchmarking: expand cAdvisor scrape allowlist for kernel PSI, networ…#1599
Nishanth Kotla (Nishanth29) wants to merge 1 commit into
agent-substrate:mainfrom
Nishanth29:benchmarking/monitoring-psi

Conversation

@Nishanth29

@Nishanth29 Nishanth Kotla (Nishanth29) commented Sep 10, 2026

Copy link
Copy Markdown

Fixes #1588

What this PR does

This PR updates the Prometheus cAdvisor scrape configuration in benchmarking/monitoring.yaml to retain Linux kernel Pressure Stall Information (PSI), network bandwidth, disk I/O throughput, and host-level node resource utilization.

Problem

Currently, monitoring.yaml restricts cAdvisor scrapes to only:
container_(memory_working_set_bytes|cpu_usage_seconds_total|spec_memory_limit_bytes)
and unconditionally drops series with container="".

Because cAdvisor reports the host root cgroup (id="/") with an empty container label, this configuration strips:

  1. All host-level kernel PSI stalls (cpu.pressure, io.pressure, memory.pressure).
  2. Host system daemon resource overhead (containerd, kubelet, virtualization runtime).
  3. Container network bandwidth (container_network_*) and disk I/O (container_fs_*).

Under high-density multi-tenant agent benchmarks, diagnosing whether tail latency spikes stem from CPU scheduling contention, disk storage bottlenecks, or memory pressure is difficult without kernel PSI.

Proposed Changes

In benchmarking/monitoring.yaml:

  1. Relabel Host Root cgroup: Relabel id="/" to container="node" before dropping empty container labels, preserving host-level node rollups.
  2. Expand Allowlist Regex: Keep container_pressure_* (Linux PSI), container_network_*, container_fs_*, container_cpu_cfs_*, and container_memory_rss.
  3. Prevent Pod Double-Counting: Drop empty container labels selectively only for cumulative memory working set and CPU usage to prevent 2x double-counting between pod slices and container scopes.

How this was tested

Tested on a benchmark cluster running the glutton user workload:

  • Verified that container_pressure_* metrics (CPU, memory, and I/O) are actively collected and queryable in Prometheus.

  • Verified that host-level root cgroup metrics appear under container="node".

  • Verified that container network and filesystem I/O metrics are retained, while pod-level duplicate CPU and memory working-set series are dropped as intended.

  • Tests pass

  • Appropriate changes to documentation are included in the PR

@maxsmythe Max Smythe (maxsmythe) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

[benchmarking] Expose host kernel PSI metrics and relabel root cgroup in cAdvisor

2 participants