Test hard disk read and write speed under CentOS

Source: Internet
Author: User

This is on the server, read and write super fast.

Write speed

$dd If=/dev/zero bs=1k count=1000000 of=1gb.file

1000000+0 Records in
1000000+0 Records out
1024000000 bytes (1.0 GB) copied, 5.13676 seconds, 199 MB/s

Read speed

$dd if=1gb.file bs=64k |dd of=/dev/null

[Haibo@localhost ~]$ dd if=1gb.file bs=64k |dd of=/dev/null
15625+0 Records in
15625+0 Records out
1024000000 bytes (1.0 GB) copied, 6.37813 seconds, 161 MB/s
2000000+0 Records in
2000000+0 Records out
1024000000 bytes (1.0 GB) copied, 6.37891 seconds, 161 MB/s

Read and write speed

$DD if=1gb.file Of=2gb.file bs=64k

15625+0 Records in
15625+0 Records out
1024000000 bytes (1.0 GB) copied, 2.21364 seconds, 463 MB

This is on the local virtual machine.

[Root@localhost ~]# dd If=/dev/zero bs=1k count=1000000 of=1gb.file
1000000+0 Records in
1000000+0 Records out
1024000000 bytes (1.0 GB) copied, 39.6289 seconds, 25.8 MB/s
[Root@localhost ~]#
[Root@localhost ~]#
[Root@localhost ~]# dd if=1gb.file bs=64k |dd of=/dev/null
2000000+0 Records in
2000000+0 Records out
1024000000 bytes (1.0 GB) copied, 39.8982 seconds, 25.7 MB/s
15625+0 Records in
15625+0 Records out
1024000000 bytes (1.0 GB) copied, 39.9039 seconds, 25.7 MB/s
[Root@localhost ~]# dd if=1gb.file of=2gb.file bs=64k
15625+0 Records in
15625+0 Records out
1024000000 bytes (1.0 GB) copied, 46.391 seconds, 22.1 MB/s

The linux4 version is timed with time.

[xxx]$ time DD If=/dev/zero bs=1k count=1000000 of=1gb.file

1000000+0 Records in

1000000+0 Records out

Real 0m2.035s

User 0m0.114s

SYS 0m1.921s

Write Speed: 1000m/2.035=491m

[xxx]$ time DD if=1gb.file bs=64k |dd of=/dev/null

15625+0 Records in

15625+0 Records out

2000000+0 Records in

2000000+0 Records out

Real 0m2.420s

User 0m0.368s

SYS 0m1.889s

Read speed: 1000m/2.420=413m

Related Article

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.