To improve performances or avoid disk i/o, one may mount /tmp in memory (mfs). The new fstab entry would look like this :
swap /tmp mfs rw,nodev,nosuid,-s=800MB 0 0Of course, replace the size 800MB according to how much memory you want to let for /tmp.
To know how much memory you have, you may use dmesg and awk :
dmesg | awk '/avail mem/'
As example to create a /tmp using 10% of available RAM, the following command will output the line to copy in /etc/fstab to replace "/tmp" entry, using awk to compute the size :
printf "swap /tmp mfs rw,nodev,nosuid,-s=%sB 0 0\n" \ $(dmesg |awk '/avail mem/ { print int($4 /10) }')
You may have to adjust newly created /tmp permissions:
# chmod 1777 /tmp