How we optimized infrastructure spend at GitLab

This post introduces a five-stage framework for infrastructure spend optimization at GitLab, detailing each stage with specific examples. Stage 1 (Basic Cost Visibility) involves using GCP's Default Billing Export to understand high-level spend. Stage 2 (Cost Allocation) uses GCP labels and handbook standards to tie costs to business metrics like CI runners and employee usage. Stage 3 (Optimize Usage Efficiency) highlights specific optimizations for CI runners, object storage (reducing 900TB of Postgres backups), and network usage (downloading runner artifacts directly from GCS). Stage 4 (Measure Business Outcomes vs Spend) discusses analyzing complex changes like the rollout of advanced global search. Stage 5 (Predict Future Spend) is an ongoing effort. The post also outlines the workflow and planning process using an issue board and prioritization factors (cost savings, customer impact, future potential cost impact, effort required).