On Thu, Jul 21, 2016 at 04:06:26PM +0300, Dmitry Bogatov wrote: > For example, I, as happy owner of 8GB RAM, is perfectly fine with 3GB > in /tmp, because I actually use less then 1Gb. On other hand, would I > start 50 instances of Firefox, Gimp and other stuff, I would object > putting 3GB in my /tmp, since it would make system swap.
I don't quite buy your argument. If you want to write 3GB to disk, then you need to write 3GB to disk - it's the same amount of data, whether you call it "filesystem" or "swap". But if you use a real filesystem to store that data, then you will also have to deal metadata, which needs to be protected from crashes so you want to flush caches from time to time, which is expensive. tmpfs does not have such requirements, so it should give you better performance. I guess someone should measure it... Gabor