Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgroup2: podman stats is wrong #4409

Closed
AkihiroSuda opened this issue Nov 1, 2019 · 2 comments · Fixed by #4423
Closed

cgroup2: podman stats is wrong #4409

AkihiroSuda opened this issue Nov 1, 2019 · 2 comments · Fixed by #4423
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@AkihiroSuda
Copy link
Collaborator

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman stats does not report CPU usage properly

Steps to reproduce the issue:

  1. podman run -it --rm --cpus 1.0 --runtime=/usr/local/bin/crun alpine sh -c "apk add --no-cache stress-ng && stress-ng -c 0
  2. podman stats

Describe the results you received:

CPU % won't reach more than 10%

Describe the results you expected:

Should be about 100%.

systemd-cgtop can report it properly.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:            1.6.3-dev
RemoteAPI Version:  1
Go Version:         go1.13.3
Git Commit:         2dae2577ccbeef502a8783c892a6c9e346153532
Built:              Fri Nov  1 14:48:38 2019
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: 2dae2577ccbeef502a8783c892a6c9e346153532
  go version: go1.13.3
  podman version: 1.6.3-dev
host:
  BuildahVersion: 1.11.4
  CgroupVersion: v2
  Conmon:
    package: Unknown
    path: /usr/local/bin/conmon
    version: 'conmon version 2.0.3-dev, commit: bc758d8bd98a29ac3aa4f62a886575bfec0e39a1'
  Distribution:
    distribution: ubuntu
    version: "19.10"
  MemFree: 3149606912
  MemTotal: 8318803968
  OCIRuntime:
    name: crun
    package: Unknown
    path: /usr/local/bin/crun
    version: |-
      crun version 0.10.4
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  SwapFree: 2147479552
  SwapTotal: 2147479552
  arch: amd64
  cpus: 2
  eventlogger: journald
  hostname: suda-ws01
  kernel: 5.3.0-19-generic
  os: linux
  rootless: false
  uptime: 8h 12m 2.71s (Approximately 0.33 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 15
  GraphDriverName: overlay
  GraphOptions: {}
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 21
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 1, 2019
@rhatdan
Copy link
Member

rhatdan commented Nov 1, 2019

@AkihiroSuda Do you want to open a PR to fix this?

@giuseppe
Copy link
Member

giuseppe commented Nov 1, 2019

I see the same issue on cgroups v1.

I've opened a PR, tested both with cgroups v1 and cgroups v2: #4423

giuseppe added a commit to giuseppe/libpod that referenced this issue Nov 2, 2019
Closes: containers#4409

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants