Blog Cloud Computing Top 9 Google Cloud Cost Optimization Ideas – Save upto 40% on...
Google-Cloud-Cost-Optimization

Top 9 Google Cloud Cost Optimization Ideas – Save upto 40% on Cloud Spend

In this article, we are going to learn about how you can adjust to new billing concepts with the cloud and take advantage of some new Google Cloud Cost Optimizations. In cloud costs, no customer wants to spend more than they need on their cloud investment.

It should be no surprise that using any cloud resource tends to cost money. When it comes to managing your Google Cloud costs, you have to understand what your cloud costs are, put controls in place so you don’t overspend and then optimize your costs from there.

Why Google Cloud Cost Optimization?

First step in optimizing is to understand what cost lever you have in your control. Some of the obvious benefits of optimizing your cloud spend are

  • The cost can creep up quickly if you’re not monitoring closely
  • You will gain a better visibility in your cloud spend when you start optimizing
  • Google cloud cost optimization process will also help you understand which department is spending the most and compare it against the benefit you are getting.
  • Overall, you can save upto 40% if you closely monitor your cloud spend and keep it optimized.

Let’s see how you can understand your Google cloud costs and optimize the cost spent in Google Cloud.

Understanding of the Cost Spent

Let’s look at all the tools available to you to enhance the visibility and governance at all layers. The three areas of Predictable Cloud costs are

  • Visibility
  • Accountability
  • Control

Visibility: Within visibility you have built-in reports, cost breakdown and cost table to provide all the information you need in terms of usage and cost. Bigquery Billing Export helps you to analyze historical datas and trends.

  • Built-in reports
  • Cost Breakdown
  • Cost table
  • Bigquery Billing Exports

Accountability : For accountability, resource hierarchy and labeling are extremely powerful ways to allocate cost or business units. This should be standardized and enforced systematically.

With this tool, you should be able to identify all the costs that make up your services. If you don’t want everyone to see your organization cost, Google Cloud provides granular permissions that fits your needs.

  • Resource Hierarchy
  • Labels
  • Billing access controls

Controlling the cost: Moving on to controlling your cost, you can easily identify the slightest leak of your cloud cost by using Budget and alerting features.

If you suddenly see the spike of cost coming from a non-production environment, you have the ability to be proactive and get alerted on the forecasted increase of cost before the damage is done.

Quotas helps you to manage resources by preventing unforeseen spikes in usage and limits you with particular services.

  • Budget and Alerts
  • Quotas

Resource optimization with Active Assist

If you haven’t heard of Active Assist, it is unlocking Google magic across your cloud deployment. Google uses their specialties around Data analysis and Machine learning to provide you better recommendations based on your usage.

When it comes to small and large organizations, it’s easy to spin up resources and forget about it. So, in this case, Active Assist will analyze ideal instances and disks for you. If it doesn’t provide any business value, you can quickly optimize your cost by turning it off or just deleting that resource.

Active Assist helps you to maximize these opportunities and suggest right sizing to further reduce your cost. For heavy users of Bigquery, Active Assist will recommend the best billing model based on your usage.

In addition to Google Cloud Cost Optimization, it can also help your infrastructure to be more reliable, secure and perform. If you have a Premium support plan, it offers Recommender API, allowing you to build powerful integrations and adopt recommendations at scale.

Recommendations are fully automated and appear contextually as you are managing different resources across Google Cloud. Google’s optimization suggestions can help you run smoothly, increase your security and help you towards your business goals.

Cost Optimization Recommendations

Google Cloud Cost Optimization can be splitted into different services based upon their usage and their needs. Prioritizing their recommendation is important because there are hundreds of ways you can run leaner and save some cost, some of them are shown in the following

  • Compute Optimizations
  • Storage Optimizations
  • BigQuery Optimizations
  • Pricing Efficiency

Compute Optimizations: For Compute optimization, the best way is to get rid of ideal Cloud resources which doesn’t provide any business value. This saves nearly 100% from the total cost. Autoscaling helps you to scale the resources up and down based on user activity.

Google Cloud offers Custom Machine Type to customize your machine by selecting the exact number of Cores and RAM for your workload.

Some of the common process that needs to followed in Compute Services for Cost Optimization are

  • Ideal VM Recommendations
  • Right Sizing VMs
  • VM Scheduler
  • Custom Machine Type
  • Pre-emptible VMs
  • Committed Use Discounts for VMs

Storage Optimizations : Google Cloud Storage offers Object Lifecycle Management to automatically delete the object after a certain period of time. Object versioning helps you to restore the older version of an object in Google Cloud Storage.

Cloud Storage has four different Storage Classes like Standard, Nearline, Coldline and Archive, each one has different costs based on the user needs.

Some of the common process that needs to be followed to save cost in cloud storage are

  • Object Lifecycle Management
  • Object Versioning
  • Snapshot retention
  • Storage class

BigQuery Optimizations: When you run a Query in BigQuery, it provides a blazing fast output by using advanced analytics. Instead of querying SELECT * from, you can mention that particular column present in the table to save the cost.

