Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many docker containers can i run simultaneously on single host?

I am new to lxc and docker. Does docker max client count depend solely on CPU and RAM or are there some other factors associated with running multiple containers simultaneously?

like image 353
zergood Avatar asked Jun 29 '14 08:06

zergood


People also ask

How many Docker containers can run on a single host?

Calculating needed disk space The application is an ID generator written in Go (source code available on titpetric/sonyflake GitHub). Using this simple calculation, we can estimate that we can run about 1,000 containers on a single host with 10GB of available disk space.

Can we run multiple Docker containers on a single host?

With Docker compose, you can configure and start multiple containers with a single yaml file. This is really helpful if you are working on a technology stack with multiple technologies.

What is the maximum number of container you can run per host?

That number is divided by 2 to start with due to dockers additional processes. If it were tuned low you might get close to max_pid/2 . If you take the standard 32768 value then that's at most 16384 container processes.

Can multiple containers run on the same machine?

Yes you can run multiple containers on a single host; docker is designed for exactly that. Yes, the containers on a single host can communicate with each other, by container name. For example if you have one container running MongoDB called mongo, and another one running Node.


1 Answers

As mentioned in the comments to your question, it will largely depend on the requirements of the applications inside the containers.

What follows is anecdotal data I collected for this answer (This is on a Macbook Pro with 8 cores, 16Gb and Docker running in VirtualBox with boot2docker 2Gb, using 2 MBP cores):

I was able to launch 242 (idle) redis containers before getting:

2014/06/30 08:07:58 Error: Cannot start container c4b49372111c45ae30bb4e7edb322dbffad8b47c5fa6eafad890e8df4b347ffa: pipe2: too many open files

After that, top inside the VM reports CPU use around 30%-55% user and 10%-12% system (every redis process seems to use 0.2%). Also, I get time outs while trying to connect to a redis server.

like image 154
Abel Muiño Avatar answered Oct 12 '22 14:10

Abel Muiño