Carlos E. R. said the following on 05/06/2013 10:50 PM:
On Monday, 2013-05-06 at 21:50 -0400, Anton Aylward wrote:
Or NOT as the case may be.
First, a tmpfs is mapped to memory in a way that slightly more efficient than a disk based FS. Yes, disk based FSs are mapped to memory, buffers, for reading writing inodes and super-blocks as well as shuffling the B-trees and indexes and more. By comparison a tmps is incredibly light weight.
Secondly, Linux uses a demand paged virtual memory so you're never going to run out of memory, for whatever value of 'never' applies. And it does apply here. If that memory is needed by a process it can be paged out to swap.
If, for example, gimp needs to store a temporary file of 4 GB in /tmp, in my computer that means it will swap (I have 8GiB ram, and swap is used already). Swap being used that lot means that most of the system applications will be impacted. On the other hand, if /tmp is disk, only gimp is impacted.
Or... I read comments the other day of some one using k3b. It turned out that dvd images were going to /tmp - again, huge usage.
Worse: many people nowdays do not even create swap! They think that computers with 8 GiB are big enough.
No, thanks, I do not want /tmp in RAM.
I did say "as the case may be". I did not address performance. You chose to. "There's more than one way to do it". There are many other cases where the performance boost of a tempfile in memory is a Good Thing. Some programs still hold over from the days before virtual memory and they could not keep their 'arrays' in memory so "overflowed' to disk. Yes, they need to be redesigned so that the arrays are in memory and they rely on the system paging in and out (to swap) as needed rather than explicitly swapping in and out to a temporary file. YMMV. Lets face it, for any context you choose to define you can find a case where it is optimal for one thing and pessimal for another. In general, optimizing for any one thing has a cost elsewhere and a general purpose compromise that is "good enough" for most things is also going to be sub-optimal for all those same things. If you want a system that's optimized for burning DVDs, that's fine. If you want to use the system for detailed photo editing, that's fine. You can optimise for each. The flexibility and ease of such of Linux is one of its great strengths. But please don't bitch that that when you have a general purpose config that it isn't optimal for everything you could throw at it. -- "What we have learned from others becomes our own through reflection". - Ralph Emerson. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org