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

zergood picture zergood · Jun 29, 2014 · Viewed 12.5k times · Source

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?

Answer

Abel Muiño picture Abel Muiño · Jun 30, 2014

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.