How-to guide

Control GPU and AI compute costs on Google Cloud

Learn how to find idle GPUs, pick the right Google Cloud purchase option, cap quotas and track cost per job so AI compute stops surprising you.

By the Cloudverg engineering team · · 6 min read

Why this matters

GPUs are the easiest thing on Google Cloud to leave running by accident. A single A100 or H100 VM that sits idle over a weekend costs more than most other forgotten resources combined. And AI work has a habit of growing sideways: a notebook turns into a training job, the training job turns into a nightly pipeline, and nobody goes back to ask whether it still needs the biggest accelerator.

The second problem is that AI spend hides in places finance doesn't look. Vertex AI endpoints bill for every hour a node is up, even with zero traffic. Managed notebooks bill while the instance is running, not while you're typing. Attached disks and reserved capacity keep billing after the VM is gone or stopped.

This guide is about control, not penny-pinching. You want to know what each GPU is doing, pay the right rate for the work, and have a hard stop when something runs away.

Before you start

You need Billing Account Viewer or Billing Account Administrator access, plus Viewer on the projects that run GPU work. If you want to change quotas, you'll need permission to edit them (the Quota Administrator role covers it). Export billing data to BigQuery first if you haven't. Without that export you can only see totals, not which job or team caused them.

Write down every place GPUs can live in your organization. The usual list: Compute Engine VMs with attached accelerators, Google Kubernetes Engine node pools with GPUs, Vertex AI training jobs, Vertex AI online prediction endpoints, Vertex AI Workbench notebooks, and Cloud Run services with GPUs if you use them. Each one bills differently and needs its own check.

Decide who owns each workload. Cost control without an owner turns into a spreadsheet nobody reads. Even a plain label such as team and workload on every GPU resource is enough to start. Labels only appear in billing data from the time you add them, so add them early.

How to do it

Work through the steps below in order. The first three give you visibility, the middle ones change what you pay, and the last ones stop surprises.

Expect the biggest wins from shutting down what's idle and matching the purchase option to the workload. Model and hardware choices come after that, because they take real engineering time and the easy savings come first.

  1. Export billing data and label GPU resources. Turn on the Cloud Billing export to BigQuery, then add team and workload labels to every VM, node pool, notebook and Vertex AI job that uses accelerators. Use a consistent set of label keys so queries stay simple.
  2. Find and stop idle GPU resources. List running GPU VMs, notebooks and Vertex AI endpoints, then check Cloud Monitoring for GPU utilization over the past two weeks. Stop or delete anything that's near zero, and undeploy models from endpoints nobody calls.
  3. Schedule dev and training environments to shut down. Use instance schedules on Compute Engine and idle shutdown on Vertex AI Workbench so notebooks and dev VMs stop on their own after hours. Set the idle timeout short enough that forgotten sessions don't run overnight.
  4. Match the purchase option to the workload. Use Spot VMs for fault-tolerant training and batch inference, on-demand for urgent one-off work, and committed use discounts for the steady baseline. For scarce GPUs, a Dynamic Workload Scheduler request can get capacity for a defined window without a long reservation.
  5. Right-size the accelerator and the serving setup. Check whether inference really needs a top-end GPU, since a smaller one or a quantized model often serves the same traffic. Set Vertex AI endpoint autoscaling with a sensible minimum and maximum node count, and consider GPU time-sharing or multi-instance GPUs for light workloads.
  6. Add checkpointing to anything on Spot. Have training jobs write checkpoints to Cloud Storage at regular intervals and resume from the latest on restart. Test it by killing a job on purpose before you rely on it.
  7. Restrict GPU quota by project and region. In the Quotas page, lower GPU quotas to what each project needs and remove them in regions you don't use. Keep a short request process so teams can ask for more with a stated reason and an owner.
  8. Set budgets and alerts on GPU-heavy projects. Create a Cloud Billing budget for each GPU project, filtered by project or label, with alerts at several thresholds sent to a real inbox or chat channel. Add a Pub/Sub notification if you want automation to react.
  9. Track cost per job or per prediction. Join billing data with job metadata in BigQuery to get cost per training run or per thousand predictions. Review it monthly so a model change that doubles the cost shows up as a number, not a surprise.

How to check it worked

Give it a full billing cycle, but check early signals within a week. In the BigQuery export, filter on GPU-related SKUs and compare daily cost before and after your changes. A flat line during nights and weekends is what you want for dev and training projects.

Check utilization, not just spend. In Cloud Monitoring, the GPU utilization metric from the Ops Agent or DCGM should be steadily high during jobs. If a GPU averages low use while it's running, you're paying for capacity you aren't using, and the fix is a smaller GPU, a shared one or a shorter schedule.

Test the guardrails on purpose. Launch a small GPU VM in a project where the quota is set to zero and confirm it fails with a quota error. Trigger a test alert on your budget by temporarily lowering the threshold. A control you've never seen fire is a control you're guessing about.

Mistakes to avoid

Don't buy committed use discounts for GPUs before you know your steady baseline. A commitment on a model family you abandon in four months is paid for anyway. Commit to the floor of your usage, run the bursty part on Spot or on-demand, and revisit the commitment when the baseline moves.

Don't assume stopping a VM stops the bill. Persistent disks, reserved IPs and any capacity reservation keep charging. Vertex AI endpoints are the classic version of this: undeploying the model is what stops node billing, and an endpoint with a minimum node count above zero never scales to nothing.

Don't run Spot GPUs without checkpointing. If a job restarts from scratch every time it's preempted, you can end up paying more than on-demand. Save checkpoints to Cloud Storage on a regular interval and make the job resume from the latest one.

Don't leave the same quota wide open in every project. Most teams need GPUs in one or two regions. Open quota everywhere and a leaked credential or a bad script can spin up expensive hardware in places you never look.

If your GPU bill has grown faster than your usage and you'd rather have someone else do the review, Cloudverg offers a Cloud cost audit at $4,500/month (fixed scope, two weeks, renews monthly until cancelled). It's a read-only review of your Google Cloud account that ranks savings by dollars per month. It's one option next to doing the work in-house or using Google's own cost tools.

Frequently asked questions

Are Spot GPUs on Google Cloud worth using for training?

Yes, if the job can resume from a checkpoint. Spot capacity can be reclaimed at any time, so jobs that restart from zero lose the savings. Keep urgent or deadline-bound runs on on-demand capacity.

Why am I still billed after I stopped my GPU VM?

Stopping a VM ends the compute and accelerator charges, but attached persistent disks, static IP addresses and any reservations keep billing. Delete what you no longer need, or snapshot the disk and delete it.

How do I stop a Vertex AI endpoint from costing money when nobody uses it?

Undeploy the model from the endpoint, because deployed nodes bill by the hour even with no traffic. If you need it available, set a low minimum node count and use autoscaling, and know that a minimum above zero always bills.

Monthly plan

Want help with this? Cloud cost audit

$4,500/month

2 weeks · Starts within 10 business days

A two-week, read-only review of your AWS, Azure, Google Cloud or Oracle bill, with every saving ranked by dollars per month.

Renews monthly. Cancel any time.
Prefer to pay once?

Pay $4,500 once for one month of the Cloud cost audit. It ends on its own, nothing renews.

What is included

Related guides

More cloud costs guides   Cloud cost audit

Smallest way to start

Get a senior architect on your problem this week

Ninety minutes a month on the cloud, AI or security question that is blocking you, a pre-read of your material and a written summary within two business days.

$450/month

Renews monthly. Cancel any time.
Prefer to pay once?

Pay $450 once for one month of the Expert architecture session. It ends on its own, nothing renews.