A nifty little filesystem setting I just ran across is setting /tmp to a tmpfs filesystem.

Basically, tmpfs is a type of filesystem which uses RAM (and swap) as its device, but it is dynamically allocated, unlike a ramdisk. Therefore, it only takes as much RAM as it needs. /dev/shm already uses this.

Assuming you have enough memory, this makes /tmp faster, and I guess it sort of stresses the "temporary" in /tmp, as it will certainly be cleared on reboot.

The downside is that you might run out of memory (oops!). However, you can set a maximum size for the tmpfs device to allocate.

In my case, however, I have 768MB of RAM, 2GB of swap, and only 1 GB of spare space on my root partition. In normal use, I never exceed about 5% of swap, so by setting my tmpfs limit at about 1GB, it is extremely unlikely I'll run out of virtual memory, and it is no more likely that I'll run out of space in /tmp than it would be in the normal configuration.

What is when using this with a system with less RAM (e. g. 128 MB RAM).
Of course, there will be many swapping, but it would use all available memory.
Would it still be faster using tmpfs for /tmp and /var/tmp/portage or would that be a slowdown?_________________Just unused Microsoft-Software is good Microsoft-Software

Well of course it will be considerably slower. I am curious just *how* much slower, but all my systems have lots of RAM so it's difficult for me to test what happens when tmpfs starts using virtual memory.

The problem with that is that I'm not sure how the kernel deals with the priority of tmpfs versus actual memory usage. Perhaps tmp might run at a speed no slower than it would on disk, but the system itself could come to a grinding halt.
In that case, I'd rather have slow /tmp than a non-responsive system.....

I have mine at 256M (and have for some months) and have compiled OOo, an entirely new install from stage1 and made a cup of tea and have seen no problems, everything is as slick and speedy as ever.

Out of interest I have 512MB for both RAM and swap. I think, as shown above in the brilliant quote about > 16MB RAM, that an awful lot of 'instructions' and advice are regarding much older hardware.

Now this is IMHO, but 768MB ram, with 2GB of swap, and a 1GB tmp partition and being concerned over only having 1GB root: If it was me I would immediately drop the swap to 512 or possibly the same level as the RAM, and drop the tmp to 256 or lower. Thus I would't be too concerned about the 1Gb left on my root (As I would have about 3 1/4 GB).