Skip to content

Inconsistent IO stats Op values between cgroup v1 and v2 #2964

@iyashu

Description

@iyashu

We use libcontainer cgroup library GetStats api in cadvisor to fetch the usage stats for a given cgroup set. But it turns out that cgroup v2 implementation of cgroup manager GetStats api provides blkio stats with lower case Op keys under BlkioStatEntry as compare to cgroup v1. For instance, in cgroup v1, we get Op = Write for IoServiceBytesRecursive under BlkioStats, while in cgroup v2, we get Op = write (lower w case) for same stat. See this to know about how BlkioStatEntry get populated in cg1 as compare to cg2.

Does it make sense to change Op value to capitalized case Read and Write similar to cgroup v1? If yes, I can create a pull request with the fix.

Original cAdvisor Issue - google/cadvisor#2881

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions