[Bug 1533639] Re: RFC on Cloud Images: Make /tmp a tmpfs
Robie Basak
1533639 at bugs.launchpad.net
Mon Jan 25 19:25:34 UTC 2016
Hi Ben,
On Mon, Jan 25, 2016 at 06:56:38PM -0000, Ben Howard wrote:
> 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.
I think it's quite clear that:
1) Ubuntu developers have not yet reached consensus on this (based on
the ubuntu-devel thread).
2) Some use cases *will* be impacted by this change (that is not to say
that we shouldn't do it, but I think we do need to consider the plight
of these use cases).
Given the time constraints, I suggest that we ask the tech board to make
a quick decision on this. Without consensus, my understanding of the
code of conduct says that this is what we should do. Who will drive
this?
I'd also ask that, before making the change, we have decent instructions
for 1) impacted users, for the non-default case; and 2) impacted
upstreams, so they know what they should do for the default case where
they know that a tmpfs /tmp won't do. Who can commit to figuring the
details out here?
I propose that there are only really two options to choose from
technically in terms of actually making the change:
1) Make the option available but non-default on cloud images.
2) Make the option available and default on cloud images (so opt-out).
Any more? I presume any option would be via cloud-init userdata?
Robie
--
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