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

Podman stats does not show memory limits set per container (aarch64) #8265

Closed
alosadagrande opened this issue Nov 6, 2020 · 2 comments · Fixed by #8290
Closed

Podman stats does not show memory limits set per container (aarch64) #8265

alosadagrande opened this issue Nov 6, 2020 · 2 comments · Fixed by #8290
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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

@alosadagrande
Copy link

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

/kind bug

Description

Wanted to limit the memory used by a container, however the memory limit it is not visualized in the stats command.

Podman is running on a F33 on a raspberry pi3 (aarch64)

Steps to reproduce the issue:

  1. Run a container limiting the memory to use:
# podman run -d --rm --memory=64m busybox sleep 1000000000000000
ff622b233d98cc083529ba01e9f937e9483eebfc1ad52ffef35cbecde4b1ee93
  1. Verify the stats
# podman stats

ID            NAME            CPU %   MEM USAGE / LIMIT  MEM %   NET IO          BLOCK IO           PIDS
7ccb9e39ee32  home-assistant  7.91%   219.3MB / 981.1MB  22.35%  -- / --         276.8MB / 39.99MB  92
ff622b233d98  angry_edison    --      1.069MB / 981.1MB  0.11%   628B / 1.646kB  757.8kB / 0B       1

Describe the results you received:

Podman stats shows the limit of the container to be the total amount of memory of the rpi3.

Describe the results you expected:

I would expect to see the limit set explicitly for the container. Basically, the same it shows in my laptop (Fedora x86_64)

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

This issue seems to show only in my ARM server.

Output of podman version:

# podman --version
podman version 2.1.1

Output of podman info --debug:

# podman info --debug
host:
  arch: arm64
  buildahVersion: 1.16.1
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.21-3.fc33.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 66d50d2f6c81e28bacd99ee8e8d222f028eef63f'
  cpus: 4
  distribution:
    distribution: fedora
    version: "33"
  eventLogger: journald
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.8.18-300.fc33.aarch64
  linkmode: dynamic
  memFree: 189890560
  memTotal: 981086208
  ociRuntime:
    name: crun
    package: crun-0.15-5.fc33.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 0.15
      commit: 56ca95e61639510c7dbd39ff512f80f626404969
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 373813248
  swapTotal: 489680896
  uptime: 1h 32m 12.61s (Approximately 0.04 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 2
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 4
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 2.0.0
  Built: 1602087702
  BuiltTime: Wed Oct  7 18:21:42 2020
  GitCommit: ""
  GoVersion: go1.15.2
  OsArch: linux/arm64
  Version: 2.1.1

Package info (e.g. output of rpm -q podman or apt list podman):

podman-2.1.1-12.fc33.aarch64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

physical ARM arch. Same behaviour in FC32 aarch

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 6, 2020
@alosadagrande alosadagrande changed the title Podman stats does not show memory limits set per container Podman stats does not show memory limits set per container (aarch) Nov 6, 2020
@alosadagrande alosadagrande changed the title Podman stats does not show memory limits set per container (aarch) Podman stats does not show memory limits set per container (aarch64) Nov 6, 2020
@mheon
Copy link
Member

mheon commented Nov 6, 2020

@vrothberg PTAL

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Nov 6, 2020
@vrothberg vrothberg self-assigned this Nov 10, 2020
@vrothberg vrothberg added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Nov 10, 2020
@vrothberg
Copy link
Member

I don't think that's a good first issue as it's a bug in the cgroups package, not a simple front end one.

@rhatdan rhatdan removed the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Nov 11, 2020
vrothberg added a commit to vrothberg/libpod that referenced this issue Nov 17, 2020
When looking up a container's cgroup path, parse /proc/[PID]/cgroup.
This will work across all cgroup managers and configurations and is
supported on cgroups v1 and v2.

Fixes: containers#8265
Signed-off-by: Valentin Rothberg <[email protected]>
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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.

5 participants