Case Study – Unlocking Cost Optimisation Strategies for AWS RDS

Table of Contents

By Oliver Farrelly, Parmeet Singh

According to a recent study by Gartner, 62% of businesses will be using cloud-based applications and infrastructure by 2023. This is up from 40% in 2020. The study also found that the average company uses 12 cloud-based applications.

Providers like Microsoft and Amazon offer cloud-based computing solutions to businesses that enable them to avoid upfront costs for hardware and the flexibility to scale their solution up or down to best suit their evolving business needs.

These configuration options allow businesses to tailor their technical capability to best suit their present-day requirements, but many businesses face challenges identifying how best to achieve this, taking on a pay-as-you-go service with technical inefficiencies that leave sizable potential for financial savings.

Recently, our team at Data Sagacity partnered with a client actively using Amazon’s Relational Database Service. Our shared objective was to reduce their monthly AWS costs. We aimed to achieve this by optimising their platform configuration, modifying indexes and removing unnecessary ones, and enhancing the performance of their SQL queries and database structure.

 Expected capacity to reduce cost

After detailed evaluation of the client’s current usage of their AWS service, we concluded that an instance reduction from 2xLarge to xLarge was viable if changes were made to:

The engagement began with optimisations of the database itself, identifying queries with suboptimal components and reducing their runtime through improvements to their query design, their underlying indexes and overarching processes which use them. Timing of mass insertion of updates of data also presented an opportunity for improvement, with a heavy presence on some tables creating considerable delays when writing to the database.

The expected outcome of these changes was an approx. 50% reduction in CPU and RAM requirements on the system, translating to a near 50% expected saving on their monthly RDS Compute cost. During testing of this lower-spec system, the client’s storage class was upped from their previous configuration to a system with considerably greater maximum input output operations per second (IOPS). This change comes at a financial cost but grants the system increased flexibility while the load-bearing potential of the revised instance is tested against newly reduced technical requirements.[CS1] 

Realised improvements – Preliminary

Across January through April of 2023, the average monthly spend on RDS Compute (the focus for optimisation within the project) was $4,000, this represents a more than 50% reduction in monthly cost on the client’s spend in the same months in 2022 (average cost $8,300 AUD). These savings are partially offset by the increase in temporary expenditure on flexible storage solutions – a change incurring an added $2,000 AUD per month.

The net result of these two changes was an approx. $2,000 monthly saving ($24,000 annually). A change that represented a more than 20% reduction in the client’s spend on their relational database service.

This saving reflects Data Sagacity’s work to reduce load applied to AWS services through enhancements to query efficiency and optimisation of load balancing between requirements on active storage and computational capacity. This enabled AWS RDS settings to be altered to reduce the need for high cost resources. Database load was constantly monitored to ensure the system was still running within key performance benchmarks while these changes were implemented.

Realised improvements – Completed

Post the engagement, Data Sagacity made several more recommendations the client could implement to further reduce costing and system load. These were rolled out in phases to ensure no unintended consequences occurred and was therefore dependent on business to make these changes when the time suited them.

These changes included rolling back to a cheaper IOPS storage class. Data Sagacity observed that the reduced instance [CW(S2] specs were able to adequately service the load on their database with many of the client’s slower-running queries having been optimised. Although there is more load on the CPU based on these changes, its till within an acceptable performance band as shown in the table below:

 Average CPU% RangeMaximum CPU% Range
Previous RDS Configuration15%-47%85%-100%
New RDS Configuration31%-63%89%-100%
A higher average CPU usage was ultimately achieved with minimal change to periods of maxing out

On implementation, a further monthly saving of approx. $1,800 was realised (removal of PIOPs costs less costs associated with temporary scale-up).

Summary of observed changes

After taking into consideration the additional benefit of the updated storage class and the subsequent billing costs incurred in April, the client realised monthly savings attributable to the optimisation exercise totaling just shy of $4,000 (42% cost reduction on RDS) using a year-on-year comparison with April ‘22. This represented a 25% reduction in their overall AWS spend against the same month in the previous year. Having realised these savings, the client will be able to enjoy these financial benefits in perpetuity, armed with an enhanced understanding of:

  • Efficient writing of SQL queries
  • Index design and use
  • The trade-offs between improved read speed and slower write speed with table indexes
  • Methodologies to evaluate the ongoing effectiveness of their AWS RDS configuration

Ready to see how Data Sagacity can help your project?

Fill out your details and we’ll be in touch!