简体   繁体   English

Docker机器资源限制

[英]Docker-machine resource limit

I made docker-machine like below 我像下面那样制作了docker-machine

docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 2048 default docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 2048默认

As I known, docker container is on this docker-machine host. 众所周知,docker容器位于此docker-machine主机上。 I made some container on this docker-machine host, and somehow seems docker container use more resource than setting resource on docker-machine (actullay cpu). 我在此docker-machine主机上做了一个容器,以某种方式看来docker容器使用了比在docker-machine(actullay cpu)上设置资源更多的资源。

  1. Is this possible? 这可能吗? If so, What is actually do 'virtualbox-memory' and 'cpu-count'? 如果是这样,“ virtualbox-memory”和“ cpu-count”实际上是什么?
  2. Here is 'docker stats' output. 这是“ docker stats”输出。 Why is cpu usage more than 100%? 为什么CPU使用率超过100%? 在此处输入图片说明

In the docker stats every container gets 100% added to the CPU% column for every core allocated. docker stats每个容器将为分配的每个内核100%添加到CPU%列。

It means couple of things: 它意味着几件事情:

  • the percentage per line might be more than 100% 每行的百分比可能超过100%
  • the total sum of percentages can be more than number of cores in the server 百分比的总和可能大于服务器中的内核数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM