AWS的IOPS计算

How to Calculate Your EBS Volume IOPS on CloudWatch

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.

参考:How to Calculate Your EBS Volume IOPS on CloudWatch

EBSのIOPSとスループットをCloudWatchから確認してみる | DevelopersIO

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值