What is the most efficient way for creating hundreds of containers for single apps; Docker?
docker-compose --compatibility up
and then use "replica"
What is the most efficient way for creating hundreds of containers for single apps; LXC
I do not know of a similar method for LXC.
lxc-copy does 1 so you would need a bash script to do 999 clones.
I wonder if LXC containers or Docker containers would use less resources as empty container, without considering the resource usage of the applications I'll run?
Yes. But I doubt it will be a big difference.
I want to push the limits of my server to create as many containers as possible so I'm looking for the most resource-efficient way for this.
Docker max in theory is 1023 on 1 host (but at 1000 I got a performance hit :-X) but if you need more there is a way using macvlan ("... to assign a MAC address to each container’s virtual network interface, making it appear to be a physical network interface directly connected to the physical network.")
-> I made 1000 (just for fun) and used roughly 257Mb. It took 10 minutes to start them and 9 minutes to stop them all.