LJ Tech Tip

Posted on June 14, 2004
Filed Under Computing, FLOSS |

I receive the weekly Linux Journal News Letter. This week’s had a good tip about better use of hard drive space by using swap for /tmp:

When you’re planning the partitioning scheme for your next Linux system, keep in mind that you may want to put /tmp on tmpfs instead of directly on disk and allow extra swap space for the size of /tmp you want. For example, instead of reserving 1GB for /tmp and 1GB for swap, with tmpfs you can use 2GB for swap and reduce the number of partitions you need.

To create a 1GB tmpfs partition, put this in /etc/fstab:

none /tmp tmpfs size=1073741824

Comments

3 Responses to “LJ Tech Tip”

  1. Ness on June 14th, 2004 16:27

    Do files usually persist in /tmp when the system is rebooted. Now that I think about it I don’t think they do, but you never know. They definitly could not if it’s a tmpfs (completely in RAM).

    I guess it depends on what you want to do.

  2. Ness on June 14th, 2004 16:34

    I take that back, it’s not completly in RAM, but an extension of SWAP space. I’m an idiot and my brain is fried from trying to write proper JCL’s for a Time Sharing system. Arg.

  3. mhp on June 14th, 2004 19:51

    You are half right, it is stored in swap on disk, but is blown away every boot. On your system there are likely files that have survived since your last reboot, but the will not be used again, and likely cleaned by the tmpwatch daily cron job.

Leave a Reply