How to Remediate AWS EC2 Instances Consolidation for Microsoft SQL Server with Stratusphere™ FinOps

Learn how to optimize your Microsoft SQL Server instances on AWS with our consolidation guide. Save on licensing costs and enhance performance now!

Content Outline

Need additional support?

Subscribe

Remediating AWS EC2 Instances Consolidation for Microsoft SQL Server | Stratusphere™
9:30

When you’re deploying infrastructure to Amazon Web Services (AWS), it’s easy to spin up lots of small, distinct database servers. This could happen because each application team decides to deploy a database server at a separate point in time.

If your application teams are using Microsoft SQL Server, the licensing costs are an additional consideration that affects your monthly AWS invoices. Due to the way that licensing works for Microsoft SQL Server, this fragmented approach to deployment can result in waste for licensing costs.

According to the documentation for AWS Trusted Advisor, licenses for Microsoft SQL Server Standard Edition are sold with a minimum of 4 virtual CPU cores (vCPU). Amazon EC2 allows you to deploy virtual machines with fewer than 4 vCPUs, however. Some of the smaller EC2 instance types only have one or two vCPUs, such as t3.micro, m7a.medium, c7i.large, and others.

If you’re running a licensed copy of Microsoft SQL Server on an EC2 instance with fewer than 4 vCPUs, you are missing out on the full performance utilization of the license.

Here’s an important quote about licensing SQL Server on virtual machines. This quote is taken from the Microsoft SQL Server 2022 licensing guide, where “OSE” refers to an Operating System Environment:

Similar to the Per Core licensing model in physical OSEs, all virtual cores (v-cores) supporting virtual OSEs that are running instances of SQL Server software must be licensed accordingly.

To license individual VMs using the Per Core model, customers must purchase a core subscription license or license with Software Assurance for each v-core (or virtual processor, virtual CPU, virtual thread) allocated to the VM, subject to a four-core license minimum per VM. For licensing purposes, a v-core maps to a hardware thread. 

As you can see, a four-core license minimum applies to VMs.

Identify Microsoft SQL Server Consolidation Opportunities

If you have provisioned Amazon EC2 instances, with Microsoft SQL Server Standard or Enterprise installed, and those EC2 instances have fewer than 4 vCPUs, then those would qualify for the consolidation finding.

You can identify opportunities for Microsoft SQL Server consolidation by examining the Findings section in Stratusphere™ FinOps. Stratusphere™ FinOps aggregates cost optimization data across different AWS regions and accounts, into a centralized view. This helps you to easily identify which AWS account these cost savings opportunities can be actioned in.

In the above example, we have two Amazon EC2 instances running SQL Server Standard Edition. One of the EC2 instances has fewer than 4 vCPUs, which is not fully utilizing the licensing cost for SQL Server. The recommended course of action here is to migrate the databases from the server named Orion to Atlas, and retire the Orion server. Before or after the database migration, you can increase the EC2 instance size of the Atlas server, to accommodate the additional load from the databases migrated from Orion.

Risks & Other Considerations

  • Risk: High-utilization databases can result in “noisy neighbor” resource contention.
    • Consideration: When you’re planning consolidation of databases onto fewer EC2 instances, you should consider the approximate resource utilization of each database. Consolidating multiple databases, with high resource utilization, onto the same node could reduce performance of one or both databases.
  • Risk: Performance impact from database disk configurations
    • Consideration: Databases that require significant disk utilization during queries could have reduced performance during consolidation. Consider creating separate Amazon EBS volumes for high-utilization databases to minimize the possibility of reduced disk performance.
  • Risk: Add-ons & external dependencies installed in Microsoft SQL Server environment
    • Consideration: Microsoft SQL Server is sometimes installed with add-ons that extend its functionality, or external dependencies on the same server. These pieces of software will need to be documented and installed on the consolidated EC2 instance during the database migration project.
  • Consideration: Consolidation can result in improved performance for bursty access patterns
    • Detail: When you’re consolidating databases onto a larger EC2 instance with Microsoft SQL Server, some databases might benefit from improved performance. This can happen especially with databases that have bursty access patterns, because they have access to more CPU cores and memory than they previously had.

Remediation

The first step to remediating this finding is to resize the affected Amazon EC2 instance to an instance type that has at least 4 virtual CPUs. You can search for an appropriate EC2 instance type using the data from the Amazon EC2 On-Demand pricing page.

When you’re consolidating SQL Server instances, there will be some database migration planning work involved. Business applications that write data into databases, such as Microsoft SQL Server, must be configured to connect to their database server endpoint.

Configuration often includes a DNS endpoint, port number, username, password, and a default database. Application configuration is commonly handled with environment variables, configuration files (ie. JSON, YAML, TOML), a managed service like AWS Systems Manager Parameter Store, or using a secrets management solution. If databases are moved between SQL Server hosts, then application configurations will need to be updated, to point applications to the new server, with the appropriate credentials.

Planning a Database Migration

Let’s discuss the steps you’ll need to run through in order to plan a database migration project. If you spend more time planning up front, you will help to ensure a smooth and successful migration.

  1. Identify all EC2 instances running Microsoft SQL Server
    1. AWS account & region
    2. SQL Server version
    3. EC2 instance type
  2. Inventory each SQL Server instance
    1. Database names
    2. Database sizes on disk
    3. Configured memory utilization
  3. Identify all business applications configured to use SQL Server instances
    1. Application owners
    2. High-level application architecture
    3. Network architecture between application and database
    4. Method of configuring database server endpoint
  4. Partner with application owners to plan migration
    1. Determine approximate time required to migrate database
    2. Plan specific window of application downtime for migration
  5. Execute the database migration plan

After migrating your databases to a SQL Server with at least 4 vCPUs, you can retire the database servers that have fewer than 4 vCPUs, and save on the additional SQL Server licensing costs.

For a more detailed database migration plan, check out the AWS Prescriptive Guidance Migration strategy for relational databases documentation. AWS also offers a Database Migration Service (DMS) which can help you move databases between SQL servers.

Migrate Databases to Amazon RDS

When you’re consolidating Microsoft SQL Server databases, you may want to consider moving them to an Amazon Relational Database Service (RDS) instance. RDS provides additional automated management capabilities over self-managed EC2 instances.

RDS may not be the right solution for you, if you need to install add-ons and external dependencies for SQL Server.

Partner with Stratusphere™ FinOps for Unmatched AWS Consolidation Expertise

Consolidating Microsoft SQL Server instances is a high-touch effort that will involve effort from cross-functional teams. Due to the high cost for Microsoft SQL Server licensing, it is beneficial to consolidate your databases onto fewer servers, reducing the total number of core licenses that you need to purchase.

While Microsoft SQL Server licensing can be confusing, the simple rule to take away is that you should always have a minimum of 4 virtual CPUs on your EC2 instances running SQL Server Standard or Enterprise instances.

Stratusphere™ helps you to find consolidation opportunities to make the most of your Microsoft SQL Server licensing. Contact our sales team to get started with Stratusphere™ today!

Ready to streamline your Microsoft SQL Server instances and maximize your AWS investment? Contact us today to start your journey toward a more efficient, cost-effective database environment.

Here are some additional resources that can help you learn more about Microsoft SQL Server licensing.

See Stratusphere™ FinOps in Action Here:

 

BONUS: Download Your FinOps Guide to Effective Cloud Cost Optimization Here ⤵️

FinOps-Guide-Downloadable (2)

Similar posts