Adding a RAM Disk to Linux Hosts
By Bob Plankers on Feb 27, 2007 in System Administration
Want to add a “RAM disk” to your Red Hat Enterprise Linux host? If you mean an all-RAM filesystem then it’s super easy. Add this one line to your /etc/fstab:
none /ramdisk tmpfs defaults,size=1024m 1 2
(tabs between the fields, like everything else in fstab)
Then a “mount -a” will get it running. Obviously change size=1024m to be whatever makes sense.
Probably works great on other distributions, too, just haven’t tried it.

1 Comment(s)
By Denis P on Dec 20, 2007 | Reply
Hi Bob,
Thank you very much for this tip! It works on SLES 9, I am currently optimizing a 70GB table in a Postgres database and I was able to double the speed of the process by putting journal files on a ram disk. Now it will only take about 15 hours instead of 30.
Denis