---
title: How many containers can you run on your machine?
description: 652 Linux containers running on a Laptop?  Are you kidding me???A couple
  of weeks ago, at the OpenStack Summit in Vancouver, Canonical released the results
  of some scalability testing of Linux containers (LXC) managed by LXD.Ryan Harper
  and James Page presented their results — some 536 Linux containers on a very modest
  little Intel server […]
url: https://canonical.com/blog/how-many-containers-can-you-run-on-your-machine?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Dustin Kirkland](https://canonical.com/blog/author/kirkland "More about Dustin Kirkland")

11 June 2015

# How many containers can you run on your machine?

[containers](https://canonical.com/blog/tag/containers)
[docker](https://canonical.com/blog/tag/docker)
[kvm](https://canonical.com/blog/tag/kvm)
[LXD](https://canonical.com/blog/tag/lxd)
[Ubuntu](https://canonical.com/blog/tag/ubuntu)
[Virtual Machines](https://canonical.com/blog/tag/virtual-machines)

---

Share the article

*652 Linux containers running on a Laptop?  Are you kidding me???*

A couple of weeks ago, at the [OpenStack](http://openstack.org/) Summit in [Vancouver](https://www.openstack.org/summit/vancouver-2015/), Canonical released the results of some scalability testing of Linux containers ([LXC](https://linuxcontainers.org/)) managed by [LXD](https://linuxcontainers.org/lxd/introduction/).

[Ryan Harper](https://plus.google.com/114198556101442271283/posts) and [James Page](https://javacruft.wordpress.com/) presented their results — some 536 Linux containers on a very modest little Intel server (16GB of RAM), versus 37 KVM virtual machines.

Ryan has published the [code](https://code.launchpad.net/~raharper/+junk/density-check) he used for the benchmarking, and I’ve used to to reproduce the test on my dev laptop (Thinkpad [x230](http://www.thinkwiki.org/wiki/Category:X230), 16GB of RAM, [Intel i7-3520M](http://ark.intel.com/products/64893/Intel-Core-i7-3520M-Processor-4M-Cache-up-to-3_60-GHz)).

***I managed to pack a whopping 652 Ubuntu 14.04 LTS (Trusty) containers on my Ubuntu 15.04 (Vivid) laptop!***

The system load peaked at 1056 (!!!), but I was using merely 56% of 15.4GB of system memory.  Amazingly, my [Unity](https://unity.ubuntu.com/) desktop and [Byobu](http://byobu.co/) command line were still perfectly responsive, as were the containers that I ssh’d into.  *(Aside: makes me wonder if the Linux system load average is [accounting](http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages) for container process correctly…)*

Check out the [process tree for a few hundred system containers here](http://people.canonical.com/~kirkland/ps-axjf)!

As for [KVM](http://www.linux-kvm.org/page/Main_Page), I managed to launch 31 virtual machines without [KSM](http://www.linux-kvm.org/page/KSM) enabled, and 65 virtual machines with KSM enabled and working hard.  So that puts somewhere between 10x – 21x as many containers as virtual machines on the same laptop.

You can now repeat these tests, if you like.  Please share your results with #LXD on [Google+](https://plus.google.com/explore/lxd) or [Twitter](https://twitter.com/search?q=%23lxd&src=typd)!

I’d love to see someone try this in AWS, anywhere from an m3.small to an r3.8xlarge, and share your results.

## Density test instructions

```
## Install lxd
$ sudo add-apt-repository ppa:ubuntu-lxc/lxd-git-master
$ sudo apt-get update
$ sudo apt-get install -y lxd bzr
$ cd /tmp
```

```
## Grab the tests, disable the tools download
$ bzr branch lp:~raharper/+junk/density-check
$ cd density-check
$ mkdir lxd_tools
```

```
## Periodically squeeze your cache
$ sudo bash -x -c 'while true; do sleep 30;
    echo 3 | sudo tee /proc/sys/vm/drop_caches;
    free; done' &
```

```
## Run the LXD test
$ ./density-check-lxd --limit=mem:512m --load=idle release=trusty arch=amd64
```

```
## Run the KVM test
$ ./density-check-kvm --limit=mem:512m --load=idle release=trusty arch=amd64
```

As for the speed-of-launch test, I’ll cover that in a follow-up post!

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Arduino® VENTUNO™ Q is available for pre-order with Ubuntu pre-installed](https://canonical.com/blog/arduino-ventuno-q-is-available-for-pre-order-with-ubuntu-pre-installed)

London, UK – August 25, 2026 – Following our initial collaboration announcement in March 2026, Canonical and Arduino (a subsidiary of Qualcomm Technologies, Inc.) are excited...

[Canonical](https://canonical.com/blog/author/canonical)

25 August 2026

[### Ubuntu Server: a platform made for enterprise scale](https://canonical.com/blog/ubuntu-server-a-platform-made-for-enterprise-scale)

A platform is an environment that allows software to run smoothly across the infrastructure, runtime, and application layers. The key word there is “smoothly”: a good platform...

[Rhys Knipe](https://canonical.com/blog/author/rhysknipe)

7 July 2026

[### Canonical becomes Gold Sponsor of Trifecta Tech Foundation](https://canonical.com/blog/canonical-becomes-gold-sponsor-of-trifecta-tech-foundation)

Canonical is pleased to announce it is now a Gold Sponsor of the Trifecta Tech Foundation, a non-profit that creates open source building blocks for critical infrastructure...

[Canonical](https://canonical.com/blog/author/canonical)

30 June 2026

[### Ubuntu Summit 26.04: connected by open source](https://canonical.com/blog/ubuntu-summit-26-04-connected-by-open-source)

What an incredible experience! Ubuntu Summit 26.04 has officially drawn to a close, but the energy from our global community is still buzzing – in the comments section, on...

[ilvipero](https://canonical.com/blog/author/ilvipero)

22 June 2026
