The fastest way to save on Google Cloud

Sign saying "Yes You Can Do It"

Deleting what you’re not using at all is the fastest win.

Mainly in these pay for provision types: 1

TypeMonthly cost of a medium instance
Compute Engine$25-30
Cloud Run$10-80
Cloud SQL$95-100

Compute Engine, Cloud Run, and Cloud SQL hide waste because you pay for what you provision, not what you use.

By comparison, it’s not as easy to waste money on a Cloud Run Function. You pay per invocation.

Look at every project that has in its name dev, test, stg, or staging.

You probably have a main dev Google Cloud project, like xyz-company-dev.

But you’re probably very aware of that as a source of savings.

Each team usually has their own dev and testing projects.

I’ve seen some from 2 years ago that nobody uses anymore, but nobody went back to delete them.

Those are prime places to hide waste.

And Google Cloud usually won’t recommend them in its cost dashboard, as it doesn’t know if you’re planning on querying them in the future:

No recommendation to delete unused Cloud SQL database

To see if you can delete them:

  1. See if any of your repos reference them
  2. Look in Metrics Dashboard to see their requests and utilization

In the simplest cases, you’ll see no request:

But that’s rare.

Even databases that nothing uses will have some CPU Utilization:

Here’s how to find if you can delete Cloud SQL databases.

You can do something similar for Compute Engine and Cloud Run, as you’ll usually see some utilization, not a completely deactivated instance.

How you’ll save

Compute Engine

Your savings will come from deleting the instance and any persistent volumes.

Instances with “test”, “staging”, or “migrate” in the name are good candidates.

You’re probably running a Compute Engine instance intentionally.

But if you’re only running a container on it, maybe you can migrate it to Cloud Run and scale it down to 0.

Cloud Run

Deleting the instance entirely will save $25-30 a month per instance, and you’ll also save networking costs.

But if it’s for dev, you can probably scale down to 0, which I’ve seen save 70%.

This means you’ll have no cost most of the time, as long as there’s no request.

Cloud SQL

Deleting a medium instance, like db-n1-standard-2 will save $95-100/month.

It’s pay-for-provision, so it’s easy to overpay.

Still, self-hosting your own database on a Compute Instance is usually too much work.

Strategy

The first step in cost savings is the easiest one:

Deleting what you’re not using at all.

This won’t save you the most, but it will be the fastest savings.

The next step is optimizing what you still need.

For example, optimizing Cloud SQL sizes.

  1. Cloud Run can be either is pay for use or pay for provision. But most people use it as pay for provision, because they never scale down to 0. ↩︎