Hi Juan, on Tue, Aug 12, 2008 at 05:18:53AM -0300, you wrote: >> If I follow this advice, what happens when I compile something like >> Open Office which allocates 3-4GB in /var/tmp during compilation and >> I only have 2GB physical RAM in the computer? > > If all the Virtual Memory (VM = RAM+SWAP) is exhausted the kernel will try > to kill the process that is consuming most of it.
That's why tmpfs also uses swapspace. Given the address space you have on a 64bit system, I don't see any reason[0] to save swapspace any more---after I tried the tmpfs idea for the first time, I just repartitioned my system for 32 GiB of swap and put /tmp and /var/tmp/portage on tmpfs. Just perfect. Not only does this speed up everything that uses temporary files, it also minimizes the effect of programs that fragment or leak their memory, like FF2 that had a habit of packing small cached things after big ones and then not reusing the big ones after they had been freed and thus ballooning to perverse sizes. I've seen a Firefox grow to over 10 GiB (at 4 GB physical RAM) with minimal impact on the rest of the system because the hardly ever touched pages just get paged out at some point and don't matter as long as they stay on disk. cheers, Matthias [0] OK, there is small overhead due to larger page tables but it's negligible. -- I prefer encrypted and signed messages. KeyID: FAC37665 Fingerprint: 8C16 3F0A A6FC DF0D 19B0 8DEF 48D9 1700 FAC3 7665
pgpPaXNkjDucL.pgp
Description: PGP signature