AWS recently announced a feature called ‘Optimize vCPUs for EC2 Instances’. This new feature actually has two parts to it.
- Custom number of CPU cores
- Custom number of Threads per core
With this new feature AWS now allows customers to create EC2 instances with custom number of vCPUs (as per AWS ‘Each vCPU is a hyperthread of an Intel Xeon CPU core, except for T2 instances’, with each core supporting two threads by default).
As you may know, even though cloud providers such as Google Cloud has offered custom machine types for a while, AWS has stayed with a model that offers only pre-determined configurations for EC2 instances. For e.g. one can have m5.4xlarge that has 16 vCPUs or m5.2xlarge that has 8 vCPUs, but nothing in between.
Now customers have the ability to specify the number of CPU cores and the number of threads per core. From a compute performance perspective higher number of threads doesn’t necessarily mean better performance. So, from a perspective of reducing vCPU counts, ability to reduce number of threads is also helpful.
This feature is primarily intended for applications that are memory, storage intensive such as database applications. With the need for higher memory, which always came with higher number of vCPUs, customers didn’t have a choice but to use EC2 instances with higher vCPUs. This feature is a significant change towards offering EC2 instances with custom vCPUs.
‘Optimize vCPUs for EC2 Instances’ is available on the following EC2 families.
Accelerated Computing Instances – p2, p3, g3, f1
Compute Optimized Instances – c4, c5
General Purpose Instances – m5
Memory Optimized Instances – r4, x1, x1e
Storage Optimized Instances – d2, h1, i3
Cost Savings Opportunities
EC2 Cost reduction
None! It is interesting to note that AWS doesn’t offer cost reduction even if one uses reduced vCPUs! Cost of EC2 will remain the same as the price of the default EC2 instance. For e.g. if one creates an m5.4xlarge instance (default 16 vCPUs) with just 2 vCPUs, the cost remains the same as m5.4xlarge instance with 16 vCPUs.
We are hopeful that AWS will change this and offer reduced costs for EC2 instances with reduced vCPU counts.
Third Party Software Licensing Costs
Cost savings come primarily from third party software licensing costs of applications that run on EC2 instances. Oracle is a good example. By reducing vCPU counts, significant cost savings can be achieved on such applications. It is our experience that CPU utilization is typically in the 10%-20% range or less. Using this example vCPU counts can be reduced to 1/5th, resulting in 80% cost savings on CPU based software licensing costs.
Determining if EC2 vCPUs can be optimized
Identifying applications that can use optimized vCPUs can be a challenge. One has to analyze the historical CPU utilization of EC2 instances running such applications. AWS console provides CPU utilization metrics that can be used for this purpose. However, when large number of EC2 instances are involved, such analysis can be time consuming. You may find this open source tool helpful to do EC2 rightsizing analysis.
There are some caveats with this new feature, but we hope it will continue to evolve and AWS will address these in the future.
- Offers no cost reduction for EC2 instances regardless of the number of vCPUs used.
- Works only with new instances. Existing applications/EC2 instances cannot be modified.
- Available only through SDKs, CLIs. No GUI support yet.
While this may sound like an attempt from AWS to help customers reduce third party software licensing costs (such as Oracle), the ability to create EC2 instances with custom number of vCPUs is clearly in the right direction. It does offer a way for customers building new applications to reduce third party software licensing costs significantly. We recommend customers planning new application deployments to seriously consider taking advantage of this feature.
We are hopeful AWS will address the following in the near future:
- Offer cost reduction for EC2 instances with reduced vCPU count
- Allow modification of existing EC2 instances
- Support custom RAM sizing
- A Simple script to implement AWS EC2 TTL (Time to Live)
- A Simple Open Source Tool for EC2 RightSizing Analysis
- Simple AWS EC2 scheduler vs Machine Learning driven EC2 scheduler
- Upgrading to AWS EC2 C5/M5 instances to reduce cost and the caveats
- Using Efficiency Metrics to Monitor Public Cloud Costs
- Machine learning CPU Utilization for AWS EC2 scheduling
FittedCloud is the industry’s leading public cloud resource optimization solution. It features machine learning algorithms that continuously analyze resource utilization and identify opportunities to reduce monthly recurring cloud infrastructure costs. Automated provisioning can adjust cloud resources according to load patterns, user-configured policies and other parameters. FittedCloud’s patented solution reduces costs up to 50% while eliminating complex manual provisioning processes and the risk of configuration errors. For more details, please visit https://www.fittedcloud.com