[HEADS-UP] Rawhide: /tmp is now on tmpfs

Brian Wheeler bdwheele at indiana.edu
Wed Jun 20 17:56:13 UTC 2012

On 06/20/2012 01:41 PM, Gregory Maxwell wrote:
>> What happens when I have 2 users who are both downloading dvd iso
>> sized images into /tmp  as well as other things going on. Remind me...
>> where does firefox by default cache in progress downloads for the
>> "Open in" facility. Isn't it down in tmp?   Do I really want things
>> like firefox downloads paging out ram into swap and causing an overall
>> system slowdown?
> Yes, Firefox saves to /tmp by default.
> Use of tmpfs will not not increase your disk IO. Under that workload I
> would expect your DVD data to end up in the swap volume, there is no
> adverse performance from this. At least in my experience/measurements
> writing out large data to tmpfs has performance equal to or better
> than writing out to regular filesystems.

I don't think its just a matter of quantity of I/O but _when_ the I/O 
happens.  Instead of the pagecache getting flushed to disk when it is 
convenient for the system (presumably during a lull in I/O) the I/O is 
concentrated when there is a large change in the VM allocations -- which 
makes it very similar to a thrashing situation.

With a real filesystem behind it, the pages can just be discarded and 
reused when needed (providing they've been flushed) but in the case of 
tmpfs the pages only get flushed to swap when there is memory pressure.

Its not just writing out the data that needs to be measured, but any 
case where the threshold of memory-used-for-software crosses the tmpfs 
limit:  loading libreoffice when the machine has more than 50% ram used 
by software is going to generate a bunch of writes as well as a ton of 
reads at the same time, rather than having them spaced out over time 
(potentially, at least)

More information about the devel mailing list