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

Container Memory Usage Always 0 in 4.3.0 #6076

Closed
3 tasks done
robd003 opened this issue Dec 3, 2021 · 11 comments
Closed
3 tasks done

Container Memory Usage Always 0 in 4.3.0 #6076

robd003 opened this issue Dec 3, 2021 · 11 comments

Comments

@robd003
Copy link

robd003 commented Dec 3, 2021

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 17C272C8-850F-4CEB-AE3C-9BC16229A0B0/20211203180843 -- Virtualization.framework
  • Diagnostics ID: 17C272C8-850F-4CEB-AE3C-9BC16229A0B0/20211204031030 -- Hypervisor.framework

Expected behavior

Show memory usage of containers

Actual behavior

Containers always show 0 bytes used

Information

  • macOS Version: 12.1
  • Intel chip or Apple chip: M1 Max
  • Docker Desktop Version: 4.3.0

Steps to reproduce the behavior

Start any container. All containers report 0 for memory usage. CPU, network and disk I/O are all reported correctly.

@robd003 robd003 changed the title Container Memory Usage Always 0 if using new Big Sur virtualization.framework Container Memory Usage Always 0 in 4.3.0 Dec 4, 2021
@robd003
Copy link
Author

robd003 commented Dec 4, 2021

I've tried using Virtualization.framework and Virtualization.framework and both don't report memory usage.

Oddly if I use the cli docker stats container_name I can see the memory stats, but in the dashboard it's always 0

@robd003
Copy link
Author

robd003 commented Dec 7, 2021

Confirmed that this is broken on Intel Macs too.

It worked fine in 4.2.0, but broke with the 4.3.0 release.

@Avertae
Copy link

Avertae commented Dec 10, 2021

More input on this, in case containerized app depends on "/sys/fs/cgroup/memory/memory.limit_in_bytes" it fails to start with:
cat: /sys/fs/cgroup/memory/memory.limit_in_bytes: No such file or directory

4.2.0 was ok.

@stephen-turner
Copy link
Contributor

Thanks for the report, we're looking into this.

@stephen-turner
Copy link
Contributor

Also broken on Windows Hyper-V but not Windows WSL 2. We've added a release note and we're working on a fix.

@mat007
Copy link
Member

mat007 commented Jan 14, 2022

We have now fixed this issue in Docker Desktop 4.4.2, thanks!

@mat007 mat007 closed this as completed Jan 14, 2022
@robd003
Copy link
Author

robd003 commented Jan 14, 2022

@mat007 Awesome! Upgrading right now to verify

@browdues
Copy link

Hey there, I noticed this post today and upgraded to docker desktop 4.4.2, per the recommendation.

However, I still don't see both the mem and the cpu directories.

Note that I am on Mac, Catalina OS, using an Intel I9.

Here is what I see when I examine the contents of /sys/fs/cgroup:

root@eaas-configrun-service-7cbc8744ff-7zvgf:/# cd /sys/fs/cgroup/
cgroup.controllers        cgroup.threads            cpuset.cpus.partition     hugetlb.1GB.rsvd.max      io.latency                memory.max                pids.current
cgroup.events             cgroup.type               cpuset.mems               hugetlb.2MB.current       io.max                    memory.min                pids.events
cgroup.freeze             cpu.max                   cpuset.mems.effective     hugetlb.2MB.events        io.stat                   memory.oom.group          pids.max
cgroup.max.depth          cpu.stat                  hugetlb.1GB.current       hugetlb.2MB.events.local  memory.current            memory.stat               rdma.current
cgroup.max.descendants    cpu.weight                hugetlb.1GB.events        hugetlb.2MB.max           memory.events             memory.swap.current       rdma.max
cgroup.procs              cpu.weight.nice           hugetlb.1GB.events.local  hugetlb.2MB.rsvd.current  memory.events.local       memory.swap.events        
cgroup.stat               cpuset.cpus               hugetlb.1GB.max           hugetlb.2MB.rsvd.max      memory.high               memory.swap.high          
cgroup.subtree_control    cpuset.cpus.effective     hugetlb.1GB.rsvd.current  io.bfq.weight             memory.low                memory.swap.max     

Is this expected or is this still broken? In 4.2 (and prior versions) we still saw both the cpu and mem directories.

@Avertae
Copy link

Avertae commented Jan 20, 2022

Fix is not enabled OOB, which was blamed already here
TLDR;
~/Library/Group Containers/group.com.docker/settings.json
"deprecatedCgroupv1": true,

@browdues
Copy link

Thank you

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants