Optimising Databricks: small changes, meaningful savings

Jack Liu

6 min read.

October 29, 2026

CONTENTS

Managing cloud costs effectively often comes down to making small improvements over time. Slightly oversized clusters, idle compute left running overnight, production jobs running on interactive clusters, untuned tables forcing unnecessary shuffles and limited cost visibility can all influence overall resource efficiency.

Individually, these adjustments may seem small, but together, they can make a meaningful difference to how efficiently your Databricks environment operates.

There are lots of options available when it comes to managing costs. Here are some suggestions regarding configurations, compute and governance to help you optimise your Databricks environment.

Choose the right compute model

Choosing the right compute model for each workload can help organisations optimise their Databricks costs. Selecting the relevant Spark Declarative Pipeline (SDP) product edition can save on costs. For instance, if your pipeline does not utilise auto CDC features, selecting the Core edition instead of Pro may offer a more cost-effective option.

All-purpose clusters are ideal for interactive development, exploration, and ad hoc analysis because they run continuously, making development more efficient as you don’t have to wait for compute to start up. However, they are not designed for scheduled production jobs because they persist beyond job execution. They run continuously, so you would get billed for them even when they are idle between runs.

For production workloads, job clusters are typically the better option. They spin up when a job starts and terminate when it completes. This helps minimise idle compute time and provides clearer cost attribution. In many environments, simply moving scheduled jobs to job clusters can improve cost efficiency. This can be achieved by editing the compute section of a job in the jobs and pipelines UI and ensuring a job compute is selected and not an All-Purpose Compute, or if using Databricks Automation Bundles (DABs), updating the jobs resource YAML file.

why your databricks bill is exploding blog graphic

Serverless compute is another strong option for teams that want to eliminate cluster management overhead. This is because it is a fully managed, auto-scaling execution environment where Databricks provisions, configures, and terminates the underlying infrastructure automatically. Due to its auto-scaling nature, it works well for highly variable workloads and SQL-heavy analytics. However, it’s important to evaluate total DBU and infrastructure cost together and consider workload predictability before adopting it widely.

The principle is simple:

Match the compute model to the workload pattern, not the other way around.

Compute configuration: small settings, big impact

Once the right compute type is chosen, configuration becomes the next optimisation layer.

Autoscaling is often misconfigured. A common mistake is setting maximum workers excessively high “just in case.” In reality, most workloads never use that upper bound consistently. Instead, profile the job, monitor actual usage, and define realistic minimum and maximum worker limits based on data and not assumptions.

Minimum workers also matter. Setting them too high prevents effective downscaling and maintains a consistent baseline cost, even during low activity. Let autoscaling handle bursts while keeping capacity aligned with workload requirements. Autoscaling can be enabled by ticking the box under compute configuration from the job settings.

why your databricks bill is exploding blog graphic

Databricks Runtime selection can also influence cost. Newer runtimes frequently include performance improvements and query optimisations. Faster execution reduces total runtime, which directly reduces DBU consumption. Ensure you are using an LTS (long-term support) version by editing the selected runtime in the compute settings. This is recommended in all instances, unless there is a specific need to use an older runtime, such as if you are using third-party packages that may rely on a specific Python version not matching the current runtime.

why your databricks bill is exploding blog graphic

If you are running all-purpose clusters, auto-termination should be a non-negotiable. Setting up an idle timeout prevents clusters from running overnight when they are no longer needed, helping to improve compute cost efficiency. This can be enabled by ticking the “Terminate after” option and selecting a time in the Personal Compute edit page under the Performance section. Note, the minimum is 10 minutes.

why your databricks bill is exploding blog graphic

Additionally, setting a job timeout threshold can also help terminate jobs that run for longer than expected. This ensures long-running or stuck jobs are automatically terminated, helping manage compute costs and prompting investigation when jobs exceed their expected duration.

why your databricks bill is exploding blog graphic

why your databricks bill is exploding blog graphic

Photon: performance as a cost strategy

Photon, which is a vectorised execution engine optimised for SQL and DataFrame workloads, is often positioned as a performance feature but it’s also a cost optimisation tool. It can significantly reduce execution time for large-scale transformations. For SQL-heavy pipelines, data warehousing workloads, and repetitive batch processing, faster completion often means lower overall compute cost. Under the hood, Photon swaps out the default execution engine for a faster, lower-level one written in C++. Instead of processing data one row at a time, it processes large batches of data together, making much better use of the raw power modern CPUs have to offer.

However, Photon only delivers real cost savings when your queries are large and complex enough to justify it. For simple or small workloads, the time saved may be minimal, so it’s important to consider the higher Photon DBU rate when evaluating overall cost efficiency. The savings come from finishing significantly faster on heavy workloads, where the reduced runtime more than offsets the higher per-hour cost.

Cost optimisation requires governance

Most teams optimise compute once and stop there.

Sustainable cost efficiency requires governance.

Cluster policies should be used to enforce guardrails by restricting higher-cost instance types, limiting worker sizes, and ensuring auto-termination is enabled by default. Cost alerts and workspace budgets create visibility and accountability across teams.

Most importantly, you need insight into where spend is occurring. Databricks usage reports and system tables allow you to analyse billable usage at the job and pipeline level. This is how you move from reactive cost control to proactive optimisation.

You can’t optimise what you don’t measure.

In my next post, I’ll walk through actionable items that can aid in managing and reducing costs:

  • Setting up cluster policies
  • Configuring cost alerts and budgets
  • Querying system tables for cost analysis
  • Building a practical cost dashboard

If cloud cost optimisation is on your radar this year, stay tuned for my supporting video to help with sustainably optimising your platform costs, using best practices.

Get more from Databricks

top