http://xmodulo.com/setup-raid10-linux.html
RAID Performance Tests using DD
The following benchmarking tests can be used to check on the performance of our RAID 10 array (/dev/md0).
1. Write operation
A single file of 256MB is written to the device:
# dd if=/dev/zero of=/dev/md0 bs=256M count=1 oflag=dsync
512 bytes are written 1000 times:
# dd if=/dev/zero of=/dev/md0 bs=512 count=1000 oflag=dsync
With dsync flag, dd bypasses filesystem cache, and performs synchronized write to a RAID array. This option is used to eliminate caching effect during RAID performance tests.
2. Read operation
256KiB*15000 (3.9 GB) are copied from the array to /dev/null:
# dd if=/dev/md0 of=/dev/null bs=256K count=15000
RAID Performance Tests Using Iozone
Iozone is a filesystem benchmark tool that allows us to measure a variety of disk I/O operations, including random read/write, sequential read/write, and re-read/re-write. It can export the results to a Microsoft Excel or LibreOffice Calc file.
Installing Iozone on CentOS/RHEL 7
Enable Repoforge. Then:
# yum install iozone
Installing Iozone on Debian 7
# aptitude install iozone3
The iozone command below will perform all tests in the RAID-10 array:
# iozone -Ra /dev/md0 -b /tmp/md0.xls
- -R: generates an Excel-compatible report to standard out.
- -a: runs iozone in a full automatic mode with all tests and possible record/file sizes. Record sizes: 4k-16M and file sizes: 64k-512M.
- -b /tmp/md0.xls: stores test results in a specified file.
Write tests:
dd if=/dev/zero of=/mnt/beast/test/ddfile bs=2048k count=10000
20971520000 bytes transferred in 146.161146 secs (143482181 bytes/sec)
20971520000 bytes transferred in 166.954361 secs (125612292 bytes/sec)
Read tests:
dd of=/dev/null if=/mnt/beast/test/ddfile bs=2048k count=10000
20971520000 bytes transferred in 85.232895 secs (246049603 bytes/sec)
20971520000 bytes transferred in 73.342644 secs (285938968 bytes/sec)