500 Containers on one server sound doable?


I was able to launch 200 containers featuring Ubuntu18, php, nginx & wordpress. I had the mysql database elsewhere to service the 200 containers. It seems to work find but with a stress test running and ClamAV at the same time the CPU was maxing out according to NetData monitor.

The boss as requested me to push it to 500 containers.

I adjusted the settings as suggested here: https://github.com/lxc/lxd/blob/master/doc/production-setup.md

We have Intel® Xeon® CPU L5630 @ 2.13GHz, 16 cores
HD & RAM seem fine.

I have not tried it yet as I am waiting to hear back about what limits each container can have, etc but curious what everyone thinks… Is it possible? crazy?

Thanks and cheers for the good work. Really impressed by the whole LXC / LXD system

1 Like


There shouldn’t be an issue, as long as there is enough RAM for everyone, and the CPU can handle the load. The issue is what happens during peak load and how like your system is to be in a peak load state.

512 containers for 16 cores turn into roughly 32 containers per core. Each container runs mainly the PHP and nginx processes. It is likely that your system will be able to deal with the load with only these two services. And this is what you should check first.

How do you use ClamAV in this setup? Does it scan, for example, uploaded files?
Does a typical scan of a big file makes busy a whole core for several seconds? That would be a problem.


Thank you for your input and also for your excellent articles/blogs.

I had ClamAV on from the past when we had typical sites on the host but thinking I will disable it for the time as now it will be only containers.

Will fire it up this week and report back here.