Microsoft Workloads on AWS

Top 10 recommendations to optimize your Windows Server workloads on AWS

In this blog post, we will share the top 10 recommendations to help you lower your costs and improve performance when running your Windows Server workloads on AWS.

The first step you can take is select the right Amazon Elastic Compute Cloud (Amazon EC2) instance family, size, and licensing option for your workloads. Different instance families offer different levels of CPU, memory, storage, and network performance. Selecting the right options that match your workload requirements will help you avoid over- or under-provisioning resources, which can lead to unnecessary costs and poor performance.
For licensing your Windows Server workloads, we will provide recommendations on choosing the most appropriate licensing model. We offer many ways to gather this information from using AWS Optimization and Licensing Assessment (OLA) to review workloads that are being migrated to AWS or AWS Cost Explorer for existing workloads.
We will also show you how to use AWS services, such as AWS Compute Optimizer, to identify Amazon EC2 rightsizing opportunities. Finally, we will offer modernization recommendations to optimize your investments and meet your performance needs.

Here are the top 10 recommendations to optimize your costs for Windows Server workloads.

1. Choose the appropriate instance family

Amazon EC2 offers a wide selection of instance families optimized to fit different use cases. These include general purpose, compute-optimized, memory-optimized, accelerated computing, and storage-optimized instances. Most customers run their Windows Server workloads on general purpose, compute-optimized, and memory-optimized instances.

You’ll want to consider several factors as you choose the instance family for your workloads. The instance should meet your resource requirements, such as CPU, memory, storage, and networking capacity. When doing so, consider the following factors:

  • The type and characteristics of your applications. For example, you’ll want to choose the compute-optimized instance family for applications with high CPU usage.
  • The expected workload patterns and demand. The general-purpose instance family is ideal for applications that use resources, such as web servers and code repositories, in equal proportions.
  • Consider application performance requirements, cost implications, and your budget constraints. You’ll want to select the instance family that meets your application’s performance requirements. For example, memory-optimized instances deliver fast performance for workloads that process large datasets in memory and are also ideal for database workloads.

Let’s look at an example. If you are running a memory-intensive Windows application that requires an Amazon EC2 instance with at least 16 GiB of memory, we recommend using r6i memory-optimized or c6i compute-optimized instance types. The following table provides details on the specific memory and CPU allocations each instance type requires to run the 16GiB workload. As the tables shows, the r6i instance uses only two virtual CPUs, making it 71% cheaper than the c6i instance, which requires eight vCPUs.

Selecing Right Instnace family

2. Select the right instance type

The variety of Amazon EC2 instance types gives you the flexibility to choose the appropriate mix of resources for your applications. The over-provisioning of resources on Amazon EC2, however,  can lead to unnecessary costs and resource consumption. An AWS Optimization and Licensing Assessment can help you select the instance that is cost-optimized for your workloads.

If you are running your Windows Server workloads on Amazon EC2, you can actively monitor its usage by using Amazon Elastic Block Store (EBS) CloudWatch metrics to ensure your instances match demand from your workloads. AWS also offers rightsizing tools that can help you identify over-provisioned instances.

If you have workloads running on previous generations of Amazon EC2 instances, you can move to newer-generation instances. Newer generations use higher performing and more efficient processors that feature faster storage input/output operations per second (IOPS) and higher throughput. This provides better price-performance compared to previous-generation instances.

3. Select the right storage

When evaluating storage, we recommend that you always consider the latest generation of storage capabilities. For general purpose storage, we offer General Purpose SSD (gp2) Amazon EBS volumes and General Purpose SSD (gp3) Amazon EBS volumes.

We recommend you use gp3 volumes for both general purpose and high-performance workloads because they provide up to double the performance of gp2 volumes with the same storage capacity.

Additionally, gp3 volumes deliver a lower cost per I/O operation. Amazon EBS gp2 volumes provide a baseline of 100 IOPS that scales with volume size, while gp3 volumes provide a predictable 3000 IOPS baseline performance and 125 MiB/s throughput, regardless of volume size. With gp3 volumes, you can provision IOPS and throughput

independently without increasing storage size. You can migrate from gp2 to gp3 and achieve costs up to 20% lower per GiB compared to gp2.

We recommend you reference the elastic modify volume guide to seamlessly migrate from gp2 to gp3. Following these steps will help you avoid downtime when migrating from gp2 to gp3.

For workloads that need sub-millisecond latency or need to go beyond the current single volume peak performance and throughput, we recommend migrating from General Purpose volumes to Provisioned IOPS SSD (io1 and io2).

Io1 and io2 volumes are designed to meet the needs of I/O-intensive workloads, particularly database workloads, that are sensitive to storage performance and consistency. Provisioned IOPS SSD volumes use a consistent IOPS rate, which you specify when you create the volume. Once selected, Amazon EBS delivers the provisioned performance 99.9% of the time.

