How to Calculate Your EBS Volume IOPS on CloudWatch

[rt_reading_time label=”Read Time:” postfix=”minutes” postfix_singular=”minute”]

AWS How-To Guide

Find your Elastic Block Store (EBS) Volumes input/output operations per second (IOPS) in a specific period using the CloudWatch dashboard:

Our Managed Services team works with clients who often inquire about the performance of their Elastic Block Store (EBS) volumes which are crucial for production servers. By better understanding how to monitor your EBS volumes, your IT team can prevent slowness and latencies which would impact your end-users and company’s operations. Also, it will help you scale to the right IOPS level which will help you optimize cost within your business as well as upgrade your infrastructure levels.

What is EBS used for?

Amazon Elastic Block Store (EBS) provides highly available, raw block-level storage volumes that can be attached to Amazon Elastic Compute Cloud  (EC2) instances and is used by Amazon Relational Database Service (RDS). AWS EBS enables you to keep data persistently on a file system, even after you shut down your EC2 instance.

What is an IOPS AWS?

IOPS is an acronym for “input/output operations per second” and is a popular performance metric used to distinguish one storage type from another. Similar to device makers, AWS associates IOPS values to the volume component backing the storage option. Provisioned IOPS are an AWS EBS volume type designed to deliver predictable, high-level performance for I/O intensive workloads such as database applications.

Using the CloudWatch dashboard to Calculate Your EBS Volume IOPS

Whereas RDS and EC2 instances’ IOPS metrics can be easily viewed through graphs provided by AWS, getting the same insight on the CloudWatch dashboard will require you to run some calculations to find the IOPS used in a specific period of time.

IOPS usage can be simply calculated by knowing the total read and write throughputs (ops) of your disk divided by the time in seconds within that period.

IOPS Usage = (Total Read + Write Throughputs) / Time (in Seconds)

In this How-To guide, I will explain how to do that calculation on AWS to determine if your EBS volumes require more IOPS to be provisioned or if they just need to be initialized (pre-warmed) which is the case for recently launched volumes from S3 snapshots that normally cause spikes in the Average Queue Length despite normal IOPS metrics.

For this example: I used a SQL database instance where the SQL operations runs on D: drive, /dev/sdb (our device code on AWS)

Note: You can find the EBS device code on the bottom right of the instance properties. More information how to map the EBS Devices to match your local volume Drive Letter

How to Calculate Your EBS Volume IOPS on CloudWatch 1

Once you click on the volume code you will be presented with the EBS Volume ID, copy that Volume ID.

Next step, open CloudWatch and click Metrics on the bottom left.

How to Calculate Your EBS Volume IOPS on CloudWatch 2

Choose All > EBS > Per-Volume Metrics.

Select the desired metric volume which are VolumeWriteOps (write throughput) and VolumeReadOps (read throughput). How to Calculate Your EBS Volume IOPS on CloudWatch 3

We will start with the VolumeReadOps, then choose a specific time and the data-point period.

In this scenario, I chose to monitor/zoom the dataset at 08:15 (UTC) with a data-point period of 15 minutes, since I observed spikes that started close to 8:00 AM and ended around 8:30 AM.

Our goal is to find the IOPS utilized within that 15-minute period.

How to Calculate Your EBS Volume IOPS on CloudWatch 4

Make sure that your Metric Statistic is changed to SUM from AVERAGE

Find your VolumeReadOps sum between 08:00 – 08:15

How to Calculate Your EBS Volume IOPS on CloudWatch 5

Then find your VolumeWriteOps sum between 8:00 – 8:15:

How to Calculate Your EBS Volume IOPS on CloudWatch 6

Now that we have both Read and Write Throughput sumss for the closest data-point to 08:15 UTC, we are ready to calculate the IOPS.

Note: By choosing a one minute period we could have gotten more precise numbers within a minute. However, if there are no major disk Ops spikes within those 15 minutes, it should suffice.

Going back to the formula we presented in the beginning:

IOPS USED = (READ THROUGHPUT + WRITE THROUGHPUT) / Time (in seconds)

——-

In our example:

(VolumeReadOps is 3,027,754 + VolumeWriteOps is 12,587) / (60 seconds x 15 minutes)

= 3,040,341/ 900

= 3,378 Total IOPS

From this point you will want to compare your total IOPS provisioned for that volume in order to prevent latencies for your server.  On default settings, the amount of IOPS provisioned will be three times the EBS volumes size – based on I/O Credit Balance you receive for General Purpose SSD (GP2) from AWS.  This can be increased up to 10,000 IOPS or converting to PIOPS EBS Volume Type to receive higher amount if needed.

Want to learn more on how to better monitor and optimize your AWS environment? Try our free 30-day trial of our cost management software.

Hidden layer

Share on linkedin
Share on twitter
Share on facebook
Share on email

Onica Insights

Stay up to date with the latest perspectives, tips, and news directly to your inbox.

Explore More Cloud Insights from Onica

Blogs

The latest perspectives on navigating an ever-changing cloud landscape

Case Studies

Explore how our customers are driving cloud innovation in their industries

Videos

Watch an on-demand library of cloud tutorials, tips and tricks

Publications

Learn how to succeed in the cloud with deep-dives into pressing cloud topics