Column 1: The host names have been anonymized to sequential index numbers.I humbly invite further study and analysis of the raw, tab-separated data, which you can find at: Note that this is not an exhaustive survey of all servers at Canonical. These servers sampled are slightly biased with more physical machines than virtual machines, but both are present in the survey, and a wide variety of uptime is represented, from less than a day of uptime, to 1306 days of uptime (with live patched kernels, of course). Here’s an analysis of a (non-exhaustive) set of 502 of Canonical’s production servers that run, , and hundreds of related services, including OpenStack, dozens of websites, code hosting, databases, and more. But seeing as we’re talking about data, let’s look at some real data! In fact, across the many debates for and against this feature in Ubuntu, Debian, Fedora, ArchLinux, and others, there is plenty of supposition, conjecture, guesswork, and presumption. In the current thread on ubuntu-cloud and ubuntu-devel, I was asked for some “real data”… Debian debated doing so, in this thread, which starts with all the reasons not to put /tmp on a tmpfs do make sure you read the whole thread, though, and digest both the pros and cons, as both are represented throughout the thread. I just installed Fedora 23 into a VM and confirmed that /tmp is a tmpfs in the default installation, and ArchLinux does the same. Not Exactly Uncharted Territory…įedora proposed and implemented this in Fedora 18 a few years ago, citing that Solaris has been doing this since 1994. You can learn more about Linux tmpfs here. Writing to tmpfs could evict other information from memory to make space.There’s sometimes less space available in memory, than in your root filesystem where /tmp may traditionally reside.In the interest of transparency, I’ll summarize the downsides: Reliability: fewer NAND writes to SSD disks.Energy efficiency: disk wake-ups are avoided.Security: data leaks to disk are prevented (especially when swap is disabled), and since /tmp is its own mount point, we should add the nosuid and nodev options (and motivated sysadmins could add noexec, if they desire).Performance: reads, writes, and seeks are insanely fast in a tmpfs as fast as accessing RAM. ![]() Now, again in 2016, I proposed the same improvement to Ubuntu here in a bug, and there’s a lively discussion on the ubuntu-cloud and ubuntu-devel mailing lists. The proposal was “approved”, but got hung up for various reasons. ![]() In April 2009, I proposed putting /tmp on tmpfs (an in memory filesystem) on Ubuntu servers by default - under certain conditions, like, well, having enough memory. Try /tmp on tmpfs Yourself $ echo "tmpfs /tmp tmpfs rw,nosuid,nodev" | sudo tee -a /etc/fstab ![]() Having tested 502 physical and virtual servers in production at Canonical, 96.6% of them could immediately fit all of /tmp in half of the free memory available and 99.2% could fit all of /tmp in (free memory + free swap).In fact, we should do that by default on Ubuntu servers and cloud images.Put /tmp on tmpfs and you’ll improve your Linux system’s I/O, reduce your carbon foot print and electricity usage, stretch the battery life of your laptop, extend the longevity of your SSDs, and provide stronger security.
0 Comments
Leave a Reply. |