Skip to content

cAdvisor constantly polls cgroup data for metrics that have been disabled #2932

Closed
@eero-t

Description

@eero-t

This is continuation on #2897 issue. After that, cAdvisor code was change to support enabling/disabling all metrics, including "cpu" & "app" ones in #2910.

Setup:

  • Ubuntu 20.04 host (= cgroup v1)
  • Few days old git head of runC & cAdvisor (and drm-tip kernel)

Use-case:

  • Start cAdvisor with only one metric enabled: cadvisor -enable_metrics hugetlb

Expected output:

  • Only the enabled metrics are queried (in this case, "hugetlb")

Actual output:

  • cAdvisor constantly queries "cpu" & "pids" cgroups

These are the opened file & dir names from 1 min of tracing:

# strace -f -e openat -p $(pidof cadvisor) 2> trace.txt
^C
# grep openat trace.txt | grep -v "openat resumed" | cut -d'"' -f2 | sed 's%^.*/%%' | sort | uniq -c | sort -nr
   2002 cpu.shares
   2002 cpu.cfs_quota_us
   2002 cpu.cfs_period_us
   1976 pids.max
    134 system.slice
...

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