Docker容器内存使用情况 [英] Docker container memory usage

查看:245
本文介绍了Docker容器内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Lamp Docker映像。
我想启动该图像的500个容器,我需要多少RAM?
我已经跟踪了每个新容器的内存使用情况,它与该映像的任何其他容器几乎相同。
因此,如果单个容器使用200 MB,我可以在具有1 GB RAM的Linux机器上启动5个容器。

I have a Lamp Docker Image. I want to start 500 containers of this image, how many RAM i need? I have tracked memory usage of each new container and it nearly the same as any other container of its image. So,if single container is using 200 MB, I can start 5 containers on Linux machine with 1 GB RAM.

我的问题是:

泊坞窗容器使用的内存与例如相同的虚拟机映像相同吗?
可能是我在docker配置或docker文件中做错了吗?

Is docker container using same memory as, for example, same Virtual Machine Image? May be I am doing something wrong in docker configuration or docker files?

推荐答案

docker stats 可能会为您提供所需的反馈。 https://docs.docker.com/engine/reference/commandline/stats/

docker stats might give you the feedback you need. https://docs.docker.com/engine/reference/commandline/stats/

这篇关于Docker容器内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