Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've bee looking into the possibility that my server is experiencing a lot of iowait issues. I've found a lot online about running the dd command. I am unable to run this conv:

[root@vps ~]# dd if=/dev/zero of=/tmp/test bs=64k count=16k conv=fdatasync
dd: invalid conversion: `fdatasync'
Try `dd --help' for more information.

I also tried without the conv and I don't get statistics like most of the postings I see from other people. Can someone explain why this is the case?

[root@vps ~]# dd if=/dev/zero of=/tmp/test bs=64k count=16k
16384+0 records in
16384+0 records out
share|improve this question
    
What statistics do other people see? dd seems like the wrong tool. Sar would show you better info about io waits. –  Mark Wagner May 14 '11 at 1:23
add comment

2 Answers

Try dstat or iostat with SWAT or Cacti for charting. (This is assuming you're not using Solaris, OpenIndiana or variants in which case you'd use Dtrace.)

http://freshmeat.net/projects/dstat/?branch_id=54241&release_id=251831

http://blogs.oracle.com/paisit/entry/import_iostat_data_to_swat

http://forums.cacti.net/post-170326.html

Also look at:

ioapps - http://code.google.com/p/ioapps/

strace_analyzer - http://clusterbuffer.wetpaint.com/page/Strace+Analyzer+-+Next+Generation

strace_analyzer tutorial - http://www.linux-mag.com/id/7730/1/

share|improve this answer
add comment

Your dd version apparently does not support the fdatasync conversion. If you can't get the statistics out of it, you might perform your own calculations by using something like

time sh -c "dd if=/dev/zero of=/tmp/test bs=64k count=16k && sync"

this will give you the total amount of time needed for writing and syncing - you can just divide the amount of data (1 GB in your example) by the amount of time to calculate the mean write rate.

share|improve this answer
2  
Unfortunately, the sync command will flush all data, which can be waaay more than the 1GB from dd when the server is loaded. –  Turbo J May 14 '11 at 3:06
1  
If you use oflag=sync it will use synchronized I/O for all data and metadata writes. Or you could use oflag=direct to use direct I/O. This is better than using dd ... && sync, as per Turbo J's comment. It also means you can trust dd's time/speed calculations: "dd if=/dev/zero of=/tmp/test bs=64k count=16k oflag=sync" –  Daniel Lawson May 14 '11 at 3:15
    
Data in write caches is typically written to platters within a few seconds anyway, writing 1 GB is likely to flood the caches and benchmark calculations are typically taken when the system is idle. So unless you have vast write caches, multiple devices which have been written to during your benchmarks or extremly high transfer rates to expect, just doing a "sync" is a good enough estimate. BTW, the poster's "dd" did not spit out any calculations - that's why he might to use "time" in the first place. –  syneticon-dj May 14 '11 at 8:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.