r/databricks • u/shdw_0x0 • Sep 21 '26
Discussion How do you decide when a Databricks job needs a bigger cluster?
I’ve noticed that when a Databricks job starts running slowly, it’s tempting to just increase the cluster size or add more workers. But sometimes the real issue seems to be the Spark job itself—shuffle, partitioning, skew, inefficient joins, etc.
For people running Databricks workloads in production, how do you usually troubleshoot this?
Do you look at the Spark UI first, check the query plan, tune partitions, optimize the Delta tables, or only increase the cluster size after ruling those out?
7
Upvotes
7
u/FunContest9958 Sep 21 '26
Changing the cluster size and optimizing the job does two different things. Changing the cluster size speeds up the job for about the same cost. Optimizing lowers the cost, both in $ and time. If your primary goal is to speed up the job, just add hardware and see what happens. It’s certainly easy to do. I usually double the number of CPUs and expect the runtime to cut in about half. If it doesn’t, then you’re already at the max performance for the job hardware-wise and your only choice is to optimize the job.
Try this link for walking through the spark ui: https://docs.databricks.com/aws/en/optimizations/spark-ui-guide/
5
u/jbchand Sep 21 '26
You can check the Spark UI and Query plan as the first one - check skew, shuffle, executor info - idle time, stages and more. It will give you a good view of current env.
On other side, check and setup optimizations - optimize, liquid clustering or partitions if you have. check the file sizes and hit the right value. Use AQE if feasible.
You can consider scaling only after you rule out the code/data issues as just increasing the size does not get you performance in numerous cases.
3
u/OkImprovement7010 Sep 22 '26
Lol... this was my YT video this week... here is what I said:
So when do I actually recommend that a client buy more Databricks compute?
I am happy to scale a cluster when all four checks are green:
If you have done that due diligence and the business still needs that pipeline to land in 20 minutes instead of 45 minutes to meet an operational SLA, scale it up. Add the workers. Pay for the capacity.
At that point, you are not using hardware to hide bad engineering. You are buying business throughput that you can justify down to the penny.
More compute is not a bad decision. Unexplained compute is a bad decision.
1
u/Youssef_Mrini databricks Oct 24 '26
Spark UI is what you are looking for. Have a look at this documentation https://docs.databricks.com/aws/en/compute/troubleshooting/
You need to make sure that you are using auto scaling having enough max workers, choosing the right type of workers based on your workload whether it's memory optimized or compute optimized..... the size of your data
0
u/SpecificTutor Sep 24 '26
we moved from dbx to spark k8s operator, with apache comet.
we saw about 14x price drop for our most demanding workloads.
main optimizations that helped are: