[Bug 1533639] [NEW] [ubuntu-cpc] please make /tmp a tmpfs in RAM

Ben Howard ben.howard at canonical.com
Mon Jan 25 18:56:38 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

After considering the robust discussion, I would like to propose that
we move forward with this change via Cloud-init with some sane
defaults (i.e. it is _NOT_ running in a container and memory is
greater than 2GB of RAM).

Given that Xenial is in Alpha, now is the time to make this change.
The reality is that without actually making the change we can't and
won't be able to fully scope the impact.

So with that, I think that having Cloud-init configure /tmp as tmpfs,
while giving the user the ability to change it, is a sane path
forward. In the event that we have serious or unintended consequences,
we can revert pre-release or even via an SRU if necessary.
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJWpm/mAAoJEETWil5UBqhmczQQAIX8/VSpF4IsVQsJT+YsItdO
QYy4GTYSDU8MI4wZIcs448epq31QBZyFCijRiJLPSD72I9izAAbbjzSYnUMEivCH
uCEHMFTkSZyQQU0x/2LHpsjMlcgQiM3izfjI6dRf0y8qE36oKTqSWR3lETwDl8ag
nzimb8JuGgFvwLMznFipH5lIJQlu75GGrAvhqql3vnEsY9B76dVxD00FPQvWkoOH
gC5F1HC/KpleuJbX1Fz3wIUu6fzYJbYedRbiCJ12ioeZdternx3Nk0/NzLcauzmr
lbFJhpNRSxKtLMGubwNEbJ/vDJC+aC8cJj1NGANe8g+T61xK/vmmgJUoERXZp+0N
P2I5gx9EvGARTePEaciU1E/i18Jv9t72nCvn4aeGNPDG2nAZsXL6Gygw98FtEqBg
3mP7IU6+5bMZw6VR+7oPXiW2+Auq1KRK4sxi0N5uRINq3VHbDI8l+K0Aewh7jCR1
1uC/I5CJWNXP3vSH6b1P2pBF92DQ0xkEeArJSw8jo4B9kacS85BVMNg2QlGoK0A4
ico/NvLMlFTJFtePYXxUBKjLuDDqw64k8U4poJxejwJVDQ/qmt2zz97jwfkaQBkZ
fdKx17tr7NsdRgxYG37gQrhD7KsxEolsEyUE3vn+69pf45i8CWRHQssJ+C0xxVLm
Bv19ys9hbgMspkSpWUp4
=YTxu
-----END PGP SIGNATURE-----

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1533639

Title:
  [ubuntu-cpc] please make /tmp a tmpfs in RAM

Status in livecd-rootfs package in Ubuntu:
  Triaged

Bug description:
  In Ubuntu, we have always cleared /tmp on every boot.

  As such, on servers, by default /tmp should actually be a tmpfs
  entirely in RAM, when there is enough memory in the system.  This
  threshold should be configurable by the end user (in cloud-init?), and
  default threshold of ~3GB.

  Read about tmpfs here:
  https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt

  This has several advantages, mainly:
   * Performance - much faster read/write access to data in /tmp
     - especially if your disk is spinning media
     - and if you're on SSD, this feature extends the life of your flash by reducing your NAND flash writes
   * Security - sensitive data would be cleared from memory on boot, rather than written (leaked) to disk -- important for encryption scenarios
   * Power consumption - storing information in memory is more energy efficient than reading and writing to disk

  In scenarios where more space in /tmp is needed than available, one
  can compliment that tmpfs with 'sudo apt-get install swapspace' which
  will dynamically create/delete swapfile as necessary.  See:
  http://manpg.es/swapspace

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1533639/+subscriptions



More information about the foundations-bugs mailing list