How to use the GCP recommender service to explore cloud savings?

Harshal
4 min readJun 7, 2023

--

Last week I talked about cost savings using AWS storage. I further explored this topic a little more with Google Cloud using recommendations:

In the continuous journey of digital transformation, cost savings are top of mind for businesses. Cloud FinOps teams are tasked with exploring potential cloud cost savings and optimization opportunities for their businesses.

In this article, you’ll learn how to use Google Cloud’s recommender service, which provides recommendations and insights based on machine learning and current resource usage. The scope of this article is limited to the cost value pillar of recommendations to help you manage, optimize, and reduce your cloud costs.

Cost Recommenders

The recommender service has eight primary cost recommenders in place under the cost value pillar, which provide recommendations and insights for potential cost savings with different Google Cloud products and resource types.

These recommendations are generated based on pre-defined parameters and algorithms of cost recommenders. Interested readers can dive into the details of these parameters and algorithms available on Google cloud public documentation. Below is an example for resources that qualify for Idle VM and the algorithm it uses:

CPU utilization < 0.03 vCPUs for 97% of VM runtime
Received N/W traffic < 2600 Bytes/second for 95% of VM runtime
Sent N/W traffic < 1000 Bytes/ second for 95% of VM runtime

How to get started with recommendations

You can navigate to the Recommendation Hub in the Google Cloud console to check for generated recommendations. Recommendations can also be explored and actioned using gCloud CLI or REST API. Recommendations are generated by Organization, Billing Account, or Project.

In an organization, if there are hundreds or thousands of projects, then it’s not feasible to navigate to each and every project console to check the recommendations and take actions. In these types of scenarios, the best option is to configure Recommendations Export to BigQuery and then analyze these recommendations for potential cost saving actions.

Configure recommendations export to BigQuery at the organization level

Recommendations export to BigQuery can be configured from the Recommendations tab in the Google cloud console. This is a one time configurable activity at an organizational level.

After completing a successful export, both the recommendations and insights tables will be available in the target BigQuery data set.

Deep dive into the recommendations export

Recommendations export tables in BigQuery can be explored further to understand the granular details. A summary of a few important fields are documented below, which can be used for building cost insights dashboards and can be shared across integrated external systems.

When the value of column primary_impact.category = COST then potential savings can be calculated.

If primary_impact.category = COST
Then currency = primary_impact.cost_projection.cost.currency_code
And value = primary_impact.cost_projection.cost.units

For example, if Currency = USD and Value = -100
In this case, negative value means saving, so potential saving is USD 100

Deep dive into the insights export

Insights export tables in BigQuery can be explored further to understand the granular details. A summary of a few important fields are documented below.

Conclusion:

As part of your organization’s overarching Cloud FinOps strategy, using Google Cloud recommendations is key to identifying and acting on potential cloud cost savings that will maximize your investment in the cloud.

--

--

Harshal
Harshal

Written by Harshal

IT enthusiast actively immersing in Multi Cloud. AWS | Microsoft Azure | Google Cloud | Oracle Cloud

No responses yet