---
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
---

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.

In submitting this form, I confirm that I have read and agree to
[Canonical's Privacy Notice](https://canonical.com/legal/data-privacy/contact)
and [Privacy Policy](https://canonical.com/legal/data-privacy).

Sign up

## Share on

---

## Related posts

[### Bringing private, local inference to your desk with Lenovo, CIX Tech, and Canonical](https://canonical.com/blog/bringing-private-local-inference-to-your-desk-with-lenovo-cix-tech-and-canonical)

As people increasingly use AI to summarize personal documents, draft emails, and generate code, one of the key problems that has emerged is data privacy. Relying on cloud-based...

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

27 November 2026

[### Canonical and Huawei Kunpeng announce collaboration to deliver optimized Ubuntu and Ubuntu Pro on Kunpeng hardware](https://canonical.com/blog/canonical-huawei-kunpeng-announce-collaboration-optimized-ubuntu)

The collaboration combines Huawei Kunpeng’s advanced computing architecture with Canonical’s enterprise-grade open source software to accelerate cloud modernization, AI...

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

18 November 2026

[### Ubuntu Summit 26.10: Less than a week away!](https://canonical.com/blog/ubuntu-summit-26-10-less-than-a-week-away)

Ubuntu Summit 26.10: Less than a week away! Here in London, the long summer has stepped aside for cooler nights and damp, misty mornings. The trees are turning amber and the...

[Graham Morrison](https://canonical.com/blog/author/morrisong)

6 November 2026

[### MicroCloud and LXD LTS releases now available](https://canonical.com/blog/microcloud-and-lxd-lts-releases-2026)

Canonical announces the latest Long Term Supported (LTS) releases for MicroCloud and LXD

[Miona Aleksic](https://canonical.com/blog/author/mionaalex)

19 October 2026
