Running hard disk tests
Learn some diagnostic methods and use them to ensure that the hardware infrastructure is in good shape. On Linux®, you can use the hdparm and dd commands or the Bonnie++ application to determine the hard disk read and write rate. You can also use the iostat command to determine average disk usage.
Determining the read rate with the hdparm command
In the Linux operating system, there is a built-in hdparm command that can be used to determine the hard disk read rate.
Procedure
In the Linux console, enter hdparm -t path_to_the_test_file
hdparm -t /dev/sda1
Timing buffered disk reads: 200 MB in 1.19 seconds = 167.47 MB/sec
Running the disk test with the DD application
About this task
The DD test measures the most basic single-threaded disk access, which is a large sequential
write, followed by a large sequential read. It is relevant for the database performance testing
effort because it gives you the maximum speed for sequential scans of large tables.
Note: Check the
RAM size on the testing computer to correctly run a DD test and avoid file system caching that can
distort the test results.
Procedure
Determining disk usage
If response times are slow, check the average disk usage with the iostat command. Disk usage times of greater than 80% can reduce I/O performance, it is desirable to have average disk usage below 40%.
Procedure
In the Linux console, enter iostat -x interval duration
Where:
- interval is the time interval in seconds. If no interval is specified, the output reflects the values over the entire period since the system was rebooted
- duration is the number of times to run the command.
Example:
iostat -x 30 5