© 2023 Facets Cloud Inc. All Rights Reserved
When it comes to optimizing your cloud costs, most practitioners tend to make use of saving plans recommended by AWS. However, can you just simply apply these recommendations in all scenarios? Maybe not. Let’s break down an example AWS Compute Savings plan recommendation and find out.
A quick recap:
There are two types of AWS savings plans: the Compute Savings plan and the EC2 Instance Savings plan. The AWS Compute Savings plan is more flexible and is applied automatically to EC2 instance usage regardless of instance family, size, AZ, Region, OS or tenancy etc. It can help you reduce costs by up to 66%.
On the other hand, the EC2 Instance Savings plan applies to individual instance families in a region.
In this example below, $5.894/hour was recommended to me based on a period of 7 days of usage:
So why should we analyze this recommendation?
What I understood is that AWS runs a simulation based on the past few days using the on-demand bill, and comes up with the recommendation.
Think of it as a bucket of a particular size (Committed Savings plan) that can carry objects which are elastic and can be squeezed into different proportions. This is for every hour of the bill.
Let us look at the recommendation again.
AWS advises $5.894/hour at Savings plan rate and leaves out an average of $5.62/hour at On-demand rate.
Together, that should amount to $1934 ($11.514/hour) spend for 7 days.
Head over to the AWS Cost Explorer and apply the following filters, and you'll find the numbers do indeed match.
Note in the filters: in the Purchase Options section, Reserved means classic reserved instances that we have previously bought, which are applied first.
Savings plan means a previously bought savings plan.
The On-demand category is the residual on-demand that is not covered by either.
If you have no auto-scaling of instances, day-wise granularity is enough. But if you have variable on-demand instances like us, we need to go further into hourly granularity (You may have to turn on a flag). AWS seems to be accounting for this, leaving out $5.62/hour at On-demand rate in the recommendations, which surely must be correct. Or is it?
Now, let's break it down to hourly resolution.
Looking at the hourly breakdown chart above, we can observe that the minimum residual spend is $4.39/hour. This is the baseline for our Compute cost.
Once they are squeezed into the Savings Plan bucket (up to 66%), the commitment requirement should be much lower than the recommended $5.894/hour.
Let us group by Platform and we can see that most of the left-over on-demand hours are primarily Windows machines.
We have a small fraction of compute as Windows machines and the previously bought Saving Plans are being applied to the Linux machines with higher savings (rightfully so). On Windows, machines have about a 25% average discount compared to 66% earlier than we thought, so that explains the lower savings, partially.
However, the bucket still should be a smaller size if everything is squeezed and the recommendation would still be less if it took the $4.39 into account. Let's do that. So now our Revised commitment would be ($4.39/hr)*(100%-25%) = $3.3/hr. This should result in a saving of $4.39/hr - $3.3/hr = $1.1/hr.
Now, we have accounted for $1.1/hr out of the recommended $1.71/hr with $3.3/hr of savings plan commitment out of $5.894/hr. The remaining $2.6/hr commitment will lead to a saving of $0.6/hr.
Now with this revised commitment, we have accounted for $1.1/hr out of the AWS recommended saving of $1.71/hr with $3.3/hr savings plan commitment out of the AWS recommended $5.894/hr.
The remaining $2.6/hr ( $5.894/hr- $3.3/hr) commitment in AWS recommendation will lead to a saving of $0.6/hr ($1.71/hr- $1.1/hr).
Let's define a new metric here - Return on Commitment (RoC), i.e. how much $/hr we save with $1/hr of commitment.
For the first $3.3/hr, the RoC is = $1.1/$3.3, i.e. 33%
For the second $2.6/hr of the commitment, the RoC = $0.6/$2.6 , i.e. 23%.
So the Return on Commitment ROC, has reduced from 33% for the first part to 23% for the second part.
Now, that's something to think about!
So even if AWS is leaving out some part of the variable spend, it is probably leaving out the bits where incremental savings is minimal to every additional $ of spend.
However, this means that some part of the savings plans is unused for some hours of the day and that negates the benefit of savings for the hours they are being used.
Our revised recommendation would be to commit with a $3.3/hr saving plan rate out of the AWS recommended $5.894/hr and that should save $1.1 out of $1.71/hr. The revised table would now look like this.
The leftover Windows machines aren't great for savings plans anyways, so we may not do anything about that.
Now we have a way to dig deeper and work out the trade-offs on how much we are committing for 3 years and what ROIs are we getting.
Let us know if you have any additional queries, we'll get back to you soon.
Tell us your queries and we’ll get back to you
Prefer email? Reach out to us at email@example.com