How to create a ramdisk?

Writing to a SSD

Let's first write 500Mo to a ssd with the command :

dd if=/dev/zero of=test.iso bs=1M count=500

On my machine with a ssd I get the following results

500+0 records in
500+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 10,153 s, 51,6 MB/s

Writing to a ramdisk

Let's now create a temporary ram disk and see how faster it is

mkdir /mnt/ram
mount -t tmpfs tmpfs /mnt/ram -o size=600M
cd /mnt/ram
dd if=/dev/zero of=test.iso bs=1M count=500

The results yield a faster write time :

500+0 records in
500+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 6,39849 s, 81,9 MB/s

on a machine with linux installed natively the results shoud be even faster.