We suggest examining your EBS CloudWatch metrics for IOPS and throughput to determine if switching from io1 to General Purpose SSD (gp3) Amazon EBS Volumes is viable.

4. Match storage configuration with instance capacity

Each Amazon EC2 instance type and size has a maximum IOPS and throughput limit. Amazon EBS provides many volume types that offer varying levels of IOPS and throughput, and each have their own defined limits. We strongly recommend you verify that the EBS volumes attached to your instances are less than the Amazon EC2 instance limits.

For example, you may have a r5a.4xlarge instance, which has an EBS io1 volume set to 18,000 IOPS. However, the maximum IOPS for r5a.4xlarge instances is 16,000. You can save costs by reducing the EBS volume IOPS to 16,000, matching the maximum limit of the instance. If your application requires over  16,000 IOPS, you should choose an instance size with a higher IOPS limit to fully use the EBS volume’s performance.

We also recommend that you use EBS-optimized instances to ensure the EC2 instance meets the performance requirements of the EBS volume. These EBS-optimized instances provide dedicated bandwidth for EBS volume traffic that is separate from common network traffic.

5. Select the right license type

You have a variety of options for using new and existing Microsoft software licenses on AWS. By purchasing Amazon EC2 license-included instances, you can run new, fully compliant Windows Server workloads on AWS. You may use existing licenses on AWS with Amazon EC2 Dedicated Hosts, Amazon EC2 Dedicated Instances, or Amazon EC2 instances with default tenancy using Microsoft License Mobility through Software Assurance.

Earlier, we discussed the OLA, which helps reduce your costs and improve efficiency by providing instance recommendations that are license-optimized and rightsized for your workloads. In addition, OLAs can also help you use your existing Microsoft licensing investments and bring your own licenses (BYOL) to AWS, maximizing your return on investment and minimizing your licensing costs.

If you are using Amazon EC2 Dedicated Hosts ,you should use T3 dedicated hosts. T3 Dedicated Hosts support scalable instances capable of sharing CPU resources that provide a baseline CPU performance and the ability to burst when needed. Sharing CPU resources allows a single T3 Dedicated Host to support up to 4x more instances than comparable general-purpose Dedicated Hosts. This can help you save on licensing and infrastructure costs by as much as 70%.

6. Use optimization tools

AWS offers a broad range of tools that provide you with insights and recommendations to maintain your workloads efficiently.

AWS Compute Optimizer offers suggestions for optimizing workloads, including stopping unused instances and reconfiguring underutilized instances. It helps you avoid over-provisioning and under-provisioning many AWS resources, including Amazon EC2 instance types, Amazon EBS volumes, Amazon Elastic Container Service (ECS) services on AWS Fargate, and AWS Lambda functions based on utilization data provided from Amazon CloudWatch. This can yield cost savings of up to 25%.

You can use AWS Trusted Advisor to identify idle and underutilized Amazon EBS volumes and un-associated Elastic IP addresses. Trusted Advisor can help you save costs by analyzing usage, configuration, and spend and then providing you with actionable recommendations.

You can also use AWS Cost Explorer to view your usage data as far back as 12 months and forecast how much you’re likely to spend for the next 12 months. AWS Cost Explorer lets you view and analyze your costs and usage. You can also get purchase recommendations for Compute Savings Plans and Amazon EC2 Reserved Instances to reduce your costs.

7. Auto stop/start instances with Instance Scheduler

We always recommend you run instances only when they are needed to reduce costs. However, doing this manually can introduce the risk of human error, which can negatively impact your workloads and users. To mitigate this, we recommend using our Instance Scheduler on AWS. This feature automates starting and stopping Amazon EC2 instances based on a schedule that you define.

This reduces costs and human error by automatically stopping resources that are not in use and starting resources only when capacity is needed. Common use cases for this include test and development environments, infrequently used workloads, and workloads with predictable usage patterns.

If you leave all of your instances running at full utilization continuously, you may end up paying for resources that are not actually being used. By using Instance Scheduler on AWS, you can turn off instances when they are not needed, such as during non-business hours, weekends, or other periods when usage is low. This can lead to significant cost savings over time.

Instance Scheduler also offers cross-account instance scheduling and automated tagging. It also gives you the ability to configure schedules or periods using a command-line interface or an AWS Systems Manager maintenance window. These features can help you more effectively manage your instances and accurately track and allocate costs across different projects or teams.

8. Use Spot Instances

You can use Amazon EC2 Spot Instances to take advantage of unused Amazon EC2 capacity in the AWS Cloud. You can also use Spot Instances for various stateless, fault-tolerant, or flexible applications. These include big data, containerized workloads, continuous integration and continuous delivery (CI/CD), web servers, high-performance computing (HPC), and test and development workloads.

