Showing posts with label ramdisk. Show all posts
Showing posts with label ramdisk. Show all posts

Sunday, December 30, 2018

How to set up ramdisk in Linux - A very simple guide

RAMDisk is a kind of storage that uses a portion of RAM storage capacity to store files. Although the ramdisk provides a huge speed improvements over HDD and even SSDs, but the main problem is all the files inside the ramdisk will disappear when you turn off your PC or even unexpected shutdown happens. The usage of ramdisk is mainly for speeding up the caching process and also used for making video rendering process much faster.

To set up the ramdisk, you will need to create a directory in the folder /mnt/ramdisk and also set the permission to allow full access:
sudo mkdir /mnt/ramdisk
sudo chmod 777 /mnt
sudo chmod 777 /mnt/ramdisk

Then, you will need to create a new ramdisk, make sure that your PC should have at least 4GB RAM:
sudo mount -t tmpfs -o size=1GB myramdisk /mnt/ramdisk

To unmount the ramdisk, just type this command below:
sudo umount /mnt/ramdisk