Jump to Content
Databases

Do more with less: Introducing Cloud SQL Cost optimization recommendations with Active Assist

September 28, 2021
https://storage.googleapis.com/gweb-cloudblog-publish/images/clpoud_sql.max-2600x2600.jpg
Nimesh Bhagat

Product Management, Google Cloud

Dima Melnyk

Senior Product Manager

Try Google Cloud

Start building on Google Cloud with $300 in free credits and 20+ always free products.

Free trial

With Cloud SQL, teams spend less time on database operations and maintenance and more time on innovation and digital transformation efforts. This increased bandwidth for strategic work can sometimes lead to significant growth in database fleet size, which in turn can introduce operational complexity when it comes to managing cost. If your financial operations team flags that database instances are exceeding their budget, it can take a substantial amount of toil, expertise and time to identify waste across a large number of projects. And given the mission critical nature of your databases, it can be difficult to make changes with confidence while optimizing costs.

We are, therefore, excited to introduce Cloud SQL cost insights and recommendations powered by Active Assist to address these challenges, while minimizing the effort required to keep costs optimized. These new recommenders will help you detect and right-size over-provisioned Cloud SQL instances, detect idle instances, and optimize your Cloud SQL billing. 

Cloud SQL recommendations use advanced analytics and machine learning to identify, with a high degree of confidence, the over-provisioned and idle instances in your fleet, as well as the ones that may be able to take advantage of committed use discounts. This feature is available for Cloud SQL for MySQL, PostgreSQL and SQL Server via the Recommender API and Recommendation Hub today, which makes it easy for you to integrate this feature with your company’s existing workflow management and communication tools, or to export results to a BigQuery table for custom analysis.

Renault Group, a French multinational automobile manufacturer and one of our early customers for Cloud SQL recommendations, is already a fan:

When we first ran Google’s early prototype, we were really impressed with its accuracy, given that we know how challenging it can be to analyze and interpret activity on database instances. After thoroughly testing this feature on 140 pilot projects, we ended up realizing that almost 20% of our Cloud SQL instances were idle and took appropriate actions. Not only did these recommendations help us reduce waste, but they also saved us significant effort in the writing and maintaining of custom scripts. We are looking to bring this in as part of our organization-wide optimization dashboard.

Stéphane Gamondes, Cloud Office Product Leader, Renault Group

What are the main sources of waste in cloud databases?

Based on our Cloud SQL analysis and customer feedback, we identified the three most common reasons for exceeding budget:

  1. Over-provisioned resources. When developers err on the safe side and provision unnecessarily large instances, it can lead to unnecessary spending. It’s also common for database administrators who are used to provisioning larger instances on-premises, where it can be non-trivial to quickly increase instance size, to carry this practice over into the cloud environment, where it's not as critical due to its elasticity. 
  2. Idle resources. Cloud SQL makes it extremely easy for developers to create new instances to build a prototype, or run a dev/test environment. As a result, it’s not uncommon to see idle instances left running in non-production environments.
  3. Discounts not leveraged. While workloads with predictable resource needs can benefit from the committed use discounts, we see that many customers don’t always utilize those discounts, partially due to the complexity associated with figuring them out at scale.

Let’s take a peek at these new Cloud SQL cost recommendations.

https://storage.googleapis.com/gweb-cloudblog-publish/images/image3_3.max-900x900.jpg
Recommendation Hub example summary card

Rightsize overallocated instances

One of the key challenges associated with detection and remediation of overallocated instances is the definition of what it means for a database instance to be too large for a given workload. Active Assist uses machine learning and Google’s fleet-level Cloud SQL telemetry data to identify instances that have low peak utilization for CPU and/or memory, to ensure that they can be rightsized with minimal risk and have enough capacity to still handle their peak workloads after they are right-sized.

To make it easier for you to act on each of these right sizing recommendations, this feature also provides an at-a-glance view of your instance usage over the past 30 days:

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/image4_fvM729H.gif
example rightsize overallocated instances recommender

Stop idle Instances

Idle or abandoned resources are known to be one of the largest contributors to waste in cloud spending, ranging from entire projects to individual Cloud SQL instances that tend to be forgotten about. One of the challenges associated with detecting and remediating such instances is learning to distinguish between Cloud SQL instances that have low level of activity by design, from the ones that are truly idle but that still show some activity due to health monitoring and maintenance, for example. This feature uses machine learning to estimate activity across all the Cloud SQL instances managed by Google and identify, with a high degree of precision, the instances that are likely to be idle.

Leverage long term commitments discounts 

Cloud SQL committed use discounts give you a 25% discount off of on-demand pricing for a one-year commitment and a 52% discount for a three-year commitment. Figuring out the most optimal committed use discounts can be easier said than done, as it requires a thorough analysis of each workload’s usage patterns to establish the stable usage baseline and estimate the impact of the billing model changes. Active Assist detects Cloud SQL workloads with predictable resource needs and recommends to purchase committed use discounts.

Unlike the sizing and idle instance recommendations, committed usage discount recommendations for Cloud SQL are only available in private preview today (please use this form if you are interested in early access). The committed usage recommendations offer you an alternative choice between optimizing to cover your stable usage or maximize savings.

Getting started with Cloud SQL cost optimization recommendations

Head over to Recommendation Hub to see if there are already some Cloud SQL cost optimization recommendations available on your project. 

You can also automatically export all recommendations from your Organization to BigQuery and then investigate the recommendations with DataStudio or Looker, or use Connected Sheets that let you use Google Workspace Sheets to interact with the data stored in BigQuery without having to write queries.

As with any other Recommender, you can choose to opt out of data processing at any time by disabling the appropriate data groups in the Transparency & control tab under Privacy & Security settings.

We hope that you can leverage Cloud SQL cost recommendations to optimize your database fleet and reduce cost, and can’t wait to hear your feedback and thoughts about this feature! Please feel free to reach us at active-assist-feedback@google.com and we also invite you to sign up for our Active Assist Trusted Tester Group if you would like to get early access to the newest features as they are developed.

Posted in