Knowledge Base
linbit.com Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Collecting Basic I/O Statistics and Average Disk Activity

This article will help you collect I/O statistics to determine how active your disks are. This can help you determine feasibility of WAN replication using DRBD Proxy.

A full week of iostat data should provide a good sample:

 # iostat -m 60 10080 -t -y > ~/iostat.rpt

Then get the average (grep for backing, ‘dm-7’ in this case):

$ count=0; total=0; for i in $(grep dm-7 ~/iostat.rpt | awk '{ print $4; }'); do
total=$(echo $total+$i | bc ); ((count++)); done; echo scale=2; $total / $count | bc

Another example for collecting and calculating averages using awk:

#  iostat -xymt dm-7 300 288 > ~/iostat.rpt

You can then awk that file to get the average write throughput for the sample period like so:

# grep dm-0 /tmp/iostat-output.txtt | awk '$1 {sum += $7} END {print sum / NR}'

If the average write throughput is far greater than your average WAN network throughput, then you might not be able to use DRBD® and DRBD Proxy for DR (disaster recovery) replication offsite.


Reviewed 2020/12/01 – DGT