agentleFS
ai-enhanced-engineerai-enhanced-engineer/aiee-skills/skills/gcp-finops/SKILL.md

gcp-finops

Skill4 starsChanged 5 months agoMITView on GitHub

GCP cost engineering and financial operations. Analyze billing, optimize resources, manage budgets, reduce spending. Use when discussing GCP costs, budget optimization, pricing decisions, cost analysis, or spend management.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

GCP FinOps

Cost engineering and financial operations patterns for Google Cloud Platform.

Note: Pricing estimates are approximate and based on us-central1 region. Use the GCP Pricing Calculator for current rates.

Cost Optimization Framework

The FinOps Cycle

    ┌─────────────┐
    │   INFORM    │ ← Visibility into spending
    │  (analyze)  │
    └──────┬──────┘
           │
    ┌──────▼──────┐
    │  OPTIMIZE   │ ← Right-size, eliminate waste
    │  (reduce)   │
    └──────┬──────┘
           │
    ┌──────▼──────┐
    │   OPERATE   │ ← Maintain efficiency
    │  (control)  │
    └─────────────┘

Quick Cost Reference

Compute (Cloud Run)

ConfigCost/hourMonthly (24/7)Use Case
0.5 vCPU, 256MB$0.0144$10.50Minimal API
1 vCPU, 512MB$0.0324$23.60Standard API
2 vCPU, 1GB$0.0648$47.20Heavy processing

Key insight: Scale-to-zero saves 80-95% for variable workloads.

GPU Instances (Cloud Run with L4)

ConfigCost/GPU-secGPU Cost/hourGPU Monthly (24/7)Use Case
4 vCPU, 16GB + L4 (min)$0.0001867~$0.67~$490Light GPU inference
8 vCPU, 32GB + L4 (rec)$0.0001867~$0.67~$490Production GPU inference

Note: Table shows GPU cost only. vCPU/memory charges are additional (see Compute table above). Total cost for 8 vCPU/32GB + L4 is ~$0.67 GPU + ~$0.19 vCPU/mem = ~$0.86/hr.

Key constraints:

  • Minimum instance spec: 4 vCPU / 16 GiB RAM (hard GCP requirement)
  • Recommended: 8 vCPU / 32 GiB RAM for production workloads
  • Cold start penalty: 20-40s (GPU initialization)
  • Min-instances break-even: ~2,700 jobs/month justifies keeping 1 instance warm
  • GPU billing is per-second ($0.0001867/GPU-sec), vCPU/memory billed separately

Caution: Agent-generated GPU cost estimates are frequently wrong (e.g., confusing $/hr with $/min — a 60x error). Cross-check against Cloud Run pricing before committing to a budget — unverified estimates have shipped with 60x errors that made the FinOps recommendation actively harmful.

Database (Cloud SQL)

TierMonthlyRAMBest For
db-f1-micro$160.6GBDev only
db-g1-small$281.7GBStaging
db-standard-1$683.75GBSmall prod
db-standard-2$1367.5GBMedium prod

Key insight: +35% for HA (REGIONAL).

Cache (Memorystore Redis)

Pricing model: $0.049/GB/hour (BASIC tier, us-east4)

SizeBASICSTANDARD_HA
1GB~$35/mo~$70/mo
2GB~$72/mo~$144/mo
5GB~$180/mo~$360/mo

Key insights:

  • 2x cost for HA (STANDARD_HA), but includes automatic failover
  • Pricing is hourly: $0.049/GB/hour x 730 hours/month = ~$35.77/GB/month
  • Custom sizes available: 1GB minimum, 300GB maximum (BASIC tier)
  • Region variations: us-east4 typically cheapest, check calculator for others

Cost calculation formula:

Monthly cost = Memory_GB x $0.049/hour x 730 hours/month x HA_multiplier

Where:
  HA_multiplier = 1.0 (BASIC) or 2.0 (STANDARD_HA)

Example: 2GB STANDARD_HA
  = 2 x $0.049 x 730 x 2.0
  = $143.08/month

Right-Sizing Decision Matrix

Current StateRecommendationSavings
CPU <10% utilizationDownsize tier30-50%
Memory <30% usedReduce RAM allocation20-40%
Scale-to-zero disabledEnable for dev/staging80-95%
HA in stagingDisable HA26-35%
SSD in stagingSwitch to HDD47%

Budget Alert Thresholds

ThresholdActionAudience
50%InformationalTeam
75%Review spendingTech Lead
90%Reduce non-essentialTeam Lead
100%Emergency reviewManagement

See reference.md for detailed pricing research methods and optimization patterns.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.