User Tools

Site Tools


software:io_benchmark

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

software:io_benchmark [2015/08/11 20:32] (current)
Line 1: Line 1:
 +===== What is this? =====
 +My notes on basic i/o benchmarks on linux/unix systems.
  
 +Writing a file without sync is fast ofcourse:
 +<​code>​
 +time dd if=/​dev/​zero of=file bs=512M count=1
 +</​code>​
 +
 +So sync should be used, using one of these variants:
 +<​code>​
 +sync; time bash -c 'dd if=/​dev/​zero of=file bs=512M count=1; sync'
 +time dd if=/​dev/​zero of=file bs=512M count=1 oflag=direct
 +</​code>​
 +
 +<​code>​
 +# capturing data
 +for i in {1..11}; do time dd if=/​dev/​zero of=file bs=1G count=6 oflag=direct 2>&​1;​ done | tee time.txt
 +vmstat 10 | tee vmstat.txt
 +iostat -x 10 sda2 | tee iostat.txt
 +
 +
 +# calculating average time:
 +# cat time_ht |grep real|sed -e '​s,​.*m,,'​ -e '​s,​s,,' ​ | \
 +#   awk '​{if(min==""​){min=max=$1};​ if($1>​max) {max=$1}; if($1< min) {min=$1}; total+=$1; count+=1} END {print total/​count,​ min, max}'
 +
 +# suming up wait from vmstat
 +# manually removed entries at beginning/​end of file that were bevore/​after the dd run
 +# cat vmstat_ht |egrep -v '​^procs|^ r  b'|awk '​{print $16}' | \
 +#   awk '​{if(min==""​){min=max=$1};​ if($1>​max) {max=$1}; if($1< min) {min=$1}; total+=$1; count+=1} END {print total/​count,​ min, max}'
 +</​code>​
software/io_benchmark.txt ยท Last modified: 2015/08/11 20:32 (external edit)