Skip to content

Cgroup V2: cAdvisor Exposes Misleading IO metrics (container_fs_*_bytes_total) #2881

@iyashu

Description

@iyashu

Few IO related metrics are always showing zero values (e.g container_fs_writes_bytes_total, container_fs_reads_bytes_total ) in cgroup v2 enabled node even there is one container writing heavily into some disk in that node. Although, I can see the io.stats file under that cgroup directory is showing the correct values.

while [ 1 ]; do echo $(cat io.stat | grep "254:3"); sleep 1; done
254:3 rbytes=598016 wbytes=227002702848000 rios=146 wios=124342581 dbytes=0 dios=0
254:3 rbytes=598016 wbytes=227003599380480 rios=146 wios=124343436 dbytes=0 dios=0
254:3 rbytes=598016 wbytes=227004496056320 rios=146 wios=124344326 dbytes=0 dios=0
254:3 rbytes=598016 wbytes=227005448163328 rios=146 wios=124345234 dbytes=0 dios=0
254:3 rbytes=598016 wbytes=227006373007360 rios=146 wios=124346116 dbytes=0 dios=0
254:3 rbytes=598016 wbytes=227007340843008 rios=146 wios=124347039 dbytes=0 dios=0
254:3 rbytes=598016 wbytes=227008280367104 rios=146 wios=124347935 dbytes=0 dios=0

In cgroup v1, I can see that the same metrics are being surfaced with the expected values in prometheus, but thats not the case with cgroup v2.

Original Issue: kubernetes/kubernetes#102285

  • Cadvisor Version: v0.37.4 (even the latest version is having the same issue)
  • OS (e.g: cat /etc/os-release): Debian GNU/Linux 10 (buster)
  • Kernel (e.g. uname -a): 5.10.0-0.bpo.3-cloud-amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions