Simple disk performance IO test in Linux environment

Disk performance check: The example is as follows (the generated test file will be deleted after the test):
(1) Simulate the database to read and write small data to test the IO of the hard disk, the command is as follows: < /span>

# dd if=/dev/zero of=/opt/test bs=32k count=20k oflag=dsync
20480+0 records in
20480+0 records out
671088640 bytes (671 MB, 640 MiB) copied, 18.2872 s, 36.7 MB/s

If the result is lower than 20MB/s, it means that the disk performance is deviated. It is recommended that the customer coordinate with the hardware engineer to check; otherwise, the overall performance of the system may be greatly affected.
(2) Simulate large file writing to test the IO of the hard disk. The command is as follows:

[root@db ~]#  dd if=/dev/zero of=/opt/test bs=8192k count=100 oflag=dsync
100+0 records in
100+0 records out
838860800 bytes (839 MB) copied, 8.88575 s, 315 MB/s

If the result is lower than 200MB/s, it means that the disk performance is deviated. It is recommended that the customer coordinate with the hardware engineer to check; otherwise, the overall performance of the system may be greatly affected.
Note: Be sure not to reverse the values ​​of if and of, otherwise there is a risk of data erasure.

Guess you like

Origin blog.csdn.net/m0_38004228/article/details/134242997