[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving /tmp to tmpfs makes it useless

2012/5/25 Jon Dowland wrote:

>> I wasn't able to watch a web presentation (from something like
>> vimeo/youtube), because there was not enough free space in /tmp for
>> flash player to download and show it.
> I thought those were streaming video sites?

You mean, those sites don't store temporary files? They do. Just opened
youtube url and watched a growing /tmp/FlashXX2pKrFq (new flash player
unlinks those files after open(), you may not notice them, but they're
still there, check `lsof | grep Flash`).

> Do you mean flash player or something else?

Yes, it was a flash player powered by adobe flash plugin.

>> Ok, I agree. There're two main /tmp usages. Some applications use it to
>> save memory (databases, archive managers, cd burners, image processors,
>> science software, the flash player after all). Other apps use it for
>> communication (browsers, mail clients). But in both cases these files
>> may be large and should be still stored on real disk, not on tmpfs.
>> And having /tmp on tmpfs makes it useless for both usages.
> Why is it useless for the second case?

Because programs like browsers or mail clients may also store large files.
You can just click on a 300MB archive or 1GB video file in Firefox and
select "Open with" to view it. And I've seen real users doing that (it's
just two clicks to view a file, why not).

>> The matter is that exceptions are *not rare*. A simple 2-hours-long
>> video presentation may cause you problems. Pressing Enter in `mc` on
>> linux-kernel-src.tar.bz2 may cause you problems.
> How much RAM do you have / how big is your /tmp(fs)? The fact this
> caused you trouble suggests to me that they must be very small.

On that machine I had 1GB of ram and about 250MB of /tmp in tmpfs. I
configured that manually more than a year ago and dropped that setting
later when realized that its mostly useless and just slows me down having
me to manually untar archives (instead of single Enter in mc) and copying
links to curl/wget (instead of 2-clicks in firefox) in order to have them
stored not in /tmp.


Reply to: