Skip to content

Optimise Databricks costs

We make DBU usage visible by team and job, and use compute and storage more efficiently. We’re building a Databricks data platform for Fokker Services Group.

At Fokker Services Group, we're building a scalable data platform on Databricks that brings data together in one place

“For us, the data platform is the central place where data comes together. […]” Daan Mastenbroek, Lead Data Engineer and Architect, Fokker Services Group. This wasn't a cost-focused project; it shows how we build on Databricks, with data cleaned and modelled according to the medallion architecture.

Read the case study

Why is our Databricks bill rising, and which team is responsible?

Interactive clusters keep running after working hours, jobs run on all-purpose compute, and without tags, no one knows who is responsible for the usage. Reducing Databricks costs starts with seeing where the DBU’s go, by workspace, job and team.

Book a call

Databricks DBU usage falls through four mutually reinforcing changes

Discuss your Databricks usage

Tags and cost dashboard

Tags by team, project and environment, using system.billing.usage and the usage dashboard as sources. This gives every DBU record an owner.

Compute for each type of work

Scheduled jobs on jobs compute, SQL queries on a SQL warehouse, and all-purpose clusters only for people developing interactively.

Stop when idle

Auto-termination for clusters, Auto Stop for warehouses, and compute policies that limit size and cluster type for every user.

Efficient tables

Predictive optimization for OPTIMIZE and VACUUM, across the medallion layers we set up for Fokker Services Group.

From the billing table to policies that keep usage in check

  1. Attribute usage

    Set up a usage dashboard, added tags and identified the most expensive jobs, clusters and warehouses in the billing table.

  2. Adjust compute

    Moved jobs to jobs compute, shortened idle times, measured Photon for each job and right-sized clusters.

  3. Set limits and monitor

    Compute policies, budgets with email alerts and regular cost reviews with the teams responsible for the usage.

Are we simply using Databricks a lot, or is our workspace set up too expensively?

Talk it through with us

A good fit if

Your bill is growing faster than the number of jobs and users, you cannot tell which team is responsible for which usage, or clusters and warehouses keep running when nobody is using them.

Not a good fit if

You have one small workspace with serverless compute and a few jobs. Your team can often set up tags and a budget with alerts themselves.

What determines the scope

How many workspaces, jobs, clusters and warehouses you have, whether Unity Catalog is already enabled, how much streaming is running and whether we can change job code.

Does greater efficiency come at the expense of speed?

Not necessarily. For jobs that run frequently, Databricks recommends measuring whether Photon is not only faster but also cheaper. Jobs that finish sooner tie up compute for less time.

Classic clusters, serverless or SQL warehouses: which compute option keeps your bill down?

Jobs compute

Choose this when scheduled pipelines and notebooks run unattended. The compute starts for the job and stops afterwards; Databricks says this costs less than all-purpose compute.

Serverless compute

Choose this when waiting for clusters to start leads people to leave them running. Serverless starts quickly and scales down sooner. Our advice: attribute usage with usage policies.

SQL warehouses

Choose this when analysts and BI tools mainly run SQL. According to Databricks, it’s the most cost-efficient option for interactive SQL, with Photon enabled by default and Auto Stop when the warehouse is idle.

As a Databricks Partner, we build lakehouses that remain affordable after delivery

Data Science Lab has worked with data and AI since 2016 as a Databricks Partner and Microsoft Partner. We’ve built Databricks platforms on Azure for clients including Vivara and the Koninklijk Concertgebouworkest, and are building one for Fokker Services Group.

Book an introductory meeting

Your most expensive jobs and clusters from last month are the starting point for our first conversation

Stef Stoelwinder

Stef Stoelwinder

Business Development

Stef is your point of contact. In our first conversation, we’ll look at your workspaces, where your DBU’s go and what we can make more cost-efficient first.

Which Databricks workspace costs your team more than you can account for?

Tell us what’s running and where you can’t explain the usage. We’ll reply by email or arrange an initial call.

Enter a valid email address.

Let us know how we can help you.

Frequently asked questions

First, attribute usage using tags and the billing table. Then choose the right compute for each type of work: jobs compute for scheduled jobs, SQL warehouses for SQL, and auto-termination for interactive clusters. Compute policies and budgets help keep costs under control.

If you’re still setting up Databricks, read about Databricks implementation.

A Databricks Unit (DBU) is a standardised unit of computing power that Databricks uses to measure and bill for usage. The number of DBU’s a workload consumes depends, among other things, on the compute and the amount of data processed.

With classic compute, you also pay for virtual machines, disks and networking in Azure. With serverless, the machines are included in the DBU price. Understanding that difference is the starting point for any cost optimisation.

In the system table system.billing.usage. Each record identifies the workspace, SKU, number of DBU’s and your own tags, including for jobs, serverless and model serving. An account administrator can also import a usage dashboard showing usage by product, SKU and tag, as well as the most expensive resource.

That dashboard requires a workspace with Unity Catalog; see setting up Unity Catalog.

Databricks recommends, at a minimum, tags for business unit and project, plus environment if you want to separate development, testing and production costs. You add them to workspaces, clusters, SQL warehouses and pools.

Tags only apply to usage from the moment you add them. You cannot add missing tags retrospectively, so it is better to start with too much detail than too little.

A compute policy controls what users can start: which machine types, how many workers, whether autoscaling and auto-termination are required, and the maximum DBU’s per hour. A job-only policy permits only jobs compute.

A budget tracks spending across the entire account or filtered by workspace and tags, and sends an email when a threshold is reached.

Yes. Smaller, well-organised files mean less work per query. Liquid clustering replaces partitioning and ZORDER, and you can change the clustering keys later without rewriting all the data.

VACUUM removes files the table no longer uses, reducing storage costs. Predictive optimization runs OPTIMIZE, VACUUM and ANALYZE automatically on managed tables in Unity Catalog.

Not if the business does not need data that is only seconds old. A continuously running stream keeps compute occupied all day. For incremental processing without a low-latency requirement, Databricks recommends Structured Streaming with the AvailableNow trigger: the job processes what has arrived, then stops.

Spot instances are suitable for jobs that can finish a little later, with the driver always running on a regular machine.

Here, Databricks is already running and the focus is on usage. If you are moving from another system, read about migrating to Databricks. If you are looking for someone to join your own team, read about hiring a Databricks engineer.

If you run on Microsoft Fabric, costs are based on capacity rather than DBU’s: read about optimising Microsoft Fabric costs.