Skip to content

A scenario for a platform engineer · Senior and up

Cut the cost of the night jobs

Penny · Finance
Tuesday, 16:00

The nightly batch jobs run for three hours on Databricks clusters of on-demand machines. They can be retried, nobody waits for them, and you are asked to cut their compute cost.

What do you do?

Tap the one you would do. The answer opens below.

Show the best call

Use spot instances for the workers, with fallback to on-demand, and keep the driver on-demand.

The workers cost a fraction. When the cloud takes a spot machine back, Spark reruns its tasks and the job carries on.

Why

Spot instances are spare cloud capacity at a deep discount, and the cloud can take them back at short notice. Spark recovers from losing a worker, but not from losing the driver, so the driver stays on-demand.

Read it in the Databricks docs (opens in a new tab)

The other two

Works, at a price. Stay on-demand and use smaller workers.
Cheaper per hour, and the jobs run longer. The saving is small.
A poor call. Put everything on spot, driver included.
Cheapest, until the driver's machine is taken back. Then the whole job dies and starts again from nothing.

The words in this scenario

Spot instances.
Spare machines a cloud provider sells at a discount and can take back at short notice. In the docs (opens in a new tab)
Driver.
The one machine in a cluster that plans the work and hands it to the workers. Results that are collected come back to it. In the docs (opens in a new tab)

Go deeper on brickster.ai

More scenarios

Had one like this at work? Send it to us: the best tickets come from real incidents.

Checked against the Databricks documentation on . brickster.ai is independent and is not affiliated with Databricks.