Databricks costs explained: what you're paying for, where the bill leaks and how to cut it
A Databricks bill is DBUs times a price that depends on the compute type, plus cloud machines on classic compute. Here's what moves the number, why idle clusters and warehouses cost so much, and the settings and queries that bring it down.
part 7 of 7 · Data and AI that hold up in productionthe ideaCompute type sets the DBU price. Idle time keeps the meter running.
after reading, you can- Tell which compute type a workload belongs on, starting with what a DBU actually measures.
- Run a billing-table query that splits your Databricks spend by product and by team tag.
- Set auto termination, auto stop, policies and budgets so idle compute stops charging you.
A Databricks bill has two halves, and most surprises come from the half nobody watches. You pay Databricks for DBUs, and on classic compute you also pay your cloud provider for the machines underneath. This guide walks through what each part measures, where money leaks, and the settings and queries that bring it back under control. There are no invented prices here. Rates change by cloud, region and contract, so we show you how to find yours.
You pay Databricks for the work your data jobs do, and a cluster nobody switches off keeps charging
Databricks is a platform where companies store, clean and analyse data and build AI on top of it. Every time a job runs, a dashboard refreshes or an analyst runs a query, a pool of computers does the work. Databricks measures that work in a unit it calls a DBU and charges for each one at a rate that depends on the kind of work. On the older setup, those computers sit in your own cloud account, so your cloud provider sends a second bill for them. On the newer serverless setup, Databricks runs the computers and the DBU price covers both. Nothing caps the bill by default. A cluster that nobody switches off keeps charging all weekend.
It works like a taxi meter. The meter runs while the car is booked, whether you're moving or parked outside a shop. A bigger car ticks faster. Serverless is the taxi that leaves a few minutes after you get out, and classic compute is a rented car you pay for until you hand back the keys.
- Finance and FinOps teams
- Heads of data and analytics
- Databricks platform admins
- Data engineers who schedule jobs
- BI leads running dashboards
Why the Databricks bill keeps surprising people
Databricks sells pay-as-you-go with per-second billing and no upfront fee. That makes it easy to start and easy to lose track of. Spend follows behaviour: who left an interactive cluster up, which dashboard polls a warehouse every few minutes, which nightly job runs on the expensive compute type because someone copied an old config.
There's also a timing problem. Usage records can take up to a day to show up in the billing table, and budget alert emails can lag by up to 24 hours too. A runaway job on a Friday evening can burn through a weekend of compute before anyone gets an email. On Hacker News, one engineer described a company that dropped Databricks after the first bill came in far above what it expected. That's the failure we'd like you to avoid, and almost all of it is avoidable with settings that already exist.
-
01 Someone starts work
Work arrives. Usually it's a scheduled job or a notebook, though dashboard refreshes and model endpoints count too.
-
02 Compute type is picked
All-purpose, jobs, serverless or a SQL warehouse. This choice sets the SKU, and the SKU sets the price per DBU.
-
03 DBUs tick up
While the compute is up, DBUs accrue per second. Idle time counts until the cluster terminates or the warehouse stops.
-
04 Cloud bills the machines
On classic compute, your AWS, Azure or Google account pays separately for the VMs, disks and network traffic.
-
05 Usage lands in the table
Each record goes into system.billing.usage with the SKU, tags and who ran it, usually within 12 hours.
For engineers: the usage table records DBUs, not dollars. To get a list-price dollar figure you join it to system.billing.list_prices on the SKU and the time window. That number still won't match your invoice if you have a discount, because both the table price and the budgets feature use list price. Keep your contract rate handy and apply it yourself.
Where the money actually goes
The compute type matters more than almost anything else, because two jobs doing identical work can sit on SKUs with very different prices. Databricks' own cost guidance says non-interactive work costs significantly less on job compute than on all-purpose compute, and that a SQL warehouse is the most cost-efficient engine for interactive SQL. Most avoidable spend we'd look for comes from work running on the wrong one.
| Compute type | Who pays for the machines | What keeps it charging | Main cost lever |
|---|---|---|---|
| All-purpose (classic) | Your cloud account, billed separately | Stays up until auto termination fires, or forever if it's switched off | Auto termination, compute policies, and moving scheduled work off it |
| Jobs compute (classic) | Your cloud account, billed separately | Runs for the job; pools keep idle VMs that your cloud still bills | Right-sizing, autoscaling, spot workers with an on-demand driver |
| Serverless jobs and pipelines | Included in the DBU price | Performance-optimized mode, the default, uses more DBUs | Standard mode for batch work that can wait 4 to 6 minutes to start |
| Serverless SQL warehouse | Included in the DBU price | Auto stop, 10 minutes by default; anything polling it keeps it awake | Auto stop, sizing, statement timeouts |
| Pro or classic SQL warehouse | Your cloud account, billed separately | Auto stop, 45 minutes by default, and a slow start that tempts people to leave it on | Moving to serverless where it's available |
All-purpose compute is the usual leak. It's the cluster people open notebooks on, so it gets shared and gets big. Then someone points a nightly job at it because it's already running. Auto terminationdefinitionA cluster setting that shuts compute down after a set number of idle minutes. On SQL warehouses the same idea is called auto stop. can be set anywhere from 10 to 10,000 minutes, or turned off with a zero, and idle compute keeps charging DBUs and cloud costs for the whole inactivity period.
SQL warehouses have their own trap. Pro and classic warehouses take about four minutes to start, so teams set a long auto stop, or none, to spare their analysts the wait. Databricks says as much in its cost guidance. Serverless warehouses start in seconds, which is the main reason they can be left to stop on their own.
- Two invoices. Databricks bills the DBUs and the cloud provider bills the machines under them
- You pick instance types, spot use and pool sizes
- Idle time costs you on both bills, right up until the cluster terminates
- Pro warehouses are the fallback where serverless isn't offered or you need custom networking
- One line: the DBU price includes the machines
- Databricks picks the machines and upgrades the runtime itself. You don't size VMs or patch versions
- Serverless SQL warehouses are up in seconds, so analysts won't notice a short auto stop
- Needs Unity Catalog; legacy workspaces don't get it
Serverless has two quieter costs of its own. Jobs and pipelines default to performance-optimized mode, which keeps warm capacity ready and uses more DBUs for the same work. Standard mode runs on the same SKU at the same price per DBU but uses fewer of them, and it typically takes 4 to 6 minutes to start. For a nightly batch job that nobody waits on, that's an easy trade. Scheduled refreshes of materialized views and streaming tables already default to standard.
The second one confuses finance teams. You can see serverless charges before anyone has run a serverless job. Predictive optimization and data quality monitoring run on serverless infrastructure and bill under the serverless jobs SKU. Separately, materialized views created in Databricks SQL refresh through a serverless pipeline, and those records show up under SQL with a pipeline ID. All of it is real work, but someone should decide they're worth it.
The meter runs while the compute is up, whether or not anyone is using it. Most savings come from making things stop.
Storage and networking sit outside the DBU entirely. Databricks says its pricing is based on compute, and that storage, networking and related costs depend on the services you choose and your cloud provider. One commenter on Hacker News made the same point from the other side: you still pay your object storage bill and its request charges on top of the compute. Sharing data across clouds or regions can add egress fees too.
How to find your own numbers
Don't start from a price list. Start from your own usage. Databricks recommends estimating serverless cost by running a representative workload and reading the billing table, and the same advice works for everything else. You need someone with access to system tables and about an hour.
-- list price only, not your invoice SELECT u.billing_origin_product, u.custom_tags['team'] AS team, SUM(u.usage_quantity * p.pricing.effective_list.default) AS list_usd FROM system.billing.usage u JOIN system.billing.list_prices p ON p.sku_name = u.sku_name AND u.usage_end_time >= p.price_start_time AND (p.price_end_time IS NULL OR u.usage_end_time < p.price_end_time) WHERE u.usage_date >= date_sub(current_date(), 30) GROUP BY ALL ORDER BY list_usd DESC; -- NULL team = spend nobody owns
Read the result twice. First by product: JOBS, SQL, ALL_PURPOSE, DLT, MODEL_SERVING and the others tell you which kind of work costs most. Then by tag, where a big NULL row means you can't say who spent it. Tags only apply to usage after you add them, so a missing tag today is a gap in every report you'll run later.
Two details trip people up. Corrections arrive as a retraction with a negative quantity plus a restatement, so always sum quantities rather than picking single rows. And the identity_metadata column shows who a workload ran as, which isn't always the person who owns the cluster. Databricks suggests joining to system.compute.clusters for the owner.
From a job finishing to the money showing up
- Run timeDBUs accrue per second
Nothing in Databricks stops the spend by default, apart from auto termination and auto stop.
- Within 12 hUsage record typically appears
Records in system.billing.usage are typically available within 12 hours. New workspaces can take longer.
- Up to 24 hBudget email may arrive
Budget alert emails can lag usage by up to a day. Unity Gateway budgets track spend near real time.
- LaterCorrections, if any
Fixes come as new rows. A retraction cancels the wrong record and a restatement replaces it, which is why you should always add rows up instead of reading one.
- Month endInvoice
Pay-as-you-go customers get a monthly bill from Databricks. On Azure you won't see one, because Microsoft bills it with the rest of your Azure usage.
What to do now
What to do this month, by who you are
- Ask for a monthly cost report broken down by product and by team, built from the billing tables.
- Agree which tags every workload must carry, such as business unit, project and environment.
- Ask whether a committed-use contract would fit the steady part of your usage. Everything you see in the tools is at list price.
- Set auto termination on every all-purpose cluster and cap size with compute policies, including max DBUs per hour.
- Set auto stop on every SQL warehouse. Warehouses created through the API default to classic unless you say otherwise.
- Set up budgets with email alerts for each workspace or tag, then import the usage dashboard so people can see the trend.
- Move scheduled jobs off all-purpose clusters onto job compute or serverless.
- Try standard mode on serverless batch jobs that have hours of slack, and compare a few runs.
- Put workers on spot instances and keep the driver on-demand, for jobs where a slower finish won't hurt anyone.
- List dashboards that refresh on a short schedule and ask whether anyone needs them that fresh.
- Set statement timeouts on shared warehouses so one runaway query can't run for days.
- Watch Peak Queued Queries before asking for a bigger warehouse.
Keep the bill from creeping back
A one-off cleanup saves money for a quarter. Then new clusters appear and old habits come back. What lasts is putting the rules where people create compute, so the cheap choice is also the default one.
Before: one big shared cluster and no attribution
Analysts, notebooks and scheduled jobs all run on one all-purpose cluster with auto termination off. Warehouses were created through the API as classic with a long auto stop. Nothing is tagged, so the monthly report is one number nobody can split.
After: policies decide the compute, and every dollar has a team tag
Jobs run on job compute or serverless, with standard mode for batch work that can wait. Analysts use a serverless warehouse with a short auto stop. Compute policies enforce auto termination, size limits and tags, and budgets plus the billing tables give every team its own number.
A 30-day plan to get the bill under control
- 01Week 1: measure
Run the cost-by-product query above and the job cost query from the docs. List the top ten jobs, clusters and warehouses by spend. Note how much has no tag.
- 02Week 1: stop the idle spend
Turn on auto termination for every all-purpose cluster and auto stop for every warehouse. One hour is the example Databricks gives for clusters, and the serverless warehouse default is 10 minutes.
- 03Week 2: put policies in front of compute
Write compute policies that require tags, limit instance types and set a max DBUs per hour, then take away unrestricted cluster creation from most users.
- 04Week 2: tag serverless too
Serverless usage policies are in Public Preview. They stamp tags on serverless notebooks, jobs and pipelines, so give each team its own and its spend stops landing in the NULL row.
- 05Week 3: move work to the right compute
Move scheduled jobs off all-purpose clusters. Test standard mode on serverless batch jobs, and try Photon on regular jobs to see if they finish cheaper as well as faster.
- 06Week 4: set budgets and a monthly review
Create budgets per workspace or tag with email alerts, then put a monthly cost review in the calendar with each team's owner in the room.
For streaming, check whether the business really needs data every second. Databricks points out that always-on streaming runs compute around the clock, and that the AvailableNow trigger lets incremental work run a few times a day instead. A feed that's read once each morning doesn't need a cluster up all night.
If the bill spikes
If this month's Databricks bill jumps
Work in this order. Stop whatever's still running first, then find out what it was, because the billing table can be hours behind and the meter is still running while you investigate.
- 01Containfirst hour
- Open the compute and SQL warehouse lists in each workspace and stop anything idle or unexpectedly large.
- Check for long-running queries and jobs stuck in retries. Cancel them before you analyse anything.
- 02Find the sourcefirst day
- Query system.billing.usage by billing_origin_product, then by usage_metadata job_id, warehouse_id or cluster_id. Jobs on all-purpose clusters only show a cluster_id.
- Use identity_metadata.run_as to see who or what ran it. Join to system.compute.clusters for the cluster owner.
- 03Fix the causefirst week
- Whatever was missing on the resources involved, add it now: auto termination, auto stop or a statement timeout.
- Move the workload to the right compute type, or into standard mode if it's a serverless batch job.
- 04Prevent a repeatfirst two weeks
- Turn the fix into a compute policy, so the next cluster gets it automatically.
- Add a budget alert on the tag or workspace involved, and remember emails can lag by a day.
- 05Report and learnmonth end
- Show finance the spike in list-price dollars and what you fixed. Apply the discount separately, since the billing table doesn't know it.
- If it came from a contract question, talk to your Databricks account team about committed-use terms.
How this plays out
Three typical situations
- the setup
- A retailer's analytics team moved its sales dashboards onto a serverless SQL warehouse with the default 10-minute auto stop. One dashboard is set to refresh every five minutes.
- what happens
- The warehouse never reaches 10 idle minutes, so it runs around the clock. Nobody notices for weeks, because the dashboard is fast and the cost line just reads SQL.
- what to do
- Ask the business how fresh the numbers need to be, then change the refresh schedule. Query the usage table for the warehouse_id and compare night-time usage before and after.
- the setup
- A mid-size insurer's data team runs its notebooks on a large all-purpose cluster with auto termination switched off. Over time, a dozen scheduled jobs were pointed at it too.
- what happens
- The cluster runs every hour of every day on the all-purpose SKU, and the cloud provider bills its VMs all night. Finance sees two growing bills and no way to split them by team.
- what to do
- Move each scheduled job to job compute or serverless, turn auto termination on, and put a compute policy in front of new clusters that requires tags.
- the setup
- A bank's platform team hasn't enabled serverless notebooks for anyone yet. The monthly report still shows a serverless jobs line, and finance asks what it is.
- what happens
- The line comes from predictive optimization and data quality monitoring, which run on serverless infrastructure and bill under the serverless jobs SKU. Materialized view refreshes add serverless usage too, logged under SQL.
- what to do
- Split the usage with billing_origin_product, and look for a pipeline ID on SQL records. Then decide, table by table, whether each feature pays for itself, and record who owns it.
We usually start from the billing tables you already have. A cost dashboard built on them shows each team its own number, and then we sit with the people who own the biggest workloads and move each one to the compute it belongs on. Policies, tags and budgets go in at the same time, so the savings hold. The Databricks overview covers our wider platform work, and you can hire Databricks specialists for a fixed piece of work. If you'd like a review of where you stand first, book an assessment.
What to take from this
- 01
Classic compute means two bills: DBUs from Databricks and machines from your cloud. Serverless puts both in the DBU price.
- 02
The compute type sets the price per DBU. Scheduled work on all-purpose clusters is the most common leak.
- 03
Idle compute keeps charging. Auto termination and auto stop on everything is the cheapest fix there is.
- 04
Serverless jobs run in performance-optimized mode unless you change it. For batch work that can wait a few minutes, standard mode uses fewer DBUs.
- 05
Tag from day one. Tags only apply going forward, and untagged spend can't be split later.
- 06
Budgets use list price, can lag by a day and mostly only alert. Policies and timeouts are what limit spend.
01How much does Databricks cost per month?
There's no honest single number. Your bill is the DBUs you use times the list price of each SKU, minus any contract discount, plus your cloud provider's charges for machines on classic compute. Rates differ by cloud, region and compute type. Run a representative workload, then read system.billing.usage to see what it actually used.
02What is a DBU in Databricks?
It's the unit Databricks measures and bills work in. A job that runs on more compute or chews through more data uses more of them. What you pay for each DBU depends on the SKU it runs under, which is why moving a job to a different compute type changes what it costs.
03Is serverless cheaper than classic compute in Databricks, or just easier?
It depends on how busy the compute is. Serverless includes the machines in the DBU price, and serverless SQL warehouses start in seconds, so a short auto stop is practical and idle time stays small. Classic compute gives you control over instance types, spot workers and pools instead. Databricks' advice is to benchmark a representative workload and read the billing table, so run a few real jobs both ways and compare.
04Why do I see serverless charges when we don't use serverless?
Predictive optimization and data quality monitoring run on serverless infrastructure and bill under the serverless jobs SKU. Materialized views created in Databricks SQL also refresh through a serverless pipeline, and those records appear under SQL with a pipeline ID. Split the usage with billing_origin_product to see which feature it is.
05Can a Databricks budget stop spending?
Mostly no. Most budgets only alert, and the emails can arrive up to a day late. Blocking is limited to certain budget types, such as Unity Gateway budgets, and that enforcement is approximate. Use auto termination, auto stop, statement timeouts and compute policies to limit spend.
06How do I see Databricks costs by team or project?
Tag workspaces, clusters, pools and SQL warehouses, and use serverless usage policies for serverless work. The tags flow into the custom_tags column of system.billing.usage, where you can group by them. Tags only apply to usage after you add them.
07What auto stop do Databricks SQL warehouses get by default, and can I lower it?
Serverless SQL warehouses default to 10 minutes, with a minimum of 5 in the UI and as low as 1 minute through the API. Pro and classic warehouses default to 45 minutes, with a minimum of 10. Idle warehouses keep charging until they stop.
Three questions, about a minute
Pick an answer and we'll tell you if it's right, and why it is or isn't. The score stays in this browser.
-
Q1A nightly ETL job runs on the team's always-on all-purpose cluster. What change usually cuts its cost most?
show the answer
B. Move it to job compute or serverless and let the cluster terminate Non-interactive work costs significantly less on job compute than on all-purpose compute, and a cluster that terminates stops charging both DBUs and cloud VMs.
-
Q2Finance notices the budget email shows more spend than the invoice will. What's the most likely reason?
show the answer
C. Budgets use list price, not your discount Budgets multiply usage by the SKU list price. A committed-use discount or credits lower the invoice but never show up in the budget figure.
-
Q3A serverless batch job runs at 2 a.m. and nobody needs its output before 8 a.m. Which setting is worth testing?
show the answer
D. Standard mode, which uses fewer DBUs Standard mode starts in about 4 to 6 minutes but consumes fewer DBUs on the same SKU. With six hours of slack, the slower start doesn't matter.