Moreover, you can provision capacity across Spot, On-Demand, Reserved Instances, and Savings Plans Instances using Amazon EC2 Auto Scaling to optimize workload cost with performance. Spot Instances are available at up to a 90% discount compared to On-Demand Instance prices. You can check the spot instance pricing history page for specific instance types and verify savings per instance.

9. Select the right Savings Plan

After rightsizing your Amazon EC2 instances, you should consider using savings plans. Savings Plans are a flexible pricing model that offers discounted prices on Amazon EC2, AWS Lambda, and AWS Fargate usage, in exchange for a commitment to a consistent amount of usage (measured on a $/hour basis) for a 1- or 3-year term. When you sign up for a Savings Plan, you will be charged for the discounted Savings Plan price for your usage up to your commitment.

AWS offers two types of Savings Plans – Compute Savings Plans and EC2 Instance Savings Plans – which provide the most flexibility to reduce your costs by up to 60%. These plans automatically apply to Amazon EC2 instance usage regardless of instance family, size, Availability Zone, Region, OS, or tenancy. They also apply to AWS Fargate and AWS Lambda usage.

You might also want to consider Amazon EC2 Instance Savings Plans, which provide the lowest prices, offering savings up to 72% in exchange for commitment to usage of individual instance families in an AWS Region. This automatically reduces your cost on the selected instance family in that region regardless of Availability Zone, size, OS, or tenancy. Amazon EC2 Instance Savings Plans give you the flexibility to change your usage between instances within a family in that region.

10. Modernize your applications

Some modernization strategies for Windows Server workloads include migrating Windows Server workloads to Linux, migrating to open-source databases such as Amazon Aurora, moving your SQL Server to Babelfish for Aurora PostgreSQL, or containerizing your applications using Windows containers.

Migrating Windows Server workloads to Linux removes the cost of operating system licenses. It also shields your organization from any interruptions that may result from unanticipated and potentially unfavourable changes in license policies.

For database modernization, Amazon Aurora offers equivalent capabilities to commercial databases at approximately one-tenth the cost. Babelfish for Aurora PostgreSQL is a new capability for Amazon Aurora PostgreSQL-Compatible Edition that lets Aurora understand commands from applications written for Microsoft SQL Server. With Babelfish, Aurora PostgreSQL understands T-SQL and supports the same communications protocol. This means that your applications originally written for SQL Server can now work with Aurora PostgreSQL with fewer code changes.

For application modernization, you can consider moving to .NET 5+ so that you can run your application inside a Linux container. Refactoring an application from .NET Framework on Windows to .NET 5+ on Linux gives you access to the latest enhancements such as AWS Graviton2 processors, which offer 40% better price-performance vs. comparable instances. If your application requires a .NET framework, consider using Windows containers and consolidate applications to run on fewer Amazon EC2 instances. This reduces Windows Server licensing costs and may also decrease your Amazon EBS storage needs.

Conclusion

Optimizing Windows Server workloads on AWS can help reduce your total cost of ownership. In this post, we have provided you with several tools and configuration recommendations to assist you in finding the optimal price-to-performance configuration for running your Windows Server workloads on AWS. When implementing our configuration suggestions, it is essential to stress test your workload to ensure that it not only meets your budget requirements but also satisfies your performance expectations.

If you are migrating to AWS, consider using AWS Optimizing and Licensing Assessment, and if you are already on AWS, then consider using AWS Compute Optimizer and AWS Trusted Advisor to optimize your Windows Server workloads.


AWS can help you assess how your company can get the most out of cloud. Join the millions of AWS customers that trust us to migrate and modernize their most important applications in the cloud. To learn more on modernizing Windows Server or SQL Server, visit Windows on AWSContact us to start your modernization journey today.

Yogi Barot

Yogi Barot

Yogi is Principal Solutions Architect who has 22 years of experience working with different Microsoft technologies, her specialty is in SQL Server and different database technologies. Yogi has in depth AWS knowledge and expertise in running Microsoft workload on AWS.

Ben Groeneveld

Ben Groeneveld

Ben is a Microsoft Specialist Solutions Architect based in the bustling city of Singapore. Originally from Australia, Ben has ~20 years of IT experience across diverse industries such as mining, oil & gas, and financial services. Having lived in Asia for 11+ years, he brings a unique blend of technical expertise and cultural understanding to his work. As an IT infrastructure generalist, Ben enjoys guiding customers through their cloud migration journey and ensures they smoothly run and optimize both their new and existing workloads on AWS.

Jerroll Harewood

Jerroll Harewood

Jerroll Harewood is a Solutions Architect Manager at AWS based out of NY. His focus areas are architecting scalable Windows workloads on AWS. He specializes in providing technology strategy for customers to enable their business outcomes.