Mounting RAM as disk reaching much faster than SSD write speed

We can mount RAM DDR4/3 etc in a folder and use that folder as usual disk! But volatile.


How to: (adjust parameter as your need)
sudo mount -t tmpfs -o rw,size=8G tmpfs $HOME/ramdisk

testing speed:
time sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 && sync"; rm ddfile
View this post on Instagram

A post shared by Muhammad Izzulmakin (@makintechnologies)

unmount (depends on your mount folder location)
sudo umount $HOME/ramdisk

Mounting ram as /tmp or other path using file: /etc/fstab
#add lines in /etc/fstab
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M 0 0