First, you need to know two special devices:/dev/null: recycle bin, bottomless directory/dev/zero: generate character & amp; Oslash; test disk write capacity timeddif/dev/zeroof/test. dbfbs8kcount300000 because/dev // zero is a pseudo device, it only produces an empty swap stream ,... first, you must understand two special devices:
/Dev/null: recycle bin, bottomless pit
/Dev/zero: generate characters
Test the disk write capability
Time dd if =/dev/zero of =/test. dbf bs = 8 k count = 300000
Because/dev // zero is a pseudo device, it only produces a null compaction stream and does not generate IO for it. Therefore, IO is concentrated in the of file, and the of file is only used for writing, therefore, this command is equivalent to testing the disk write capability.
Testing disk read capability
Time dd if =/dev/sdb1 of =/dev/null bs = 8 k
Because/dev/sdb1 is a physical partition, reading it will generate IO,/dev/null is a pseudo device, which is equivalent to a black hole, of this device will not generate IO, so, the IO of this command only occurs on/dev/sdb1, which is equivalent to testing the disk's read capability.
Testing the simultaneous read/write capability
Time dd if =/dev/sdb1 of =/test1.dbf bs = 8 k
In this command, one is a physical partition and the other is an actual file. IO is generated for reading and writing them (read for/dev/sdb1 and write for/test1.dbf ), if they are all in one disk, this command is equivalent to testing the disk's simultaneous read/write capability.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.