Inconsistent IO speed with dd command

Solution Verified - Updated -

Issue

  • When I write to the disk and overwriting the file I get significant performance drop:

        # time sh -c "dd if=/dev/zero of=ddfile bs=8k count=100000 ; sync"
        100000+0 records in
        100000+0 records out
        819200000 bytes (819 MB) copied, 0.778416 s, 1.1 GB/s
    
        real    0m9.528s
        user    0m0.018s
        sys     0m0.594s
    
        # time sh -c "dd if=/dev/zero of=ddfile bs=8k count=100000 ; sync"
        100000+0 records in
        100000+0 records out
        819200000 bytes (819 MB) copied, 7.76798 s, 105 MB/s
    
        real    0m9.376s
        user    0m0.011s
        sys     0m1.084s
    

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content