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

Re: Moving /tmp to tmpfs makes it useful



On 25/05/12 13:50, Serge wrote:

Again, I'm not asking to drop this feature. I'm asking to have it disabled
*by default* but supported by debian installer, so really smart people,
that know what may be broken by it, but really need it, could enable it.

+1

On 25/05/12 13:52, Ted Ts'o wrote:
So what?  If you write to a normal file system, it goes into the page
cache, which is pretty much the same as writing into tmpfs.  In both
cases if you have swap configured, the data will get pushed to disk;

That's not at all the same, the page cache is more temporary, it's getting flushed to disk pretty quick if memory is tight (presumably) but in the same situation using tmpfs going to swap is surely going to be more disruptive?

I won't pretend to know the details half as well as other commentators but it seems only logical that you'd end up pushing more memory from other running processes onto disk as well as (or instead of) the tmpfs memory, which is going to have to get reloaded at some point.

And anyway, not everybody uses swap, in which case this "default" is not entirely viable. I, for one, had no idea this had become default for Debian and I think it's likely to be one of those things that jumps out to bite people who weren't expecting it at some inconvenient moment.

I'm sure the project veterans and more attentive readers of this list are tired of recurring arguments like this, but usually if something is recurring it is for a reason. Given my general "no swap" preference, I'm glad this has come up again so that I'm aware of it this time.

The tmpfs setup seems far more appropriate as a performance tweak for admins than as a default. Where there is plenty of RAM, buffer cache makes the difference largely negligible. But where there isn't an abundance of RAM, it could needlessly cause problems (especially without swap).

Not big problems perhaps, and not likely to many, but that could still be a few thousand people with a project like Debain, so I just don't see the issue with leaving /tmp on disk, why complicate the matter?

-Will


Reply to: