1,000 nodes, 30,000 containers, 1 Swarm manager
Swarm is the easiest way to run Docker app in production. It lets you take an an app that you’ve built in development and deploy it across a cluster of servers. Recently we took Swarm out beta and released version 1.0. It’s being used by people like O’Reilly for building authoring tools, the Distributed Systems Group at Eurecom for doing scientific research, and Rackspace who built their new container service, Carina, on top of it.
But there’s an important thing that Swarm needs to be able to do to take your apps to production: it needs to scale. We believed Swarm could scale up tremendously, so we looked around for a benchmark and found one here. We decided to recreate the Kubernetes test with Swarm. Like the team at Google, we wanted to make sure that as we launched more containers it would keep scheduling containers quickly.
What did we measure?
We wanted to stress test a single Swarm manager, to see how capable it would be, so we used one Swarm manager to manage all our nodes. We placed fifty containers per node. Commands were run 1,000 times against Swarm and and we generated percentiles for 1) API Response time and 2) Scheduling delay. We found that we were able to scale up to 1,000 nodes running 30,000 containers. 99% of the time each container took less than half a second to launch. There was no noticeable difference in the launch time of the 1st and 30,000th container.
We used docker info to measure API response time, and then used
docker run -dit ubuntu bash to measure scheduling delay.
• Discovery backend: Consul
• 1,000 nodes
• 30 containers per node
• Manager: AWS m4.xlarge (4 CPUs, 16GB RAM)
• Nodes: AWS t2.micro (1 CPU, 1 GB RAM)
• Container image: Ubuntu 14.04
|Percentile||API Response Time||Scheduling Delay|
We’ll continue to test Swarm, pushing its limits and using the results to harden it. If you want to test it out yourself, we’ve released our swarm-bench code on GitHub. If you want to learn more about Swarm, check out the documentation, and go to our forums if you need any help.
Learn More about Docker
- New to Docker? Try our 10 min online tutorial
- Share images, automate builds, and more with a free Docker Hub account
- Read the Docker 1.9 Release Notes
- Subscribe to Docker Weekly
- Register for upcoming Docker Online Meetups
- Attend upcoming Docker Meetups
- Register for DockerCon 2015 Europe
- Start contributing to Docker