Test disk IO speed with time+dd+if
Write Speed:
Time DD If=/dev/zero of=test.dbf bs=8k count=300000
Where/dev/zero is a pseudo-device that produces only a stream of empty characters and does not produce IO for it, so the IO is concentrated in the of file, the of file is used only for writing, so this command is equivalent to the write capability of the test disk.
The output is similar (because generally longer test times are more accurate, so you can set the count larger):
300000+0 Records in
300000+0 Records out
Real 0m36.669s
User 0m0.185s
SYS 0m9.340s
So the write speed is: 8*300000/1024/36.669=63.916m/s
Reading speed:
Time DD IF=/DEV/VDC Of=/dev/null bs=8k
Because/DEV/VDC is a physical partition, reading it will produce io,/dev/null is a pseudo device, equivalent to a black hole, of which the device does not produce IO, so the IO of this command only occurs on the/DEV/VDC and is equivalent to the read capability of the test disk.
The results of the output are similar:
448494+0 Records in
448494+0 Records out
Real 0m51.070s
User 0m0.054s
SYS 0m10.028s
So the read speed on the VDC is: 8*448494/1024/51.070=68.61m/s
Note: If the system load is high, you can use commands such as vmstat,top,iostat to view
Linux system Test disk IO performance and load