Duczer East
Healthcare

In-perimeter AI on governed clinical and operational data.

Financial Services

Private AI and data platforms built to clear model-risk and audit review.

Financial services

Private AI, KYC/AML, API gateways and data governance for banks.

Insurance

Change data capture, governed agents and integration for insurers.

Healthcare

PHI document intelligence, FHIR APIs and in-perimeter AI for health systems and plans.

GuideAI & Data Engineering5 min read

Databricks cost optimization: find the long-running jobs first

A triage worksheet for Spark job cost, built on the billing system table

Authored byCo-Founder and Managing Partner, Duczer East
Part of the Insights topic: Private AI & Data Architecture
On this page
  1. Why costs jump after the first quarter
  2. How do I find the most expensive Databricks jobs?
  3. How do I find the long-running jobs?
  4. Cluster, job and serverless levers
  5. How do I tag spend for serverless?
  6. A weekly review that fits in 30 minutes
  7. Questions we hear
  8. A first engagement

To cut Databricks cost, rank your jobs by Databricks units (DBUs) used, find the owner of each of the top ten, and fix the ones that run longest or run without need. Look first at the longest jobs, any all-purpose clusters left on, and spend with no tag. The data to do this is already in the billing system table.

Why costs jump after the first quarter

Early on, a few people run a few jobs. Then jobs multiply, schedules overlap, clusters stay up, and teams share a workspace. Databricks bills compute in DBUs per second, so idle and repeated work shows up as cost without any alarm. Nobody sees it until finance asks.

How do I find the most expensive Databricks jobs?

Databricks records every billable record in system.billing.usage. Four columns do most of the work: the product that generated the usage, the job ID, the cluster ID and the custom tags. Use them like this.

QuestionWhere to lookWatch for
Which jobs cost most?Product JOBS, grouped by job ID or job name, summed by usage quantityRecords can be corrected later, so sum all records and drop zero totals
Which clusters cost most?Group by cluster ID. Join to the clusters table for the ownerFor all-purpose compute, the run-as identity shows the creator, not the owner
Who spends what?Group by the custom tags columnThe share of spend with no team tag
Serverless jobs?The job ID is filled in for serverless jobs and job computeIt is empty for all-purpose compute

Two details from the Databricks reference matter here. When a record needs a correction, Databricks adds a retraction with a negative quantity and, usually, a restatement with the corrected values. Summing every record nets them out. And records are typically available within 12 hours, so this week's numbers are never final on Monday morning.

How do I find the long-running jobs?

Cost shows what a job spends. Run time shows why. The jobs system tables sit in system.lakeflow, and Databricks lists four: jobs, job_tasks, job_run_timeline and job_task_run_timeline.

  1. Sum period_end_time - period_start_time per run ID in job_run_timeline. Runs longer than one hour are split into hourly rows, so you must add the slices.
  2. Take the average, the 90th percentile and the 95th percentile run time per job over the last seven days. The Databricks jobs reference shows a query of this shape.
  3. Sort by average run time and read the top ten next to the cost ranking from the billing table.
  4. Check multi-task jobs in job_task_run_timeline. The duration columns in job_run_timeline are filled only for single-task jobs created with the legacy Jobs APIs, and show 0 for other runs.

These tables are retained for 395 days and records are typically available within an hour. To price a run, join billing usage for the JOBS product to system.billing.list_prices on SKU and time window, multiply and group by job and run. Databricks notes that cost per job on all-purpose compute is approximate, because that compute is shared.

Cluster, job and serverless levers

