Is there a way I can benchmark tmpfs

I created a tmpfs which was mounted at /ramdisk using the mount command.And I tried to benchmark this tmpfs using something like this:

hdparm -tT /ramdisk

And I was told that /ramdisk is a directory.But apparently there isn’t a corresponding device file under the /dev directory for the tmpfs I created.
So is there a way I can benchmark this tmpfs?

Thanks

Answer

Take a look at this

In your situation:

Test writing speed:

dd if=/dev/zero of=/ramdisk bs=4k count=10000

Test reading speed:

dd if=/ramdisk of=/dev/null bs=4k count=10000

Attribution
Source : Link , Question Author : Steven Jang , Answer Author : Bruce Sun

Leave a Comment