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

[### Canonical announces the alpha release of Charmed OpenShell to help secure autonomous AI agent fleets](https://canonical.com/blog/charmed-openshell-alpha-release)

To streamline enterprise deployment and lifecycle management, Canonical is announcing the alpha release of Charmed OpenShell.

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

28 September 2026

[### Ubuntu coming soon to Snapdragon X2 Series platforms, unlocking more Linux PCs for the agentic world](https://canonical.com/blog/ubuntu-coming-soon-to-qualcomm-snapdragon-x2-series-platforms)

Canonical and Qualcomm Technologies announce upcoming native Ubuntu support for Qualcomm’s flagship laptop silicon, delivering multi-day battery life, 80 TOPS NPU acceleration,...

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

23 September 2026

[### Native Dell PowerStore integration lands in Canonical LXD](https://canonical.com/blog/lxd-powerstore-integration)

Canonical has broadened enterprise storage options for LXD by introducing a native driver for Dell PowerStore.

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

1 September 2026

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