LeverWhat Databricks documentsWhat to check
Compute for production jobsDatabricks does not recommend all-purpose compute for production jobs. For notebooks, Python scripts, wheels and JAR tasks it recommends serverless jobs, and Spark Submit tasks use classic jobs computeScheduled jobs still running on all-purpose clusters
Auto-terminationThe inactivity period must be 10 to 10,000 minutes. Idle compute keeps accruing DBU and cloud instance charges until it endsClusters with the setting cleared or set to 0
Compute policiesAdmins can limit maximum DBUs per hour, set a maximum number of compute resources per user and define rules for custom tagsWhether every team has a policy and the limits fit real work
Serverless jobs modeFor scheduled batch jobs, standard mode may lower cost if runs still meet completion and freshness needs. New serverless jobs default to performance-optimizedJobs that do not need fast start or tight timing
Shared job computeTasks can share job compute. It stays on and idle while other tasks runLong job graphs where one wide cluster waits for a slow task
  • Check jobs that run on a schedule but whose output nobody reads. Switch them off after asking the owner.
  • Test serverless on a representative run before you move a job, and compare cost and finish time. Databricks says prices vary by SKU, cloud and region and that committed use contracts change the rate, so read your own price list and contract.
  • Auto-termination counts commands as activity. Databricks says it does not see DStreams activity, so turn it off for those clusters or move to Structured Streaming.

How do I tag spend for serverless?

Serverless usage policies attach custom tags to serverless activity, and those tags appear in the custom_tags column of the billing table. The Azure Databricks documentation marks the feature Public Preview and lists limits: existing notebooks, jobs and pipelines are not assigned a policy automatically, policies do not tag classic compute, and pipelines triggered by a job do not inherit the job's policy. Plan the tag rollout around those limits.

A weekly review that fits in 30 minutes

  1. Open the top ten jobs by units this week and compare with last week.
  2. List new spend with no team tag and assign an owner.
  3. Flag any job that ran far longer than its usual time.
  4. Record each decision and the person who owns it.

Our worksheet is a starting point. If you are weighing a move to another platform first, read Cloudera vs Databricks vs Snowflake.

Questions we hear

Is serverless always cheaper than classic job compute? No fixed answer exists. Databricks says only that standard mode may lower cost for scheduled batch work that still meets its timing needs. Test your own runs.

Why do my job totals change after the fact? Databricks corrects billing records with a retraction and a restatement. Sum all records and the totals settle.

Where does the owner of an all-purpose cluster show up? The run-as identity shows who created the compute. Join to the clusters table on cluster ID for the owner.

A first engagement

Duczer East offers a job cost triage: we run the billing and jobs queries on your own data, rank the top ten jobs by cost and run time, name an owner for each, and hand back a fix list and a weekly review format.

Sources checked November 24, 2026:

Related: databricks consulting · hadoop to Databricks migration: what breaks

Frequently asked questions

How do I see what each Databricks job costs?

Query the billing system table, filter to the jobs product, group by job ID and add up the usage quantity. Records usually arrive within about 12 hours.

Why are all-purpose clusters hard to charge back?

Usage on all-purpose compute carries no job ID, so you group by cluster ID and join to the cluster table to find the owner.

How often should we review Databricks cost?

Weekly works for most teams, because jobs and clusters change faster than a monthly bill shows. Keep the review short and look only at the top ten jobs and new untagged spend.

How do I find the longest-running Databricks jobs?

Sum the period start and end times per run in system.lakeflow.job_run_timeline, remembering that runs over an hour are split into hourly rows. Then rank jobs by average and 95th percentile run time.

Does Databricks recommend all-purpose compute for production jobs?

No. The Databricks documentation says it does not recommend all-purpose compute for production jobs, and recommends serverless jobs for most task types.

How do I attribute serverless spend to a team?

Use serverless usage policies. Their tags appear in the custom_tags column of the billing table. The Azure Databricks documentation marks the feature Public Preview and says policies do not tag classic compute.

Authored by

Co-Founder and Managing Partner, Duczer East

David deBoisblanc is co-founder of Duczer East and a digital transformation and innovation leader in data-centric AI, agentic systems, and enterprise integration. He shapes intent-driven AI solutions that modernize how organizations use data, drawing on deep experience with Cloudera and complex enterprise integration landscapes.

Newsletter

The Practitioner's Briefing

Senior-level insights on agentic AI, data engineering and enterprise integration, delivered to your inbox.

One email when there is something worth reading. Unsubscribe any time.

Let's Talk

Want to discuss the ideas raised here?

Tell us what you are working on. A senior practitioner replies, and only your email is required.

Get a quote