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?
Asked
Active
Viewed 1.5k times
14
-
1LXC containers are not virtual machines. How many application instances could you run on a single server? The answer is determined by the available RAM, CPU and disk capacity. – Mark O'Connor Jun 29 '14 at 10:14
-
3See [this SO Q&A](http://stackoverflow.com/questions/21799382/is-there-a-maximum-number-of-containers-running-on-a-docker-host/21801470#21801470) – Ben Whaley Jun 29 '14 at 17:28
1 Answers
11
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.

Abel Muiño
- 7,611
- 3
- 24
- 15
-
4Thank you for your answer, but i think you can customize the number of open files in the system. I find [here](http://stackoverflow.com/questions/21799382/is-there-a-maximum-number-of-containers-running-on-a-docker-host/21801470#21801470), that you can run about 1000 containers before linux networks issues come into play. – zergood Jun 30 '14 at 14:16