[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] A New Linux Box
On Monday 27 October 2008 17:50:23 Adam Funk wrote:
> AIUI (and please correct me if I'm wrong) using tmpfs for /tmp makes a
> fake filesystem (like what we used to call a RAM-drive) in memory (using
> both RAM and swap).
Yes, that's how it works, except that the size of the file-system is
dynamic. It doesn't start being swapped out to disk until it needs to be. I
quoted my size=6g option: that means its maximum size. You can also
specify, say, 80%, to limit the file-system size to that proportion of
physical RAM.
> Is the advantage purely one of speed, because most of the time (you
> hope) you're manipulating the virtual /tmp/* files in RAM rather than
> reading and writing to disk?
It's a considerable speed advantage. And there seems to be no "I hope" about
it - the only time the disk is used during compilation is when the working
space in use is more than my 4GB RAM; then some things do get swapped out,
though I haven't noticed more than a few hundred K swap in use at any time.
The only package compilation I've seen using swap space is OpenOffice.org.
The script warns that it needs certain amounts of /tmp and RAM space, and
refuses to proceed if it thinks either is lacking.
> And when swap is being used for this too, it's no slower than /tmp/* on
> disk would be anyway?
Also true, or so I assume.
> To do this, how much extra swap needs to be allowed?
This is one of those how-long-is-a-piece-of-string questions. I have four
2GB partitions allocated to it, but I'm sure a quarter of that would be
plenty for my use. I just have one partition on each physical disk for
simplicity, and put pri=1 in the options column in fstab, thus:
/dev/sda2 none swap sw,pri=1 0 0
HTH.
--
Rgds
Peter
PS. Sorry about the delay in sending this - I had a KVM switch problem.
_______________________________________________
Sheffield Linux User's Group
http://sheflug.org.uk/mailman/listinfo/sheflug_sheflug.org.uk
FAQ at: http://www.sheflug.org.uk/mailfaq.html
GNU - The Choice of a Complete Generation