Cloudability logo
Choosing the Right EC2 Instances to Optimize Your Cloud
Cost Optimization

Saving with AWS RDS: identifying the top three cost drivers

By Andrew Nhem on June 14, 2016
Understanding where the major costs of AWS RDS come from will set proper cost and usage expectations for operations and finance teams, and should lower the chances of seeing unwanted surprises in next month’s bill. Let's take a look at RDS costs in greater detail.

There are a few cloud cost management points to consider, as RDS setups are more than just paying for the databases. Understanding where the major costs of RDS come from will set proper cost and usage expectations for operations and finance teams, and should lower the chances of seeing unwanted surprises in next month’s bill.

AWS RDS makes database replication, scaling, backup and outage protection, multi-region support, experimentation, and scaling a lot easier. It supports the most popular database software for business and enterprise, including AWS’ own Aurora, MySQL, MariaDB, and more. All that said, it’s important to understand the cost implications involved with RDS and how to use it effectively.

How AWS charges for RDS

Like other AWS products, users pay for what they use with RDS. But, this pay-as-you-go model has a specific billing construct that can, if left unchecked, yield questions or surprise billing elements if no one’s aware of what’s actually in the bill.

Let’s start by looking at what a typical AWS RDS bill looks like and what each charge means.

Charge type Unit Notes
DB Instance Hours Hours of instance use consumed based on instance class Partial db instance hours consumed are billed as full hours.
Storage GB per month Cost incurred by storage capacity provisioned. Scaled provisioning will be prorated within a given month.
Backup Storage 100% of provisioned db storage 100% of backup storage provisioning is free, beyond that is a charge.
Data Transfer Internet data transfer in and out of the db instance Users are not charged for the data transfer incurred in replicating data between primary and standby instances.
I/O Requests Number of requests per month This applies to Amazon RDS Magnetic Storage only.
Provisioned IOPS Provisioned rate per month Rate charged regardless of IOPS consumed, applies to Amazon RDS PIOPS SSD Storage type only.

The best way to parse out pricing across all of RDS’ offerings is with this open source price comparison tool. The volunteer-run project is a work-in-progress, but it compares the pricing information for all six database offerings across on-demand and Reserved Instance pricing.

Let’s look at major cost drivers using our historical data

rds_monthly_spend_allocation

The graph above shows the percentage of customers that spend on each particular RDS component. It might look like few customers spend on PIOPS. The reality is that of the customers who do, they spend a fairly large amount on it. But, we’ll get more into that below.

Using some of our historical data from 2015, our team identified three key RDS cost drivers. Every business is different in terms of size and AWS usage. But, on average, users can expect one or more of these three drivers to be major contributors to the monthly bill.

Cost Driver 1: RDS instance hours

AWS RDS instances have specific specs and specializations for various workloads. Currently, AWS supports the m4, m3, r3, and t2 instance families. Just like their EC2 relatives, the m4 and m3’s are preferred for general use, the r3 can satisfy memory-heavy workloads, and the t2s include burstable compute. Choosing the right family to suit specific workloads can lead to serious savings over time.

Historically, we see hourly RDS instance charges as the leading driver of overall RDS costs. In the graph above, 68 to 93% of the costs in that snapshot are from instance usage. That means that users who can optimize their RDS instance usage with strategic monitoring and modification of their instances can yield significant savings.

Right-sizing a RDS instance to the actual workload of an environment will deliver the best cost-efficiency for AWS users. To do so, users should find the means of monitoring their RDS instance utilization and usage in order to see if they’re provisioned with the right size or family of RDS instance.

Cost Driver 2: Provisioned IOPS

Our historical snapshot (above) shows most users spending between 0 and 15% of their total RDS on Provisioned IOPS (PIOPS). Not every user has a workload that requires a predictable, reliable amount of I/O, but if they do, it can be a significant amount of spending. We’ve also noticed that those who spend heavily on PIOPS often spend more on it than storage.

Fifteen percent of RDS spending is often a significant chunk of a cloud budget. Finding the means to monitor I/O utilization data can help teams keep tabs on this significant part of RDS spending.

Cost driver 3: Storage

Each AWS RDS instance requires users to attach storage. Depending on the type of storage attached, there can be additional monthly charges. See specific pricing here from AWS. For each instance type, users have a choice between general-purpose SSD storage, Provisioned IOPS, and Magnetic storage.

From our 2015 data, storage accounted for between 4 to 11% of most companies’ total RDS spending.

The type of storage can also affect other cost drivers, too. If users choose Amazon RDS Magnetic Storage, they will incur an additional charge based on the number of I/O requests made per month. Users who choose Provisioned IOPS will be charged for the monthly rate of PIOPS. If these specific database storage types are mission-critical for a given environment, it’s best to expect these additional charges on the monthly bill.

Save big with RDS Reserved Instances and a strong database cost management plan

Just like AWS EC2, RDS has reduced pricing through Reserved Instances for users who want to reserve one or three-year terms at a lower hourly rate. AWS RDS users who monitor their database instance and storage usage over time have a stronger understanding of which instances can make the most of RI pricing.

AWS users can ingest cost and usage data into their cloud cost management tool to pull a daily view of their RDS usage (called “Usage Quantity” in the Cloudability example below). Users will want to identify instances that run in increments of 24 hours or higher. These instances, if tagged properly, show that the primary and replicated instances are active daily, in a non-stop pattern. Here’s an example of this report with Cloudability:

rds-ri-report-ex

When users know that their database instances run without any shut down periods, these instances are great candidates for RI pricing. Every single discounted hour of either a one or three-year RI can be applied, assuming the database is continuously run and retains this always-on state.

A well-tagged AWS account keeps a closer eye on RDS spending

To assist with properly allocating RDS instance, storage, data transfer, backup, and other related costs, implementing a repeatable, programmatic tagging strategy is key. Sitting down with finance and operations to iron out which RDS resources belong to which team and where can set a great common ground and financial language to determine where these costs belong at the end of the month.

Getting to this level of RDS cost and usage understanding does require a bit of help in tagging and visualizing that data beyond what shows up in the monthly DBR. For AWS users wanting to see this kind of reporting and RI planning in action, Cloudability offers a free trial to anyone interested.

Being in the know feels great