RFC on Cloud Images: Make /tmp a tmpfs

Dustin Kirkland kirkland at canonical.com
Fri Jan 22 15:09:10 UTC 2016

On Thu, Jan 21, 2016 at 5:31 AM, Dimitri John Ledkov <xnox at ubuntu.com> wrote:
> Is it just me, or did the RFC asks about cloud-images alone, and we
> are diverging to discussing all the things, and all the form factors,
> and all the installation types.
> Certainly it should be easy to use tmp on tpmfs with cloud-images,
> which i would presume would have a cloud-init on/off toggle,
> irrespective of the default.
> And, e.g. imho the default should be off for cloud-images as pointed
> out earlier. But others are advocating otherwise.
> Dustin stats are for both physical and virtual machines... not sure
> how that helps to make a decision for cloud-images in isolation. Given
> that they are used quite differently.

The Ubuntu Cloud Images will default to /tmp on tmpfs when the system
has >3GB of RAM (which accounted for 89.6% of the 502 servers I
surveyed), and allow override in either direction through cloud-init
(and perhaps allow overiding that threshold of 3GB).  tmpfs defaults
to making half of the available RAM usable in /tmp (and that is
configurable in /etc).

According to the 502 servers surveyed, 97.2% use less than 1.5 GB of
/tmp.  Perhaps more importantly, based on that model, ALL of the
servers surveyed who would have "qualified" for /tmp on tmpfs -- ie,
all 450 servers with >3GB of RAM -- would fit all of the current
contents of their /tmp in the tmpfs (in fact, within freely available

The Ubuntu Cloud Images are the same image used in public clouds
(Amazon, Azure, GCE), private clouds (OpenStack), and for physical
machines provisioned through MAAS.  So physical Ubuntu servers will
benefit from this change in default behavior, just like virtual

I cannot speak for the Ubuntu Desktop, and I'm not extending this
proposal there too (but frankly, I know that it would be beneficial
for the masses there too, and I'd be delighted to see someone fight
that good fight).

Finally, I just downloaded a Snappy amd64 image and booted it a KVM.
And whattayaknow...  /tmp is on tmpfs!

I also downloaded Snappy armhf, and flashed it to my rpi2.  And guess
what...  /tmp is on tmpfs!

And Ben just launched Snappy in AWS, GCE, and Azure, and I just
launched Snappy in OpenStack.  Where's /tmp in all four cases?  Yep.
You guessed it.  It's on tmpfs!


More information about the ubuntu-devel mailing list