macos - 为什么docker占用了这么多VIRT内存?

标签 macos docker docker-for-mac

我在Mac OS X上运行docker:2,5 GHz Intel Core i7,16 GB 1600 MHz DDR3。

关键是,如果我正确读取htop输出,它似乎在消耗太多的VIRT内存。

enter image description here

这正常吗?还是背后有什么问题?我的笔记本电脑很慢。

最佳答案

这由moby/moby issue 31594说明。
该问题实际上要求运行 contrib/check-config.sh 作为更多了解所使用的docker配置的方式。

自2015年以来在#15020中说明了相同的问题

It appears that Docker somehow does not respect MALLOC_ARENA_MAX and will regardless allow the amount of virtual memory to grow to a number correlating to the number of CPUs being allocated to it.
(host is running macOS 10.13.2)



如评论:

docker itself does nothing with that environment variable (or memory management of the processes inside the container); it sets up namespaces and cgroups for the process, which is all part of the kernel.

关于macos - 为什么docker占用了这么多VIRT内存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50398781/

相关文章:

docker - JupyterHub使用注销不会停止Docker容器

docker - 我们需要将docker-compose.yml转移到生产服务器吗?

kubernetes - Istio 中的 IP 黑名单

objective-c - 以编程方式检查监视器是否已关闭

node.js - MAC OS X Yosemite 10.10.5 上的 npm、node-gyp 和 gulp 问题

java - System.getenv() 仅在调试 IntelliJ 插件时才能正常工作

docker - 同一主机上的两个 Docker 容器之间的慢速 Resilio 同步

c++ - clion cmake 项目不编译 : dyld mach-o, 但为模拟器(不是 macOS)构建

macos - Mac/OS X 上的/var/lib/docker 在哪里

linux - 运行 Docker 镜像