<p>The same as any Linux load, consider no more processes in wait state than the number of CPU.
The load on 1, 5 and 15 mins given by <code>uptime</code> should ideally be 1 less than number of cores. </p>

<p>Containers are roughly isolated processes, leaving a core for orchestration avoid congestion. </p>

<p>That doesn't mean only 7 containers on a 8 cores machine, it's a matter of simultaneous load, so the best way is to measure it and adapt consequently.</p>

CC BY-SA 3.0
2017-04-29T20:10:51.383Z
2017-04-29T20:10:51.383Z
Tensibai
<p>I personally have spinned 100 containers on a 32vcpu machine and as many docker containers pin to random CPUs, there is no such correlation between number of containers and number of vcpus. As docker containers can be thought of as processes, it seems logical what @Tensibai has mentioned. </p>

CC BY-SA 3.0
2017-09-13T14:56:42.637Z
Run a while loop with no sleep on all your containers, you'll observe what I'm describing above, containers are processes with a virtual file system, that's not it can be thought , they are exactly that
Tensibai
CC BY-SA 3.0
2017-07-31T10:26:35.383Z
2017-07-31T10:26:35.383Z
lakshayk
<p>I'm running my application on 4 Virtual Machines with 8 3.2 GHz Virtual CPUs and 32 GB, however, I will be splitting up the processes into separate containers.</p>

<p>I am not sure how many containers to run per host. What are the typical numbers?
 For example how the VM to bare metal server ratio is 1:10 generally, any links on attributes to consider, decision frameworks to consider or experiences would help!</p>

<docker><containers><capacity-planning><kubernetes>
Docker Container capacity planning
shrao
# Docker Container capacity planning

(Asked by: username_0 on 2017-04-28)

I'm running my application on 4 Virtual Machines with 8 3.2 GHz Virtual CPUs and 32 GB, however, I will be splitting up the processes into separate containers.

I am not sure how many containers to run per host. What are the typical numbers?
For example how the VM to bare metal server ratio is 1:10 generally, any links on attributes to consider, decision frameworks to consider or experiences would help!

**Tags:** docker, containers, capacity-planning, kubernetes


---

## 2 answers

### Answer by username_1 on 2017-04-29. Score: 9

The same as any Linux load, consider no more processes in wait state than the number of CPU.
The load on 1, 5 and 15 mins given by `uptime` should ideally be 1 less than number of cores.

Containers are roughly isolated processes, leaving a core for orchestration avoid congestion.

That doesn't mean only 7 containers on a 8 cores machine, it's a matter of simultaneous load, so the best way is to measure it and adapt consequently.


---

### Answer by username_2 on 2017-07-31. Score: 1

I personally have spinned 100 containers on a 32vcpu machine and as many docker containers pin to random CPUs, there is no such correlation between number of containers and number of vcpus. As docker containers can be thought of as processes, it seems logical what @username_1 has mentioned.

> **Comments:**
> **username_1**: Run a while loop with no sleep on all your containers, you'll observe what I'm describing above, containers are processes with a virtual file system, that's not it can be thought , they are exactly that  

---

