Test hard disk read/write speed in linux

Source: Internet
Author: User

Test hard disk read/write speed in linux

After buying an ssd hard disk, I want to compare it with an ordinary mechanical disk. Because the desktop is installed with the ubuntu system, I just want to use the linux Command for a simple test.

The following are ssd performance data:

Test write:

xxx@WaitFish:~ > time dd if=/dev/zero bs=1024 count=1000000 of=1Gb.file1000000+0 records in1000000+0 records out1024000000 bytes (1.0 GB) copied, 3.78724 s, 270 MB/sreal    0m3.789suser    0m0.839ssys     0m2.527s

Reads data from null to files. The block size is 1024, and the number is 1000000.

Test read:

xxx@WaitFish:~ >time dd of=1Gb.file if=/dev/zero bs=1024 count=10000001000000+0 records in1000000+0 records out1024000000 bytes (1.0 GB) copied, 3.84934 s, 266 MB/sreal    0m4.009suser    0m0.852ssys     0m2.698s
Read data from a file to null to test read performance

Below is the speed of the mechanical Disk:

Write Performance:

sudo time dd if=/dev/zero bs=1024 count=1000000 of=1Gb.file1000000+0 records in1000000+0 records out1024000000 bytes (1.0 GB) copied, 69.5384 s, 14.7 MB/s1.62user 13.84system 1:09.56elapsed 22%CPU (0avgtext+0avgdata 704maxresident)k72inputs+0outputs (2major+221minor)pagefaults 0swaps
Read performance:
Xxx @ WaitFish:/media/xx/Add volume> sudo time dd of = 1 GB. file if =/dev/zero bs = 1024 count = 10000001000000 + 0 records in1_00 + 0 records out10241_00 bytes (1.0 GB) copied, 71.2378 s, 14.4 MB/s1.66user 14.34 system. 34 elapsed 22% CPU (0 avgtext + 0 avgdata 700 maxresident) k0inputs + 0 outputs (0 major + 224 minor) pagefaults 0 swaps
It seems that the difference is not a little bit, hahaha

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.