Cost Management and FinOps on GCP: Budgets, Billing Reports, Recommender, Labels, Quotas and Right-Sizing
FinOps in One Minute
FinOps is a culture where engineering, finance and business share responsibility for cloud cost. Cycle: Inform (see the cost) → Optimize (reduce waste) → Operate (build habits and governance).
Tools
| Tool | Use |
|---|---|
| Billing reports | Charts of cost by project, service, SKU, label |
| Budgets and alerts | Email, Pub/Sub or Monitoring alerts at thresholds |
| Billing export to BigQuery | Detailed cost data for custom analysis and dashboards in Looker Studio |
| Recommender (Active Assist) | Suggestions: delete idle VMs and disks, right-size VMs, buy commitments, remove unused IAM roles |
| Cost Table / Cost breakdown / Commitments analysis | Understand savings and coverage |
| Labels | Allocate cost to teams and apps |
| Quotas and custom quotas | Limit usage to avoid runaway costs |
| Carbon Footprint | Emissions linked to your usage |
Budgets With Automation
bash
gcloud billing budgets create --billing-account=ABCDEF-123456-ABCDEF --display-name="shop-prod-monthly" \
--filter-projects=projects/shop-prod --budget-amount=500USD \
--threshold-rule=percent=0.5 --threshold-rule=percent=0.9 --threshold-rule=percent=1.0,basis=forecasted-spend \
--notifications-rule-pubsub-topic=projects/ops-proj/topics/budget-alerts
Budgets do not stop spending A budget only notifies. To act automatically, send alerts to Pub/Sub and run a Cloud Run function that disables resources or billing for non-production projects. Never disable billing on production without a plan.
BigQuery Billing Analysis
sql
SELECT service.description AS service, ROUND(SUM(cost), 2) AS cost
FROM `ops-proj.billing.gcp_billing_export_v1_ABCDEF`
WHERE DATE(usage_start_time) >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY service ORDER BY cost DESC LIMIT 10;
SELECT l.value AS team, ROUND(SUM(cost), 2) AS cost
FROM `ops-proj.billing.gcp_billing_export_v1_ABCDEF`, UNNEST(labels) AS l
WHERE l.key = 'team' GROUP BY team ORDER BY cost DESC;
Right-Sizing and Scheduling
bash
gcloud recommender recommendations list --project=my-proj --location=asia-south1-a --recommender=google.compute.instance.MachineTypeRecommender
gcloud recommender recommendations list --project=my-proj --location=asia-south1-a --recommender=google.compute.instance.IdleResourceRecommender
gcloud compute resource-policies create instance-schedule office-hours --region=asia-south1 --vm-start-schedule="0 8 * * 1-5" --vm-stop-schedule="0 20 * * 1-5" --timezone="Asia/Kolkata"
Optimization Checklist
| Area | Action |
|---|---|
| Compute | Right-size, schedule non-prod, Spot for batch, commit for steady, Autopilot/Cloud Run for spiky |
| Storage | Lifecycle rules, Autoclass, delete old snapshots, correct disk type |
| Network | CDN, same-region traffic, Standard Tier where fine |
| Data | BigQuery partitioning, expiration, slot reservations for heavy use, short log retention |
| Databases | Right-size, remove unused replicas, stop dev databases at night |
| Governance | Labels required, budgets per team, monthly review, quotas |
Quotas
- Quotas limit resources per project (CPUs per region, API requests). Some protect you, some can block growth
- Request increases early before launches and in DR regions
- Set custom quotas (for example BigQuery bytes per day per user) to prevent bill spikes
Practice
- Create a budget with three thresholds and a Pub/Sub topic
- Add
teamandenvlabels to resources and view cost by label - Open Recommender and list one suggestion
- Create a schedule that stops dev VMs at night
- Write a monthly cost review checklist
Conclusion
Make cost visible with reports, labels and BigQuery export, control it with budgets, quotas and automation, and reduce it with Recommender, right-sizing, scheduling and commitments. Review monthly.
Quick Summary: FinOps; tools; budgets; analysis; right-sizing; checklist; quotas.

