The Ultimate Guide to AWS Reserved Instances, Part 2: Rightsizing Your Infrastructure

Rachel Dines
CloudHealth Technologies
4 min readDec 20, 2017

You might be thinking, what does rightsizing have to do with RIs? Before making a financial commitment to any instance type or family, you must first determine if you are using the right instance type. Let’s walk through a quick example to understand why:

If I don’t look at performance or do any rightsizing, I might assume that I should buy 10 r4.2xlarge RIs to cover that usage, that seems logical. If I bought a 1 year All-Upfront RI for these, they would cost $2,740 each for a total of $27,400. This seems like a lot, but it’s going to save me 41% compared to On-Demand.

  • I discover I’ve been running 10 r4.2xlarge instances 24/7 On-Demand for the past 4 weeks
  • However, when I dig into those r4.2xlarge machines, I find that they have barely been utilized the past 4 weeks, their CPU, memory, network, and disk is maxing out at only 30%
  • After some analysis, I realize that this workload would actually run on r4.xlarge without any impact on the application, and still have some headroom for unexpected spikes. After talking to the application owner, we agree to first downgrade the instances to r4.xlarge, and then we can purchase the RIs.
  • The 10 r4.xlarge All-Upfront RIs cost $1,370 each for a total of $13,700.

In the example above, if I hadn’t gone through the process of rightsizing before making my RI purchase, I could have wasted $13,700 and spent 2x what was necessary. But what about size flexibility, you might ask? It’s true that if I first purchase RIs, and they are of the Size Flexible variety, then the r4.2xlarge RIs could have automatically covered the r4.xlarge instances after rightsizing. But I would have purchased excess capacity in the r4 family that might have gone unutilized.

Now that you understand why it’s critical to rightsize your instances before purchasing RIs, how does it work? Essentially, what you are trying to do is pick the most effective instance to meet the technical requirements of the given workload. To do this, you must analyze the CPU, memory, network, and disk consumption of your workload overtime, and understand if it might fit in a smaller instance. Visualizing with a spider chart can help!

Doing this analysis manually by charting every single individual instance is incredibly time consuming, and not viable at scale. That’s where solutions like CloudHealth come into play. Using CloudHealth rightsizing reports, you can analyze groups of instances and then dive deeper into the worst offenders to get specific recommendations.

It’s critical to look at all performance metrics — CPU, memory, network, and disk — and be able to quickly visualize how well utilized they are using a scoring mechanism. It’s also crucial to be able to adjust your scoring criteria for your unique workloads. Why? Because not all instance types and workloads will conform to the same patterns. Let’s revisit the example earlier with the 10 r4.2xlarge instances. I have a standard rightsizing policy that will flag an instance as severely underutilized when:

  • Maximum CPU % is less than 20%
  • Maximum Memory % Used is less than 35%
  • Maximum File System % Used is less than 35%
  • Any resource’s Maximum Network In or Out (%) is less than 5%

However, since the R family is a memory optimized instance type, I might want to score it based on a policy that looks like this:

  • Average CPU % is less than 10%
  • Maximum Memory % Used is less than 50%
  • Maximum File System % Used is less than 35%
  • Any resource’s Maximum Network In or Out (%) is less than 5%

Since I run memory intensive workloads on R family instances, I expect the CPU to be underutilized — I’ve set the threshold pretty low, and to average. I do want to keep a close watch on memory, however, since that will be a good indication to me if we can downgrade within the family.

Next step, Making the Reservation Purchase

Now that you’ve mastered the process of rightsizing, let’s move on to phase 3, the actual RI purchase. Learn about the different types of RIs, and the process of a reservation purchase.

Part 3: Making the Reservation Purchase

To learn more about how you can cut down your AWS spend with Reserved Instances, check out The Ultimate Guide to Amazon EC2 Reserved Instances eBook!

Get Your Free Copy

Originally published at www.cloudhealthtech.com.

--

--

Rachel Dines
CloudHealth Technologies

I run product marketing at Chronosphere (cloud native observability at scale). Recovered Forrester analyst. Past lives: CloudHealth by VMware, NetApp, Riverbed.