Testing Drive Speed in Linux
A very reliable test to determine the current write speeds of your drive or array can be done via the 'dd' tool, available in most Linux/Unix operating systems.
Wrong use of the 'dd' command may result in data loss, proceed with caution and do not write to block devices directly if there is any data on it.
The command below will create a file 'test.bin' in your root directory of a total of 4GB, and subsequently delete it after the test has been completed.
dd if=/dev/zero of=/test.bin bs=1M count=4K conv=fdatasync; rm /test.bin
When testing the write speeds of an array via a hardware raid controller, make sure the total amount written exceeds the available cache to ensure accurate readings.
Another great tools for benchmarking your disks is via hdparm, which gives you an accurate reading of the (cached) reading speed capabilities of your drives.
This may be done with the following command. You may need to substitute the given block device with the correct one.
hdparm -Tt /dev/sda