3
1
I've looked up the hdparm
command, but all examples are for testing disks. Not sure if it can be used to test external usb devices (specifically a usb flash stick).
I'm using this code right now:
dd if=/dev/zero of=/media/storage/speed_test.txt bs=100K count=1k
sudo /sbin/sysctl -w vm.drop_caches=3
dd if=$/media/storage/speed_test.txt of=/dev/null bs=100K count=1k
What are the ranges of read and write speeds I should expect? I got ~900 MB/s for write and ~500 MB/s for read and I think the numbers are too high. Am I not clearing the cache correctly? What other commands I can use to test the speed?
Update:
Thanks to user427539
’s answer and zloster
’s comment, I now have a more accurate measurement of speeds. I'm testing with a 16GB USB flash stick and I'm writing and reading 1 GB of data. I got 22 MB/s for writing and 46 MB/s for reading. However, aren't such speeds too slow for a USB3 flash device? Why would the speed be so low?
You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
– zloster – 2015-03-14T16:03:17.737