Cost and Performance Engineering

Measure and reduce the cost of warehouses, clusters and storage while keeping pipelines fast, using FinOps habits and concrete optimisation techniques.

Advanced · about 4 hours · difficulty 3/5

Learn first: How Cloud Data Warehouses Work, Cloud Fundamentals for Data Engineers

Data platforms are often one of the biggest lines on a company's cloud bill. Engineers who can cut cost without hurting users are valued highly, especially in cost-conscious Indian startups.

Know where the money goes

  • Compute: warehouse credits or slots, Spark clusters, streaming jobs running 24x7.
  • Storage: usually cheaper, but duplicate copies, old snapshots and unexpired time travel add up.
  • Data transfer: cross-region and internet egress.
  • Tools: per-row ingestion pricing and SaaS licences.

Use billing exports, warehouse query history and tags to attribute cost to teams and pipelines.

Common savings

  • Select fewer columns; partition and cluster large tables; filter early.
  • Switch frequent full refreshes to incremental models.
  • Right-size warehouses and clusters; auto-suspend and auto-terminate; use spot instances for batch.
  • Materialize expensive, frequently used logic once instead of recomputing in every dashboard query.
  • Compact small files and expire old snapshots.
  • Lower refresh frequency where the business does not need it (hourly vs every 5 minutes).
  • Delete unused tables and pipelines; lineage and usage stats tell you which.

Performance vs cost

Faster is not always cheaper: a bigger warehouse may finish sooner for a similar cost, or may just burn credits. Measure cost per pipeline run and cost per query alongside latency, and agree SLAs so you do not over-engineer freshness.

FinOps culture

Budgets, alerts, regular cost reviews and showing teams their own spend. The FinOps Foundation has good free material.

Pitfalls

  • Optimising a pipeline that costs very little while ignoring the top three spenders.
  • Cutting cost by removing tests or monitoring.

You are ready to move on when you can produce a cost breakdown for your project's pipelines, identify the top cost driver, apply one optimisation and show the measured saving.

Key concepts

  • Compute, storage and egress costs
  • Cost attribution and tagging
  • Query optimisation for cost
  • Right-sizing and auto-suspend
  • Incremental vs full refresh savings
  • Spot instances
  • FinOps practices

Mini project

Using your warehouse's query history (BigQuery INFORMATION_SCHEMA jobs or Snowflake query history), list the 10 most expensive queries in your project, optimise the top two and report bytes or credits before and after.

Check yourself

A dashboard refreshes every 5 minutes but users check it twice a day. What would you change, and how would you justify it to the stakeholder?

Free resources