-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 system df does not seem to report actual disk usage #16135
podman system df does not seem to report actual disk usage #16135
Comments
Thanks, @sjug! I recall some fixes in the past that went into the image-size calculation but need to track it down. |
I bet Podman's calculating images more than once. |
Please try with the latest version. I recall some fixes related to that. |
No need to check the latest version IMO. No changes were made there in libimage. But what Podman is counting is the sum of the image sizes which can exceed the total disk size given images can share layers. |
That's at least my guess. The reports try to calculate that out but I bet there's a fart. |
@sjug can you share the output of |
Ok, I found an easy reproducer:
That doesn't add up and the reported sizes in |
|
Add an API to query the sum of the layer sizes. This data is needed to fix containers/podman/issues/16135. Signed-off-by: Valentin Rothberg <[email protected]>
Add an API to query the sum of the layer sizes. This data is needed to fix containers/podman/issues/16135. Signed-off-by: Valentin Rothberg <[email protected]>
Still need to do the plumbing in podman. |
Fix two bugs in `system df`: 1. The total size was calculated incorrectly as it was creating the sum of all image sizes but did not consider that a) the same image may be listed more than once (i.e., for each repo-tag pair), and that b) images share layers. The total size is now calculated directly in `libimage` by taking multi-layer use into account. 2. The reclaimable size was calculated incorrectly. This number indicates which data we can actually remove which means the total size minus what containers use (i.e., the "unique" size of the image in use by containers). NOTE: The c/storage version is pinned back to the previous commit as it is buggy. c/common already requires the buggy version, so use a `replace` to force/pin. Fixes: containers#16135 Signed-off-by: Valentin Rothberg <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman system df
doesn't show actual disk usage of container images.Looking to find the actual disk usage of the images on disk I tried the
podman system df
command.The image size output was 50% larger than my entire virtual disk.
Steps to reproduce the issue:
Pull many images that have common bases. I installed SNO on a VM with a 20G disk.
Check
podman system df
See actual disk usage of images
Describe the results you received:
The size of images reported vastly exceeds disk capacity.
Describe the results you expected:
Actual disk usage information.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No, this is the latest version shipped with OCP. I tried to reproduce on a different host with RHEL 8.6 and podman 4.1.1; it seemed to still report disk usage the same way.
Additional environment details (AWS, VirtualBox, physical, etc.):
libvirt VM
The text was updated successfully, but these errors were encountered: