There are many reasons to create a RAM Disk. One reason is to have a isolated latency test or throughput test between interconnect, but discounting the effects of the spinning disk I/O that might be the bottleneck to the test. Another case is to store temp files which require very fast I/O. Nothing beats memory.
Step 1: Check how much RAM you have. Display it in GB
# free -g [root@n01 ~]# free -m total used free shared buffers cached Mem: 50276 1219 49056 0 83 555 -/+ buffers/cache: 580 49695 Swap: 25207 0 25207You can also display with -m (MB) or -k (KB)
Step 2: Create and Mount a RAM Disk
# mkdir /mnt/ramdisk # mount -t tmpfs -o size=16g tmpfs /mnt/ramdisk
Step 3: If you wish to create automatic mount, do place it at /etc/fstab
tmpfs /mnt/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=16g 0 0