我在Mac OS X上运行docker:2,5 GHz Intel Core i7,16 GB 1600 MHz DDR3。
关键是,如果我正确读取htop
输出,它似乎在消耗太多的VIRT内存。
这正常吗?还是背后有什么问题?我的笔记本电脑很慢。
最佳答案
这由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/