Linux DD command test drive read and write speed

Source: Internet
Author: User

1. DD Command Brief:

if= input file, of= output file, ibs= bytes read at a time, obs= write bytes at a time, bs= set the number of bytes written at one time, skip= skipped BS number, count= copy block number

2. Using/dev/null and/dev/zero

  1. Treat/dev/null as a "black hole", which is equivalent to a write-only file, and all content written to it will be lost forever

2./dev/zero is a pseudo-file, but it actually produces a continuous stream of NULL

3. Test drive Read and write speed

# # cut into the U-disk directory, test write speed
# dd If=/dev/zero of=./largefile bs=8k count=10000
10000+0 Records in
10000+0 Records out
81920000 bytes ( ) copied, 11.0626 s, 7.4 MB/ s

# # Test Read speed (clear cache)
# sudo sh-c "Sync && echo 3 >/proc/sys/vm/drop_caches"
# dd If=./largefile of=/dev/null bs=8k
8000+0 Records in
8000+0 Records out
65536000 bytes (MB) copied, 2.90366 s, 22.6 MB/s

Source: Internet

Linux DD command test drive read and write speed

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.