Reference1:http://server.chinabyte.com/495/12361995.shtml
reference2:https://www.deleak.com/blog/2011/11/05/big-penis-lol/
Learn two special devices first
/dev/null pseudo-device, Recycle Bin. Writing the file does not generate IO
/dev/zero pseudo-device generates an empty character stream, which does not produce IO
Test method:
A. Test disk IO write speed
Time DD If=/dev/zero of=test.dbf bs=8k count=300000
B. Test disk IO Read speed
DD if=test.dbf bs=8k count=300000 of=/dev/null
#表示 perform 300,000 times per write/read of 8k data
DD commands can be generic, but not professional, and do not take into account the cache and physical reading of the distinction, the test data is only for reference, not considered authoritative.
##########################
Use this method to test the notebook I bought in 08, write Speed 23m/s ; reading Speed 91m/s
##########################
DD Command Explanation
DD if= of= bs= skip= seek= conv=
Be sure not to confuse source and target, or the data will be lost. So DD usually use a handy call it DD, but accidentally the data lost it should cry call it data Destroyer.
In general, its common parameters are:
- Bs=n,block size, each read n bytes write, can be associated with count;
- Ibs=n, read in bytes byte at a time (default is 512);
- Obs=n, write n bytes bytes at once (default is 512);
- BS can set the top two parameters at the same time;
- Cbs=n, converts n bytes at a time, which is the size of the conversion buffer. ;
- Count=n, the number of times a BS operation, copying only n blocks, such as dvd:bs=1m count=4430;
- Skip=n, refers to the if after the original file skip N bytes and then start reading;
- Seek=n, which refers to the target file after skipping n bytes to start writing;
Read/write IO speed "Go" of test disk under Linux