How do I use CloudWatch metrics to calculate the average throughput and average number of IOPS that my EBS volume provides?

2 minute read
0

I want to use Amazon CloudWatch metrics to calculate the average throughput and average number of IOPS of my Amazon Elastic Block Store (Amazon EBS) volume.

Short description

To calculate the average throughput and number of IOPS of your volume, use Amazon CloudWatch metrics and metric math. Also, create CloudWatch alarms to monitor the data in your Amazon EBS volumes.

Resolution

  1. Open the CloudWatch console.
  2. Under Metrics, choose All metrics.
  3. Choose EBS namespace, and then choose Per-Volume Metrics.
  4. Select the corresponding metrics of the Amazon EBS volume:
    To calculate average IOPS, select VolumeReadOps, VolumeWriteOps, and VolumeIdleTime.
    To calculate average throughput, select VolumeReadBytes, VolumeWriteBytes, and VolumeIdleTime.
  5. Choose the Graphed metrics tab.
  6. For Statistic, choose Sum.
  7. For Period, choose the period of time that you want to view.
  8. Note the metric IDs in front of each graphed metric, for example m1, m2, m3, and so on.
  9. For Add math, choose Start with empty expression, and then enter the following expressions to calculate the expected average value.

Calculate the average IOPS in Ops per second when the volume is active: 
Note: In the following expression, m1 is VolumeReadOps, m2 is VolumWriteOps, and m3 is VolumeIdleTime. Also, PERIOD() is a metric math function that returns the period of the metric in seconds.
(m1+m2)/(PERIOD(m1)−m3)

Calculate the average IOPS in Ops per second:
Note: In the following expression, m1 is VolumeReadOps and m2 is VolumeWriteOps.
(m1+m2)/(PERIOD(m1))

Calculate the actual average throughput in bytes per second when the volume is active:
Note: In the following expression, m1 is VolumeReadBytes, m2 is VolumeWriteBytes, and m3 is VolumeIdleTime.
(m1+m2)/(PERIOD(m1)−m3)

Calculate the average throughput in bytes per second:
Note: In the following expression, m1 is VolumeReadBytes and m2 is VolumeWriteBytes.
(m1+m2)/(PERIOD(m1))

Note: Because of micro bursting, the average value of throughput and IOPS might be different from the actual average value. Throughput and IOPS are per-second measurements. CloudWatch doesn't aggregate Amazon EBS volume metrics at the per-second interval. For more information, see How can I identify if my Amazon EBS volume is micro-bursting and then prevent this from happening?

Related information

Amazon CloudWatch metrics for Amazon EBS