RSS Feed for This PostCurrent Article

Adding a RAM Disk to Linux Hosts

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.

| Comments

Trackback URL

  1. 1 Comment(s)

  2. 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

Post a Comment

 

Please note that while in principle I don't mind promotion of a non-personal web site or blog in the fields below, any comments that are off-topic, derogatory, or spam-like will likely be removed at my discretion.