Creating A Simple Ramdisk
I needed to do a task that thrashes the filesystem a lot by creating many temporary files, then deleting them. Since all of this easily fits in a small ramdisk (I think these are 16 megabytes for my system, by default.)
So I figured, why not speed things up and reduce filesystem thrash with a ramdisk? I picked /dev/ram9
, but it doesn't really matter; I also put it in /tmp
so that it's not persistent (put it in /mnt
and make an addition to /etc/fstab
if you want it persistent.)
1234 | sudo mkfs -t ext3 /dev/ram9
mkdir /tmp/<name>
sudo mount /dev/ram9 /tmp/<name>/
sudo chown <user> /tmp/<name>/
|
That's it!
Ches Koblents
June 21, 2017