RFC on Cloud Images: Make /tmp a tmpfs

Robie Basak robie.basak at ubuntu.com
Wed Jan 20 16:45:59 UTC 2016

On Wed, Jan 20, 2016 at 05:27:51AM +0100, Dustin Kirkland wrote:
> > I'd like to see even some rudimentary experiments done with realistic
> > workloads before saying this is a better idea than leaving things as
> > they are. We've all speculated and provided anecdotal evidence enough to
> > warrant such an investigation for those who speculate it will be a
> > worthwhile change.
> Sure, done!  You can find a detailed statistical analysis, as well as
> the raw data for your download and treatment at:

This is useful. Thank you for this research!

> http://blog.dustinkirkland.com/2016/01/data-driven-analysis-tmp-on-tmpfs.html

Are we sure that using /dev/zero is a fair test? I hope this isn't
shortcutted somehow in the tmpfs case.

> Based on a statistical analysis of 502 physical and virtual servers
> running production and test services at Canonical (including
> databases, websites, OpenStack, ubuntu.com, launchpad.net, et al.),
> 96.6% of them could fit all of the data they currently have in /tmp,
> entirely in half of the free memory available in the system.  That
> ratio goes up to 99.2% of the systems surveyed (i.e., all but 4) when
> one takes into account both free available memory and available swap.
> The remaining 4 systems are are currently using [101 GB, 42 GB, 13 GB,
> and 10 GB] of swap, respectively, and are themselves somewhat special
> cases.

Even if they are special cases, surely that's something we need to
consider for our users? If your data is representative, isn't that
around 1% of users who will be impacted or broken somehow by this change
in defaults?

What would be the guidance for 1) users; and 2) upstreams; if they want
large temporary filesystem space after this change? Would that be to use
/var/tmp in all relevant cases? And for upstreams, is this something
that they will accept that they can do universally, or is it behaviour
that they have to differentiate depending on the distro upon which they
are running?

> Moreover, Ubuntu is hardly the first Linux/UNIX distribution that has
> considered putting /tmp on tmpfs by default.  Solaris has used a tmpfs
> since 1994.  Fedora moved to /tmp on tmpfs in 2012, as did ArchLinux.
> Things seem to be working okay there...

This is really useful to know, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20160120/bcb7b397/attachment.pgp>

More information about the ubuntu-devel mailing list