Is there a formula for calculating the overhead of

2020-05-23 13:07发布

问题:

Supposed I want to run several Docker containers at the same time.

Is there any formula I can use to find out in advance on how many containers can be run at the same time by a single Docker host? I.e., how much CPU, memory & co. do I have to take into account for the containers themselves?

回答1:

It's not a formula per se, but you can gather information about resource usage in the container by examining Linux control groups in /sys/fs/cgroup.

Links

See this excellent post by Jérôme Petazzoni of Docker, Inc on the subject.

See also Google's cAdvisor tool to view container resource usage.

This IBM research paper documents that Docker performance is higher than KVM in every measurement.



回答2:

cAdvisor is going to provide resource usage and other interesting stats about all containers o a host. We have a preliminary setup for root usage, but we are adding a lot more this week.



回答3:

docker stats is also useful for getting a rough idea for how CPU and Memory your containers use.



标签: docker