As cloud users continue to use Alibaba Cloud, extending its global presence, we’ll review a comparison of AWS vs Alibaba Cloud pricing. Commonly recognized as the #4 cloud provider (from a revenue perspective anyway), Alibaba is one of the fastest-growing companies in the space today.
Alibaba has been getting a lot of attention lately, given its rapid growth, and making headlines after the release of their latest quarterly revenue and full fiscal year 2019 reports. Alibaba is at the top of the market in Asia, and dominating in China with cloud revenue up 66% year-over-year. While Alibaba is in the top 5 CSPs worldwide, they still have a lot of plans for the future to maintain this growth and continue to move up.
The company said it is focused on high-value security, analytics, and artificial intelligence tools and “rationalizing our offerings of commodity products and services.” With an annual revenue run rate of $4.5 billion, it is clear that Alibaba Cloud intends to compete globally with AWS and other major cloud providers.
However, on a global scale, AWS continues to dominate the market. In the latest quarter, Amazon reported Amazon Web Services (AWS) sales of $7.7 billion, compared to $5.44 billion at this time last year. AWS revenue grew 41% in the first quarter – at this time last year, that number was 49%.
ParkMyCloud supports Alibaba Cloud and AWS, and with that, let us focus on pricing and cost savings – our forte. In this blog, we dive a bit into the pricing of Alibaba Elastic Compute Service (ECS), compare it with that of the AWS EC2 service and whether Alibaba Cloud computing can offer better value than AWS.
Alibaba ECS vs AWS EC2
Elastic Compute Service (ECS) and Elastic Cloud Compute (EC2), respectively, are the standard compute services offered by Alibaba Cloud and AWS.
Both cloud computing services provide the same core features:
- The ability to choose from dozens of instance types.
- Support for virtual as well as bare-metal servers.
- Compatibility with a variety of Windows and Linux-based operating systems.
- The ability to create custom images.
The major differences between Alibaba Cloud ECS and AWS EC2 are that Alibaba Cloud provides a wider range of instance families and that AWS offers more regions globally.
Alibaba vs Aliyun
Finding actual pricing for comparison purposes can be a bit complicated, as the prices are listed in a couple of different places and do not quite exactly match up since pricing varies between different instance types, and no instances from the two companies are identical. If one searches for Alibaba pricing, one ends up here, which I am going to call the “Alibaba Cloud” site. However, when you actually get an account and want to purchase an instance, you can up here or here, both of which I will call the “Aliyun” site. [Note that you may not be able to see the Aliyun sites without signing up for an account and actually logging-in.]
Aliyun (literally translated “Ali Cloud”) was the original name of the company, and the name was changed to Alibaba Cloud in July 2017. Unsurprisingly, the Aliyun name has stuck around on the actual operational guts of the company, reflecting that it is probably hard-coded all over the place, both internally and externally with customers. (Supernor’s 3rd Conjecture: Engineering can never keep up with Marketing.)
Both sites show that like the other major cloud providers, Alibaba’s pricing model includes a Pay-As-You-Go (PAYG) offering, with per-second billing. Note, however, that in order to save money on stopped instances, one must specifically enable a “No fees for stopped instances” feature. Luckily, this is a global one-time setting for instances operating under all Pay-As-You-Go VPC instances, and you can set it and forget it. Unlike AWS, this feature is not available for any instances with local disks (this and other aspects of the description lead me to believe that Alibaba instances tend to be “sticky” to the underlying hardware instance). On AWS, local disks are described as ephemeral and are simply deallocated when they are not in use. Like AWS, Alibaba Cloud system/data disks continue to accrue costs even when an instance is stopped.
Both sites also show that Alibaba also has a one-month prepaid Subscription model. Based on a review of the pricing listed for the us-east-1 region on the Alibaba Cloud site, the monthly subscription discount reflects a substantial 30-60% discount compared to the cost of a PAYG instance that is left up for a full month. For a non-production environment that may only need to be up during normal business hours (say, 9 hours per day, weekdays only), one can easily see that it may be more cost-effective to go with the PAYG pricing, and use the ParkMyCloud service to shut the instances down during off-hours, saving 73%.
But this is where the similarities between the sites end. For actual pricing, instance availability, and even the actual instance types, one really needs to dive into a live Alibaba account. In particular, if PAYG is your preference, note that the Alibaba public site appears to have PAYG pricing listed for all of their available instance types, which is not consistent with what I found in the actual purchasing console.
Low-End Instance Types – “Entry Level” and “Basic”
The Alibaba Cloud site breaks down the instance types into “Entry Level” and “Enterprise”, listing numerous instance types under both categories. All of the Entry Level instance types are described as “Shared Performance”, which appears to mean the underlying hardware resources are shared amongst multiple instances in a potentially unpredictable way, or as described by Alibaba: “Their computing performance may be unstable, but the cost is relatively low” – an entertaining description to say the least. I did find these instance types on the internal purchasing site, but did not delve any further with them, as they do not offer a point of reference for our AWS vs. Alibaba Cloud pricing comparison. They may be an interesting path for additional investigation for non-production instance types where unstable computing performance may be OK in exchange for a lower price.
That said…after logging in to the Alibaba management console, reaching the Aliyun side of the website, there is no mention of Entry Level vs Enterprise. Instead, we see the top-level options of “Basic Purchase” vs “Advanced Purchase”. Under Basic Purchase, there are four “t5” instance types. The t5 types appear to directly correspond to the first four AWS t2 instance types, in terms of building up CPU credits.
These four instance types do not appear to support the PAYG pricing model. Pricing is only offered on a monthly subscription basis. A 1-year purchase plan is also offered, but the math shows this is just the monthly price x12. It is important to note that the Aliyun site itself has issues, as it lists the t5 instance types in all of the Alibaba regions, but I was unable to purchase any of them in the us-east-1 region – “The configuration for the instance you are creating is currently not supported in this zone.” (A purchase in us-west-1, slightly more expensive, was fine).
The following shows a price comparison for Alibaba vs AWS for “t” instance prices in a number of regions. The AWS prices reflect the hourly PAYG pricing, multiplied by an average 730 hour month. I was not able to get pricing for any AWS China region, so the Alibaba pricing is provided for reference.
While the AWS prices are higher, the AWS instances are PAYG, and thus could be stopped when not being used, common for t2 instances used in a dev-test environment, and potentially saving over 73%. One can easily see that this kind of savings is needed to compete with the comparatively low Alibaba prices. I do have to wonder what is up with that Windows pricing in China….does Microsoft know about this??
Aliyun “Advanced Purchase”
Looking at the “Advanced” side of the Aliyun purchasing site, we get a lot more options, including Pay-As-You-Go instances. To keep the comparison simple, I am going to limit the scope here to a couple of instance types, trying to compare a couple m5 and i3 instances with their Alibaba equivalents. I will list PAYG pricing where offered.
In this table, the listed monthly AWS prices reflect the hourly pay-as-you-go price, multiplied by an average 730 hour month.
The italicized/grey numbers under Alibaba indicate PAYG numbers that had to be pulled from the public-facing website, as the instance type was not available for PAYG purchase on the internal site. From a review of the various options on the internal Aliyun site, it appears the PAYG option is not actually offered for very many standalone instance types on Alibaba…
The main reason I pulled in the PAYG prices from the second source was for auto scaling, which is normally charged at PAYG prices. In Alibaba, “all ECS instances that Auto Scaling automatically creates, or manually adds to a scaling group will be charged according to their instance types. Note that you will still be charged for Pay-As-You-Go instances even after you stop them.” It is possible, however, to manually add subscription-based instances to an auto scaling group, and configure them to be not removed when the group scales-down.
In general, the full price of the AWS Linux instances over a month is 22-35% higher than of an Alibaba 1-month subscription. A full price AWS Windows instance over a month is 9-25% higher than that of an Alibaba subscription. (And once again, it appears Windows licensing fees are not a factor in China.)
When it comes to Alibaba Cloud pricing vs AWS, Alibaba Cloud is trying to attract business and expand their global footprint by offering special promotions typically consisting of free trials, specially priced starter packages, and time-limited discounts on premium services. In many cases, taking advantage of these promotions could be useful in order to save money, but so is AWS.
AWS Introduces Savings Plans for EC2
Amazon also has their fair share of money-saving offerings as well. AWS announced the release of AWS Savings Plans – a new system for getting a discount on committed usage for EC2.
There are two kinds of Savings Plan:
- Compute Savings Plan – Apply to EC2 usage regardless of instance family, size, AZ, region, OS, or tenancy. For any given instance configuration, pricing is similar (if not identical) to an equivalent Convertible RI, giving up to a 66% discount.
- EC2 Instance Savings Plan – Specific to EC2 instances within a family in a specific region, but regardless of size, OS, or tenancy. For any given instance configuration, pricing is similar to an equivalent Standard RI, giving up to a 72% discount in exchange for the reduced flexibility.
AWS Reserved Instance new queuing option
You can now purchase reserved instances that, rather than going into effect immediately, are scheduled for future purchase.
Now, when planned correctly, you can avoid lapsing on Reserved Instance coverage for your workloads by scheduling a new reservation purchase to go into effect as soon as the previous one expires. The furthest in advance you can schedule a purchase is three years, which is also the longest RI term available.
However, AWS RI purchases have few limitations, they can be queued for regional Reserved Instances, but not zonal Reserved Instances. Regional RIs are the broader option as they cover any availability zone in a region, while zonal RIs are for a specific availability zone and actually reserve capacity as well.
AWS vs Alibaba Cloud Pricing: Alibaba is cheaper, but…
Alibaba definitely comes out as less expensive in this AWS vs Alibaba cloud pricing comparison – the one-month subscription has a definite impact. However, for longer-lived instances, AWS Reserved Instances will certainly be less expensive, running about 40-75% less expensive than AWS PAYG, and thus less than some if not all of the Alibaba monthly subscriptions. AWS RI’s are also more easily applicable to auto scaling groups than a monthly subscription instance.
For non-production instances that can be shut down when not in use, PAYG is less expensive for both cloud providers, where ParkMyCloud can help you schedule the downtime. The difficulty with Alibaba will actually be finding instances types that can actually be purchased with the PAYG option.
There have been about 1.3 zillion blogs posted this week recapping the announcements from AWS re:invent 2019, and of course we have our own spin on the topic. Looking primarily at cost optimization and cost visibility, there were a few cool new features posted. None of them were quite as awesome as the new Savings Plan announcement last month, but they are still worthy of note.
AWS Compute Optimizer
With AWS jumping feet-first into machine learning, it is no surprise that they turned it loose on instance rightsizing.
The Compute Optimizer is a standalone service in AWS, falling under the Management & Governance heading (yes, it is buried in the gigantic AWS menu). It offers rightsizing for the M, C, R, T, and X instance families and Auto Scaling groups of a fixed size (with the same values for desired/min/max capacity). To use the service you must first “opt-in” in each of your AWS accounts. Navigate to AWS Cost Optimizer and click the “Get Started” button.
Interestingly, they only promise a cost reduction “up to 25%”. This is probably a realistic yet humble claim, given that the savings for a single downsize in the same instance family is typically 50%. That said, the only way to get that 50% cost reduction is to install the AWS CloudWatch Agent on your instances and configure it to send memory metrics to CloudWatch. If you are not running the agent…then no memory metrics. Like ParkMyCloud rightsizing, in the absence of memory metrics, the AWS Compute Optimizer can only make cross-family recommendations that change only the CPU or network configuration, leaving memory constant. Hence – a potential 25% cost reduction.
The best part? It is free! All in all, this feature looks an awful lot like ParkMyCloud rightsizing recommendations, though I believe we add a bit more value by making our recommendations a bit more prominent in our Console – not mixed-in with 100+ other menu items… The jury is still out on the quality of the recommendations; watch for another blog soon with a deeper dive.
Amazon EC2 Inf1 Instance Family
Every time you congratulate yourself on how much you have been able to save on your cloud costs, AWS comes up with a new way to help you spend that money you had “left over.” In this case, AWS has created a custom chip, the “Inferentia”, purposely designed to optimize machine learning inference applications.
Inference applications essentially take a machine learning model that has already been trained via some deep-learning framework like TensorFlow, and uses that model to make predictions based on new data. Examples of such applications include fraud detection and image or speech recognition.
The Inferentia is combined in the new Inf1 family with Intel® Xeon® CPUs to make a blazingly fast machine for this special-purpose processing. This higher processing speed allows you to do more work in less time than you could do with the previous instance type used for inferencing applications, the EC2 G4 family. The G4 is built around Graphics Processing Unit (GPU) chips, so it is pretty easy to see that a purpose-built machine learning chip can be made a lot faster. AWS claims that the Inf1 family will have a “40% lower cost per inference than Amazon EC2 G4 instances.” This is a huge immediate savings, with only the work of having to recompile your trained model using AWS Neuron, which will optimize it for use with the Inferentia chip.
Next Generation Graviton2 Instances
The final cool cost-savings item is another new instance type that fits into the more commonly used M, C, and R instances families. These new instance types are built around another custom AWS chip (watch out Intel and AMD…) the Graviton2. The Graviton chips, in general, are built around the ARM processor design, more commonly found in smartphones and the like. Graviton was first released last year on the A1 instance family and honestly, we have not seen too many of them pass through the ParkMyCloud system. Since the Graviton2 is built to support M, C, and R, I think we are much more likely to see widespread use.
Looking at how they perform relative to the current M5 family, AWS described the following performance improvements:
- HTTPS load balancing with Nginx: +24%
- Memcached: +43% performance, at lower latency
- X.264 video encoding: +26%
- EDA simulation with Cadence Xcellium: +54%
Overall, the new instances offer “40% better price performance over comparable current generation instances.”
The new instance types will be the M6g and M6gd (“g”=Graviton, “d”=NVMe local storage), the C6g and C6gd, and the R6g and R6gd. The new family is still in Preview mode, so pricing is not yet posted, but AWS is claiming a net “20% lower cost and up to 40% higher performance over Amazon EC2 M5 instances, based on internal testing of workloads.” We will definitely be trying these new instance types when they release in 2020!
All in all, there were no real HUGE announcements that would impact your costs, but baby steps are OK too!
AWS recently announced the release of AWS Savings Plans – a new system for getting a discount on committed usage for EC2 and Fargate. The previous systems of Reserved Instances (RIs) are still around, and in some cases may still be the right way to go. That said, based on our research, if your virtual machines do not need to be running 24/7, they are still not as effective at cost savings as scheduling your systems to be shut down when not in use.
I am not keen on the “Savings Plan” name, as it sounds to me like you are building up money in the bank, but really it is a capacity purchase plan to save you money.
The key feature of the Savings Plans is that you are committing to spend a certain amount of money per hour for EC2 and/or Fargate use. The hourly commitment must be greater than or equal to $0.001. If you make the commitment, AWS will give you a discount on whatever virtual machine to which they apply the expense.
There are two kinds of Savings Plan:
- Compute Savings Plan – Apply to EC2 or Fargate usage regardless of instance family, size, AZ, region, OS, or tenancy. For any given instance configuration, pricing is similar (if not identical) to an equivalent Convertible RI, giving up to a 66% discount.
- EC2 Instance Savings Plan – Specific to EC2 instances within a family in a specific region, but regardless of size, OS, or tenancy. For any given instance configuration, pricing is similar to an equivalent Standard RI, giving up to a 72% discount in exchange for the reduced flexibility.
- Both types require a commitment for either 1 year or 3 years.
- They cannot be canceled, refunded, or exchanged
- You can buy as many as you like for as much of a commitment as you like. Ten plans at $1/hour each, or one plan at $10/hour, or any other combination for as little or as much as you like.
Savings Plans vs RIs
AWS has a table that compares Savings Plans vs RIs here, but either they were trying to make the Savings Plans look a lot better than RIs, or someone forgot to check a few boxes. (I mean wouldn’t you say that RIs give you a “lower price in exchange for a monetary commitment”? I sure would.) Here is my take on that table:
So obviously there are feature differences. The key thing here is that the Savings Plans give the same amount of savings as a somewhat equivalent RI, but with a LOT more flexibility in terms of what instances can get the discount.
The customers get in, but they can’t get out…
If you change your mind about buying an RI, you can sell it on the AWS RI Marketplace. You will not get back the full value of what you owe, but at least there is an option. With Savings Plans there is (so far) no way to back out. The AWS Service Terms (section 4.5) states “Savings Plans are noncancellable.”
Why might you want to get rid of an RI?
- Maybe you bought a non-flexible RI, switched your needed instance size/family, and the RI is no longer useful.
- Maybe…you just cannot afford it anymore.
For the first issue, Savings Plans are a lot more flexible, allowing exchanges across sizes, families, and regions, depending on what kind of Savings Plan you buy.
For the second issue…Savings Plans provide no flexibility. Do you have any workloads elsewhere you can bring in to use the commitment – maybe some containers that can be moved to an EC2, or maybe an RDS that you can turn in to a self-managed database? Or maybe you can just use the unused capacity to mine a couple pennies-worth of Bitcoin…
At the end of the day, you need to weigh the discount vs. your confidence in the stability of your workloads and your funding.
(I personally just picked up a $0.001 per hour plan for $8.76 for the year and feel confident that I can meet that obligation.)
Savings Plans vs Scheduling
Just like RIs, savings plans are intended to be applied against resources that are up 7/24/365 (or 7/24/1095 for 3-year purchases). For resources that only need to be when someone is using them, like dev, test, staging, build, and similar system, it is likely better to schedule them.
To demonstrate this, here is a comparison for a t2.medium in us-east-1 running Linux in shared tenancy. The t2.medium, while a small and slightly older instance type, is the most commonly used instance type we see across all of our ParkMyCloud customers, with 3x the number of deployments than the next most common type.
In the graphs below, the slanting green line represents the monthly cost of an instance based on the number of hours it is running per day on weekdays only (so it already accounts for pulling out the cost of weekends). For example, if this virtual machine was running 12 hours per day on weekdays (not a very aggressive schedule) it will cost $144.77 per year. Compared to the baseline pay-as-you-go price of $406.46 per year, this is a savings of 64%.
The following graph shows a comparison of the annual cost of this t2.medium instance when bought with:
- Either a Compute Savings Plan or an EC2 Instance Savings plan
- For a 1-year vs 3-year term
- With no upfront cost (so you are charged monthly)
This graph is telling us that compared to the most aggressive EC2 Instance Savings Plan bought at a 3-year commitment, scheduling is still less expensive. In fact, we need to get up to about 14 hours per weekday before the Savings Plan saves any money.
At the top end, the instance could run all day on weekdays, 5/24, and just match the 1-year Compute Savings Plan savings. (That number matches so closely I truly wonder if this is how they came up with the base savings for the RIs and Savings Plan.)
In this next graph, we change the Savings Plans to be purchased all upfront, which gives a bit more savings but still cannot match the savings of the 5-day/12-hour schedule.
Note that if this WERE a system we want to keep up 7/24, we would have to create a savings plan that covers the hourly cost of the instance. For example, the base price of the t2.medium in our example is $0.0464 per hour. Under the savings plans, we get a discount on this, and if we wanted to be sure at least this instance was covered, we would need to buy a savings plans (with no upfront cost) with one of the following rates
Again note that none of these reach the 64% savings of a basic 5-day/12-hour schedule.
How are Savings Plan Applied to my Bill?
The example above shows what you would pay for that t2.medium if it was the only instance in your account. If you have multiple instances or even multiple accounts within an AWS Organization, the Savings Plan is applied in a prioritized way, trying to “use” up the less flexible savings methods before getting to the most flexible:
- First, any RIs are applied to your bill – they are less flexible, so you want them “used up” before Savings Plans are applied
- Then, EC2 Instance Savings Plans are applied next
- And lastly, Compute Savings Plans are applied
Within either of the Savings Plan types:
- The plan is first applied to the AWS Account in which the Plan was purchased
- And the plan is applied to the resource type/region/etc with the highest potential discount compared to On-Demand
- After that is shared with the rest of the accounts in your AWS Organization
Why did AWS do this?
AWS is philosophically all about the customer…and there is NO question that this new feature is great for the customers. Looking beyond that: anytime a vendor can lock you in to a long-term contract it makes things easier for the vendor in a lot of ways. For AWS, committed use means a more predictable balance sheet and more predictable data center utilization. RIs gave both of these, but they were about as complicated as filling out your taxes, and could be as restrictive as a tight pair of underwear. I am betting AWS is shooting for increased levels of commitment that help the long term bottom-line. The downsides for them are the potentially reduced revenue and the reduced datacenter usage predictability at the region level (since the Compute Savings Plans are cross-region). That said…those long term commitments look really good to the stock market, and a reduction in revenue volatility cannot be bad either.
What do I do now?
At this point you should run (not walk) over to the Savings Plan section of the Billing Dashboard in AWS and see what is recommended in there – it is certainly worth the look. If you were hesitant about buying an RI due to the region or size restrictions, it may be time to reconsider. Note that you do not have to have full coverage of your spend with Savings Plans, but if you have a consistent level of usage 7/24/365, you should cover at least SOME of it with a Compute Savings Plan… And if your usage is not consistent…then consider scheduling your resources with ParkMyCloud…which can also save over 65%.
AWS Reserved Instances vs. Scheduling On-Demand Instances
We are frequently asked about the impact of instance scheduling on AWS Reserved Instances for EC2 and RDS. Scheduling On Demand instances as well as Reserved Instances (RIs) are both useful techniques for cost optimization, but they are polar opposites in terms of goals. RIs are all about getting a better price for RDS or EC2 instances that are running all the time. Scheduling is all about reducing costs by turning off instances when they are not in use.
How should a customer choose between buying an AWS Reserved Instance and applying scheduling to the instance? This is an important question, as usually the savings from scheduling can exceed the savings available from a Reserved Instance. Before we dive into that though, let’s get familiar with some critical RI nuances that can help you make the decision…and make the most of your RIs.
Note: versions of this article were originally published in 2015 and 2017. It has been completely re-analyzed, rewritten, and updated!
Where are my Reserved Instances?
First of all, it’s worth clarifying that there is no functional difference between Amazon Reserved Instances and On Demand. It’s all in the billing. <rant> I wish I had a dollar for each time someone asked me (while looking at the AWS Console) “Which ones of these are the Reserved Instances?” </rant>. You cannot be sure which instances are using a reservation until you get your bill. You can make a good guess, based on what account you are looking at and what reservations you have purchased, but if you are using instance size flexibility with region-based RIs, it would be a pure guess. An instance reservation is not like a hotel reservation, where you end up with a specific room for the duration of your stay. That would be a Dedicated Host Reservation – a whole other beast with its own set of limitations.
3600 Seconds per Hour
Yep – there are 3600 seconds in an hour. I did the math. You may ask: why does that matter? It matters because of two things: per-second billing for EC2, and the fact that AWS RIs are billed in one hour chunks. More precisely, RIs are billed in one “clock-hour” chunks, where a clock-hour starts on the hour and up to the final second of the hour – like 04:00:00 to 04:59:59.
If you are running a number of instances that use per-second billing, and they go up or down during a (clock) hour, then multiple instances may be able to leverage the Reserved Instance pricing.
As paraphrased shamelessly from here, if you purchase one m5.large Reserved Instance and run four matching m5.large instances for 15 minutes each (900 seconds each) in the same hour, the total running time is one hour, which consumes the entire Reserved Instance allocation. This usage pattern is illustrated below.
That said, if multiple matching instances are running at the same time, the Reserved Instance billing benefit is applied to all of the instances, up to a maximum of 3600 seconds in a clock-hour. On-demand rates are used for any usage after that. This is illustrated below.
By the way, remember that per-second billing only applies to instances running an open-license OS like Amazon Linux or Ubuntu.
If your instance is running any flavor of Windows, Red Hat Linux, or any pay-by-the-hour image from the AWS Marketplace, that instance is billed by the hour, and any matching reservation will be consumed by the hour, even if the instance is not. Any overlapping instances will each need their own RI to get RI pricing.
Elastic Reserved Instances
Wait…what? Isn’t that kind-of an oxymoron? Elastic means it should be able to change with my usage…and aren’t reservations are a commitment to usage? Well, maybe…but some RIs are definitely more elastic (or at least more flexible) than others. Regional Reserved Instances can leverage “instance size flexibility.” This is the ability of a reservation to apply up or down to other instance types in the same family. Regional RIs are applied in priority order from the smallest instance in the region to the largest instance in the region. This makes these AWS reservations somewhat elastic in that if you buy reservations for smaller instance types than you normally use, then those reservations are more likely to be consumed, even if you rightsize an instance or replace one server with another of a different size.
The math of how an RI of one instance type can be applied to another instance type is governed by a “normalization factor”, described here. Putting the table in that link another way:
Some examples of how we can use this table:
- To fully cover one t3.medium with RIs, you would buy eight t3.nano RIs. If you stop using the t3.medium instance, the same eight t3.nano RIs could also be used to cover:
- Two t3.small instances
- One t3.small and two t3.micro
- Half of a t3.large
- To fully cover an m5.12xlarge would require 24 m5.large RIs. Those 24 m5.large RIs could also be used for:
- One m5.8xlarge and one m5.4xlarge
- One m5.8xlarge and two m5.2xlarge
- One m5.8xlarge, one m5.2xlarge, one m5.xlarge, and two m5.large
- Three quarters of an m5.16xlarge
The lesson here is that it is easiest to manage reserved instances if you buy the smallest instance size available within an instance family. In fact, as shown below this is the exact type of recommendation you are likely to receive from the AWS Cost Explorer.
So why do we mention AWS flexible reserved instances with relation to schedules? Recall that the allocation of RIs to instances is done by AWS each second within a clock-hour. Each reservation is consumed by instances in its family until all 3600 seconds have been allocated. You do not necessarily have to keep an instance up for the whole hour to use the reservation. You can still consume the whole RI, even if you are starting and stopping instances by schedule or within an auto-scaling group over the course of an hour.
Something so cool cannot be without limitations and gotchas. Here are a few we’ve noticed:
- Instance size flexibility is ONLY available for certain instance platforms.
- For AWS EC2 reserved instances, only open-license linux instances support flexible RIs. It is NOT APPLICABLE to any flavor of Windows or other licensed software and OS.
- For AWS RDS reserved instances, instance size flexibility is available for MySQL, MariaDB, PostgreSQL, and Amazon Aurora database engines as well as the “Bring your own license” (BYOL) edition of the Oracle. [That said: it is not clear as of this writing if the recent RDS per-second billing change is also applied to RDS instance size flexibility. The billing pages still state that RDS RIs are allocated to instances on a per-hour basis.]
- Flexibility is only available within the same instance family
- Flexibility is only available for Regional RIs
How does AWS Reserved Instance Pricing Work?
As usual, there are a number of different decisions that need to be made before this question can be answered. AWS RIs are available with two different levels of flexibility and several different terms of purchase.
In terms of flexibility, RIs can either be purchased as “standard” or “convertible.”
- AWS Convertible Reserved Instances – allow changing the assigned availability zone, instance size/families, operating system, tenancy, and networking type. There is no fee for changing the reservation attributes, but you can only convert the RI into a new set of attributes with equal or greater cost than the original. If the cost is greater, you will have to pay the difference.
- Standard Reserved Instances – once purchased, cannot be changed. They can be sold on the AWS Reserved Instance Marketplace.
Both AWS Convertible RIs and Standard RIs offer:
- Regional vs. Availability Zone assignment scope. Regional scope offers a lot more flexibility for where your instances can reside while still leveraging RI pricing. Availability Zone scope has the bonus of a guaranteed capacity reservation (though, like RI pricing, capacity reservation cannot be assigned to a specific instance).
- For open-license Linux, instance size flexibility, as described earlier.
There are a few options for terms of purchase that affect AWS RI pricing. RIs can be purchased for 1 or 3-year terms, and with no upfront, partial upfront, or all upfront payment available for each.
To get a better idea of the difference in the amount you’ll end up paying with each purchasing option, let’s take a look at some pricing scenarios for the general purpose m5.large instance in us-east-1 (US Virginia). When you look at these on the AWS RI price list, they are usually grouped by year terms and standard vs. convertible. Since you can already see it that way on AWS, and because time is the greatest unknown, I am going to give a bit of a different view, keeping the years together on the same comparison chart.
One-Year Term RIs
To benefit from the discount provided by a reservation while keeping contract terms to a minimum, look at the 1-year RIs:
You can see from this that within the Convertible vs. Standard tiers, there is not a lot of difference between the upfront cost payment options. Your upfront cash decision here can depend on your accounting process, perhaps accounting for the difference between CapEx and OpEx (Capital Expenditures and Operating Expenditures), or based on your current and prospective cash flow. The pricing between the Convertible vs. Standard options are so similar as to make you seriously consider if the benefit of flexibility in the AWS Reserved Instances convertible option outweighs the minor cost savings.
Three-Year Term RIs
If you are confident of your three-year usage plans, look at the 3-year RIs, shown here as the cost per year:
There is a bit more visible progression between the options here, and the cost savings difference between the 1-year graph and the 3-year graph are clearly seen. Still, the 1-year vs. 3-year decision may again come down to accounting practices.
Note that these graphs are just for one instance type in one location in about the middle of the overall performance pack. They do not express a true profile of all instance types/families in all locations, and you should do your own comparison before buying any RIs. That said….
AWS Reserved Instances vs. On Demand
FINALLY getting into the core question. Is it better to shut an instance down or buy a reserved instance? Let’s do the math and compare AWS On Demand vs. Reserved, with on/off scheduling applied to the On Demand option. Given all the different pricing options it can be a bit difficult to decide how to compare these. Let’s go with the no-upfront RI options and see where the RIs break even with scheduling.
Since the hours might be judge at this scale, here are the break-even hours in a table (hours rounded-up):
So what do these hours mean?
By way of comparison, here are a few common schedules and their hours in ParkMyCloud (with weeks converted to months on the basis of 52 weeks/12 months = 4.33 weeks/month):
- Running 8 AM – 5 PM, Weekdays = 195 hours/month (nominally a 73% savings)
- Running 7 AM – 7 PM, Weekdays = 260 hours/month (64% savings)
- Running 5 AM – 9 PM, Weekdays = 347 hours/month (53% savings)
Of the above, 7 AM – 7 PM Weekdays is the second most popular schedule in our entire system, and at 260 hours, easily is more cost-effective than the least expensive RI.
In that final schedule above, you need to run 16 hours per day, Monday-Friday before a 3-year RI starts to look like a better deal. If you have other matching instances on another schedule in that same region/AZ, you could then buy the RI anyway, and save even more money.
Scheduled Reserved Instances
“But wait!” you say… “There are these things called Scheduled Reserved Instances – would they not offer me the best of both worlds?” Maybe, but note that to support Scheduled RIs, AWS has essentially set aside hardware for use as Scheduled RIs – this is a finite set of dedicated resources. On paper, a Scheduled RI can definitely save you a bit more money, but let’s look at the limitations.
- Instances intended to consume a Scheduled Reservation must be launched during their scheduled time periods using a launch configuration that matches the reservation. Let’s break that down further:
- They are launched with “a launch configuration” and terminated by EC2 three minutes before the end of the schedule window. You cannot stop/start/suspend them, and so they cannot maintain state internally unless you do some EBS volume tweaks after launch.
- You cannot launch a scheduled RI outside of its scheduled window. If you try, that instance will not use the Reservation, as you would not expect it to magically jump over onto the dedicated hardware.
- Only three regions and only a few older generation instances families are supported.
- Limited quantities are available (as of this writing, a search for an m4.large in us-east-1 with a Monday-Friday 7 AM – 7 PM scheduled listed only two reservations being available).
- There is a minimum reservation size of 1,200 hours/year, 100 hours/month, 24 hours/week, or 4 hours/day. (So you are not going to be able to use a Scheduled RI to run your database backup server for just a couple hours on Sunday mornings [I just tried…dang it.])
- Scheduled RI purchases cannot be cancelled, modified or sold on the RI Marketplace. No buyer’s remorse allowed here…
- And finally… AWS describes the cost savings of Scheduled RIs over on-demand as being in the 5-10% range. Again – you have to be really sure this workload is going to be needed on this schedule, and the workload is fully utilized. If you find this server is ever idle or under-utilized, you may have lost an opportunity to save 50% or more by simply scheduling it with ParkMyCloud and then rightsizing it.
When launched in 2016, Scheduled RIs were only available in “US East (N. Virginia), US West (Oregon), and Europe (Ireland) regions, with support for the C3, C4, M4, and R3 instance types.” Given that this has not changed, I am guessing the feature has not taken off as AWS had hoped. That said, if you have something that needs to run for 4 hours per day, daily, and can use an older instance family in a supported region…go for it! This may also be a good place to leverage AWS Spot instance types.
Should You Buy Reserved Instances?
Deciding between different RI options starts with knowledge of how stable your usage is going to be in the coming years. Most organizations have a good understanding of at least a baseline level of usage, and some actually construct portfolios of reserved instance purchases, much like how you might balance a stock portfolio. For example, 3-year Standard Reserved Instances are for those applications that are stable and unlikely to change. Balance those with some 3-year Convertible Reserved Instances to help save money in the longer term but allow for some flexibility in use. Use 1-year RIs to account for shorter-term usage volatility, with again maybe a balance between Standard and Convertible where needed for those loads that might shift over the short term.
Just like with stocks, such portfolios require active management, awareness of what is being used and what is coming in both the short and long term. Companies with these types of RI management typically have dedicated cloud cost management staff, though RI management itself does not need to be a full-time job. One of our larger customers tells us they do a quarterly review of their RI portfolio, starting with using ParkMyCloud to schedule any instances they can, and then rebalancing their RIs and investing in more as needed. This is a best practice for any size company.
For production workloads that run 24×7 long-term, you REALLY should be buying RIs. For production workloads with an unknown future, or for non-production workloads (dev, test, QA, training, etc.), the answer is “probably not”. Be careful though, as often RIs are seen as a quick fix to save 30-50% on the cloud bill, but then other ways are found to save even more, and you end up with underutilized RIs. Before you buy a Standard RI, make sure you have evaluated your resources for underutilization and overprovisioning. Also consider the following cost-saving options:
- Choose smaller instance sizes – each size down can save 50%. Use ParkMyCloud Rightsizing to first make sure your resources are appropriately sized for their load before committing to an RI purchase.
- For open-license Linux instances, buy RIs for smaller instance types in the same instance family in order to leverage instance size flexibility (allows the RIs to more easily be allocated against other resources, even if they are running for short periods of time)
- Use Spot Instances and Autoscaling when appropriate for short-term/volatile workloads.
- Schedule on/off times for on-demand instances. Use ParkMyCloud SmartParking to automatically create schedules for when the resources are not being used, while still giving your staff the flexibility to easily restart them if needed outside the normal hours. Even a generous 7 AM – 7 PM workday schedule will immediately save 65%!
The worst thing one can do is…nothing. Set aside some time each quarter to review EC2 and RDS instance utilization. Rightsize and schedule what you can – try a free trial of ParkMyCloud to see how we can help you with that. After that, anything left running 24×7 is a candidate for an RI. If you are risk-averse or time-crunched, stick with 1-year convertible RIs to save at least 36% on at least some of your resources. Then take all that money you saved and put it into other things that will bring greater value to your business.
Earlier this week, AWS announced the launch of AWS resource optimization recommendations within their cost management portal. AWS claims that this will “identify opportunities for cost efficiency and act on them by terminating idle instances and rightsizing under-used instances.” Here’s what that actually means, and what functionality AWS still does not provide that users need in order to automate cost control.
AWS Recommendations Overview
AWS Recommendations are an enhancement to the existing cost optimization functionality covered by AWS Cost Explorer and AWS Trusted Advisor. Cost Explorer allows users to examine usage patterns over time. Trusted Advisor alerts users about resources with low utilization. These new recommendations actually suggest instances that may be a better fit.
AWS Resource Optimization provides two types of recommendations for EC2 instances:
- Terminate idle instances
- Rightsize underutilized instances
These recommendations are generated based on 14 days of usage data. It considers “idle” instances to be those with lower than 1% peak CPU utilization, and “underutilized” instances to be those with maximum CPU utilization between 1% and 40%.
While any native functionality to control costs is certainly an improvement, users often express that they wish AWS would just have less complex billing in the first place.
AWS Resource Optimization Tool vs. ParkMyCloud
ParkMyCloud offers cloud cost optimization through RightSizing for AWS, as well as Azure and Google Cloud, in addition to our automated scheduling to shut down resources when they are idle. Note that AWS’s new functionality does not include on/off schedule recommendations.
Here’s how the new AWS resource optimization tool stacks up against ParkMyCloud.
Types of Recommendations Generated
The AWS Resource Optimization tool will provide up to three recommendations for size changes within the same instance family, with the most conservative recommendation listed as the primary recommendation. Putting it another way, the top recommendation will be one size down from the current instance, the second recommendation will be two sizes down, etc. ParkMyCloud recommends the optimal instance type and size for the workload, regardless of the existing instance’s configuration. This includes instance modernization recommendations, which AWS does not offer.
The AWS tool generates recommendations for EC2 instances only, while ParkMyCloud recommends scheduling and RightSizing recommendations for EC2 and RDS. AWS also does not support GPU-based instances in its recommendations, while ParkMyCloud does.
AWS customers must explicitly enable generation of recommendations in the AWS Cost Management tools. In ParkMyCloud, recommendations are generated automatically (with some access limitations based on subscription tier).
ParkMyCloud allows you to manage resources across a multi-cloud environment including AWS, Azure, Google Cloud, and Alibaba Cloud. AWS’s tool, of course, only allows you to manage AWS resources.
When you start to dig in, you’ll notice several limitations of the recommendations provided by AWS. The recommendations are based on utilization data from the last 14 days, a range that is not configurable. ParkMyCloud’s recommendations, on the other hand, can be based on a configurable range of 1-24 weeks of data, configurable by the customer by team, cloud provider, and resource type.
Another important aspect of “optimization” that AWS does not allow the user to configure are the utilization thresholds. AWS assumes that any instance at less than 1% CPU utilization is idle, and assumes any instance between 1-40% CPU utilization is undersized. While these are reasonable rules of thumb, users need the ability to customize such thresholds to best suit their own environment and use cases, and AWS does not allow you to customize these parameters. AWS also assumes an “all or nothing” approach – they recommend that any instance detected as idle simply be terminated. ParkMyCloud does not assume that low utilization means the instance should be terminated, but suggests sizing and/or scheduling solutions with specificity to the utilization patterns. ParkMyCloud allows users to select between Conservative, Balanced, or Aggressive schedule recommendations with customizable thresholds.
AWS also only evaluates “maximum CPU utilization” to determine idle resources. However, for resource schedule recommendations, ParkMyCloud uses both Peak and Average CPU plus network utilization for all instances, and memory utilization for instances with the CloudWatch agent installed. For sizing recommendations, ParkMyCloud uses maximum Average CPU plus memory utilization data if available.
Perhaps the most dangerous aspect of the AWS Recommendation is they will recommend an instance size change based on CPU alone, even if they do not have memory metrics. Without cross-family recommendation, this means each size down typically cuts the memory in half. ParkMyCloud Rightsizing Recommendations do not assume this is OK. In the absence of memory metrics, we make downsizing recommendations that keep memory constant. For a concrete example of this, here is an AWS recommendation to downsize from m5.xlarge to m5.large, cutting both CPU and memory, and resulting in a net savings of $60 per month.
In contrast, here is the ParkMyCloud Rightsizing Recommendation for the same instance:
You can see that while the AWS recommendation can save $60 per month by downsizing from m5.xlarge to m5.large, the top ParkMyCloud recommendation saves a very similar $57.67 by allowing the transition from m5.xlarge to r5a.large, keeping memory constant. While the savings are off by $2.33, this a far less risky transition and probably worth the difference. In both cases, of course, memory data from the CloudWatch Agent would likely result in better recommendations.
As shown in the AWS recommendation above, AWS provides the “RI hours” for the preceding 14 days, giving better visibility into the impact of resizing on your reserved instance usage, and uses this data for the cost and savings calculations. ParkMyCloud does not yet provide correlation of the size to RI usage, though that is planned for a future release. That said, the AWS documentation also states “Rightsizing recommendations don’t capture second-order effects of rightsizing, such as the resulting RI hour’s availability and how they will apply to other instances. Potential savings based on reallocation of the RI hours aren’t included in the calculation.” So the RI visibility on the AWS side has minimal impact on the quality of their recommendations.
If the user is viewing the AWS Recommendation from within the same account as the target EC2 instance, a “Go to the Amazon EC2 Console” button appears on the recommendation details, but it leads to the EC2 console for whatever your last-used region was, and without an automatic filter for the specific instance ID. This means you need to do your own navigation to the right region (perhaps also requiring a new console login if the recommendation is for a different account in the Organization), and then find the instance to see the details. ParkMyCloud provides better ease-of-use in that you can jump directly from the recommendation into the instance details, regardless of your AWS Organization account structure. ParkMyCloud: 1 click. AWS: At least five, plus copy/paste of the instance ID and plus possibly a login.
ParkMyCloud also shows utilization data for the recommendation below the recommendation text, giving excellent context. AWS again requires navigation the right account, EC2 and then region, or to CloudWatch and the right metrics using the instance ID.
AWS Resource Optimization also ignores instances that have not been run for the past three days. ParkMyCloud takes this lack of utilization into consideration and does not discard these instances from recommendations.
AWS regenerates recommendations every 24 hours. ParkMyCloud regenerates recommendations based on the calculation window set by the customer.
Automation & Ease of Use
While AWS’s new recommendations are generated automatically, they all must be applied manually. ParkMyCloud allows users to accept and apply scheduling recommendations automatically, via a Policy Engine based on resource tagging and other criteria. RightSizing changes can be “applied now”, or scheduled to occur in the future, such as during a designated maintenance window.
There is also the question of visibility and access across team members. In AWS, users will need access to billing, which most users will not have. In ParkMyCloud, Team Leads have access to view and execute recommendations for resources assigned to their respective teams. Additionally, recommendations can be easily exported, so business units or teams can share and review recommendations before they’re accepted if required by their management process.
AWS’s management console and user interface are often cited as confusing and difficult to use, a trend that has unfortunately carried forward to this feature. On the other hand, ParkMyCloud makes resource management straightforward with a user-friendly UI.
Want to see what ParkMyCloud will recommend for your environment? Try it out with a free trial, which gives you 14-day access to our entire feature set, and you can see what cost optimization recommendations we have for you.