The best practices to be followed in BigQuery to save up the cost are

  • Keep your data only as long as you need it.
  • Avoid duplication of data
  • BigQuery Caching
  • SELECT * is the most expensive way to query data
  • Partition your tables

Pricing Efficiency: The easier way to reduce the Google Cloud Cost is, adding the Compute machine in Commitment for at least 1 or 3 year term.

  • Sustained Use Discounts
  • Committed Use Discounts

Analyzing the Billing to Optimize the cost

The best way to understand your Google Cloud costs is to use the billing reports available in the cloud console.

By using the left navigation, you need to click on the Billing and then choose your linked billing account.

 

Google-Cloud-Billing-Tab

Once you click on the Billing account you will get the Overview page. Overview page provides you the total cost of each and every month.

It also provides you the Cost trend which can be used to analyze the average monthly total cost spent.

 

GCP Billing Overview

Select the Billing account attached with the project and click on the Reports tab to analyze the cost breakdown from each and every service.

 

GCP Billing Reports

Here, you will be able to see your costs broken down by project. So, you can quickly analyze where the costs are coming from.

In addition, you can group costs by product to see which Google Cloud services are making up your costs. And then filter by SKUs to see a more detailed breakdown of your usage.

 

 SKUs in Billing

So that’s how you can get a better understanding of your costs. Now let’s look at some ways to optimize your costs for Compute Engine.

Sustained Use Discounts

Compute Engine automatically applies discounts for running a virtual machine over a sustained period of time. These are called Sustained use discounts and it doesn’t require any configuration to enable.

You can save upto 30% on a virtual machine running over a period of month by using sustained use discounts.

Committed Use Discounts

If you know that you will be using resources over a long period of time, you can save even more by using committed use discounts. These are great for static workloads where you have consistent resource usage like multiple production machines.

Committed Use Discounts is available for Compute Engine Resources like vCPU, RAM, GPU, local SSD and sole tenant. If there is a certain amount you know that you will always be running, you need to sign up for Commitments for atleast 1 or 3 year term.

This can save upto 57% of your Total costs. Commitments can be made per project or span across entire billing account

If you actually want to purchase a commitment, click on the Compute Engine tab in the navigation menu and choose the Committed Use Discounts option.

 

Committed Use Discounts GCP

Then click on Purchase Commitment

 

 Purchase Commit GCP

Once you click on the Purchase Commitment tab you will get the below screen. Here, you need to enter the name, region, machine type and total duration of the commitment.

 

 Committed Overview GCP

Then enter the number of Cores and Memory of that particular machine type. If required you can add GPU and Local SSD. Then finally click on the Purchase button to Commit.

 

Committed-Overview-GCP2

Automatic Recommendation for VM Instance

Google Cloud automatically provides recommendations for machines and disks that may be idle or underutilized. Click on Compute Engine in the navigation menu.

In the recommendation column, you can see suggestions for each VM based on its historic resource usage. Applying these recommendations can provide an easy way to save on long term usage.

By clicking on the Save recommendation, you can customize your VM instance based on the workload.

Recommended Instance in GCP

Stopping the instance when not in use

If the machines are already in the right size, but there are times when you don’t need them, you can also stop the VM instance to save the money. When a VM is stopped, you don’t need to pay for the Cores and RAM running.

In a use case like, you may be running a test environment that you don’t need outside of core business hours. So, it can be shut off or you can even use some quick Cloud Function code and Cloud Scheduler to turn your VMs on and off automatically.

To stop the VM you need to select the instance and click on the three dots, then choose the Stop Option.

 

 Stopping the VM

Pre-emptible VMs

Depending on the type of workload you are running, you may also benefit from using different types of instances and Pre-emptible VMs.

The new generation of E2 general purpose machines can give you a similar performance to the N1 series while also saving your money.

Leveraging Pre-emptible instances is a great way to run stateless workloads that are time sensitive like media transcoding. They have a maximum up-time of upto 24 hours before they are deleted, but they are 80% cheaper.

You can choose Pre-emptible when making new compute instances. To choose the Pre-emptible instance, you need to select the Create Instance tab.

 

Creating an Instance in GCP

After choosing the machine family and machine size, you need to expand the Networking tab.

 

Networking Tab in GCP

By default, Pre-emptible machines will be automatically turned off under the Management tab. It can be enabled manually by selecting the drop-down menu.

 

Pre-emptible Instance in GCP

Conclusion

Every workload is different, so it’s important to understand what resources you need to use and which tools you can use to optimize your Google Cloud Costs based on your unique needs.

Start with your billing reports to understand your costs and then see which of these Google Cloud Cost Optimization suits best for you. I hope this helps you about more ways to manage and optimize your Google Cloud costs.

To conclude, better don’t wait for the traditional monthly or quarterly review of cost, instead of that review your cost as frequently as daily. In the next blog we are going to publish a lot more articles on Google Cloud. Till that stay tuned with us!!!

Happy Learning!!!

LEAVE A REPLY

Please enter your comment!
Please enter your name here