Skip to main content
rightsizing · databricks

Scheduled Databricks jobs running on interactive all-purpose clusters

resource types
1
rule IDs covered
3
severity
high

What does ZopNight detect here?

ZopNight finds Databricks jobs whose tasks point at an existing all-purpose cluster through `existing_cluster_id`, the interactive tier Databricks prices above jobs compute. The saving would be the job's measured DBU-hours over 30 days multiplied by the regional price gap between all-purpose and jobs DBUs. Neither number is collected yet, so no finding is shown today.

Signal and threshold

How ZopNight evaluates Scheduled Databricks jobs running on interactive all-purpose clusters.
Field Value
Rule IDsRC-2313 · RC-2413 · RC-2213
Categoryrightsizing
Severityhigh
MetricDBU-hours per job
Thresholdtargets an all-purpose cluster
Evaluation window30d
SourceZopNight
Permissions usedGET /api/2.2/jobs/list · GET /api/2.2/jobs/runs/list

Interactive compute is the expensive way to run a schedule

Databricks prices compute by workload type. Its cost optimization guide says non-interactive workloads cost significantly less on job compute than on all-purpose compute. The DBUs consumed are the same work either way; only the rate changes. On top of that, the jobs compute guide states plainly that Databricks does not recommend running production jobs on all-purpose compute.

A job cluster exists only for its run and terminates when the job completes, while an all-purpose cluster that a job targets has to be kept around for the schedule, often with a long idle timeout.

Listing jobs that target existing clusters

A task that names existing_cluster_id runs on an all-purpose cluster; new_cluster and job_cluster_key use jobs compute:

Terminal window
databricks jobs list --expand-tasks -o json \
| jq -r '.[] | .job_id as $id | .settings.name as $n |
.settings.tasks[]? | select(.existing_cluster_id) |
[$id, $n, .task_key, .existing_cluster_id] | @tsv'

Check how often each one runs before prioritizing:

Terminal window
databricks jobs list-runs --job-id 123456789 --limit 25 -o json | jq 'length'

Inputs ZopNight needs to price the move

  • The job is recorded as targeting all-purpose compute.
  • Its DBU-hours from runs over the last 30 days are measured and above zero.
  • A price gap per DBU-hour between all-purpose and jobs compute is known for the job’s region and is positive.

Jobs that get no recommendation

A job that ZopNight knows ran zero times in 30 days is skipped, because moving a job that never runs saves nothing; see Orphaned Job for those. Jobs already on job clusters or serverless are fine. ZopNight does not yet collect the measured DBU-hours or the regional rate gap, so today the rule stays silent on every job instead of estimating, and an all-purpose job will not show a finding. The CLI check above is the complete list.

How the saving is calculated

Terminal window
saving per month = DBU-hours used by the job in 30 days
x (all-purpose $ per DBU-hour - jobs $ per DBU-hour)

Only the DBU rate changes in the move. Cloud VM cost for the run is not counted, although dropping a pinned all-purpose cluster the job no longer needs can save more on top.

Moving the job to jobs compute

  1. Copy the all-purpose cluster’s runtime, node type and libraries into a new_cluster definition, or a shared job_clusters entry if several tasks run in sequence.
  2. Change each task from existing_cluster_id to that job cluster and run it once by hand.
  3. For notebook and Python tasks, consider serverless jobs, which Databricks recommends for those task types.
  4. Keep the all-purpose cluster for interactive notebook work, or terminate it if the job was its only user.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·