What does the pricing page say?
The Databricks Lakeflow Jobs pricing page, in its default view (Premium plan, AWS, US East (N. Virginia)), lists Jobs Classic at "$0.15 / DBU... Plus underlying compute costs" and Jobs Serverless at "$0.35 / DBU Includes underlying compute costs". For Photon on classic compute it says: "Available as an option. DBU emission rate 2.9X vs. non-Photon". On serverless, Photon is "Automatically enabled".
Rates vary by plan, cloud and region. The arithmetic below uses ratios, so it holds for any rate as long as the 2.9X multiplier applies.
How does the arithmetic work?
Split the cost of one classic job run into two parts:
- The DBU part: DBU price x DBUs emitted per hour x runtime.
- The instance part: the cloud provider's hourly price for the cluster x runtime.
Turning Photon on multiplies the DBU emission rate by 2.9 and changes the runtime. The instance price per hour does not change. Call the new runtime r, as a fraction of the old one (r = 0.5 means twice as fast).
- New DBU part = old DBU part x 2.9 x r.
- New instance part = old instance part x r.
The DBU part is lower only when 2.9 x r is below 1, so when r is below about 0.345. The instance part is lower for any r below 1.
Three illustrative cases
These cases use invented round numbers to show the shape of the result. They are not measurements of any job.
Case A: DBUs are a quarter of the cost. Old run: $25 DBU part plus $75 instance part, total $100.
- Twice as fast (r = 0.5): DBU part $36.25, instance part $37.50, total $73.75. Cheaper.
- 1.25x as fast (r = 0.8): DBU part $58, instance part $60, total $118. More expensive.
Case B: DBUs are half the cost. Old run: $50 plus $50, total $100.
- Twice as fast: $72.50 plus $25, total $97.50. About even.
- Three times as fast (r = 1/3): $48.33 plus $16.67, total $65.00. Cheaper.
Case C: DBUs are three quarters of the cost. Old run: $75 plus $25, total $100.
- Twice as fast: $108.75 plus $12.50, total $121.25. More expensive.
- Three times as fast (r = 1/3): $72.50 plus $8.33, total $80.83. Cheaper.
The general rule: the total falls when r x (2.9 x d + (1 - d)) is below 1, where d is the DBU share of the old cost. With d = 0.5, r must be below about 0.513, so a bit under twice as fast.
Where do the speedups come from?
This post does not quote a Photon speedup figure, because Databricks performance figures were not collected for this site. The Photon documentation does list limits that set an upper bound on what a given job can gain: Photon falls back to standard Spark for unsupported work, does not accelerate UDFs, RDD APIs or stateful streaming, and gives no gain for queries under 2 seconds. A job dominated by those parts pays the higher emission rate for little speedup.
What about serverless?
On serverless jobs the question changes. Photon is on by default and Databricks says the serverless DBU rate "appropriately reflects the processing power of Photon and is comparable to the DBU rate of a classic Photonized cluster". There is no toggle to weigh; the comparison becomes classic against serverless for the same job.
How to run the test on your own jobs
- Pick a job that runs at least several minutes and is mostly SQL or DataFrame work.
- Run it with Photon off and on, same cluster size and data, and record runtime and DBUs from the run details.
- Add the instance cost from your cloud bill for the same runtime.
- Compare totals, then repeat for a second job with a different shape.
Photon is scored on this site as an engine labelled Databricks only, and it is outside our lead question because it is not available on Amazon EMR. For teams on Amazon EMR or self-managed Spark it is not an option.