Posted Apr 2, 2011 14:28 UTC (Sat) by dtlin (✭ supporter ✭, #36537)
In reply to: /tmp and /var/tmp by Wol
Parent article: Introducing /run
Spinning disk filesystems try hard to keep data contiguous; swap does a relatively poorer job of it. So if you're constantly swapping your tmpfs, it's likely slower than if you just used a dedicated filesystem.
Posted Apr 2, 2011 23:05 UTC (Sat) by Wol (guest, #4433)
[Link]
:-)
But with 8Gb of ram, my system hardly ever swaps, even with /tmp as tmpfs.
However, portage occasionally chews up large amounts of temporary space. Compiling OOo, it recommends you have 10Gb of disk space free in /var/tmp/portage. Chances are, if anything ever gets flushed to swap, it'll never be wanted again, which is why I stick it in tmpfs rather than have it chew up real space in a real partition.
And with 1.5Tb disk across two drives, why should I care about losing 32Gb to swap? :-) It's there if it's needed - which it hardly ever is.
Cheers,
Wol
You 100% right - and still wrong :-)
Posted Apr 3, 2011 14:59 UTC (Sun) by khim (subscriber, #9252)
[Link]
Yes, if you're constantly swapping your tmpfs you are slowing everything down. But more often then not it's not the case. 80/20> rules is valid for temporary files too. Most temporary files are accessed rarely, but few are accessed constantly - and they don't ever hit the disk with tmpfs. I know that incremental Chromium build is faster on tmpfs then on real fs if you have beefy system (16GB of RAM, 100GB of temporary files in tmpfs).