October 19, 2020

Linux - RAM disk

This might be useful for spead up programs that heavily use disk.

mount -t [TYPE] -o size=[SIZE] [FSTYPE] [MOUNTPOINT]
  • [TYPE] either tmpfs or ramfs.
  • [SIZE] ie. 512m
  • [FSTYPE] File system type, either tmpfs, ramfs, ext4, etc.

To make this setting persistent you might want to add to /etc/fstab fallowing line

tmpfs /mnt/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0