What you will be able to do
- Explain how classic and serverless compute differ in who manages the machines, startup time, configuration options and supported features
- Describe the defining characteristics of serverless and classic compute, from availability and scaling to runtime versioning and tuning control, and use them to judge workload fit
- Tell all-purpose, jobs and pipeline classic compute apart, and say why scheduled jobs belong on jobs compute rather than all-purpose compute
- Describe how DBUs, cloud VM costs, auto-termination and Auto Stop decide what idle compute costs
- Compare serverless, pro and classic SQL warehouses by Photon, Predictive IO, Intelligent Workload Management, startup time and default type
- Pick the right compute for interactive development, scheduled jobs, pipelines and BI/SQL workloads
Key concept
Serverless vs classic compute — Serverless compute is provisioned, scaled and upgraded by Databricks, outside your cloud account. Classic compute runs on machines in your own cloud account that you create, configure and manage. Nearly every difference in startup time, tuning options, features and billing comes from that split.
1.Who runs the machines: serverless versus classic compute
Every notebook, job, pipeline and SQL query on Databricks runs on some compute resource. The first choice is not machine size. It is who owns the machines. Classic compute covers the all-purpose, jobs and Lakeflow pipelines compute that you create, configure and manage yourself, deployed in your own cloud provider account. Serverless compute is a Databricks-managed service: you run workloads without provisioning anything in your cloud account, and Databricks allocates and manages the resources for you.
Location explains the behaviour. Serverless resources run in the serverless compute plane, which Databricks manages, while classic resources sit in your account (see Control plane vs compute plane for the architecture). Databricks already has capacity ready, so serverless start-up and scaling are faster and idle time shrinks. Because Databricks owns that plane, it also decides the runtime: serverless is versionless, and workloads always run on the latest runtime. Classic compute lets you choose runtime versions, instance types, Spark settings and more, because the machines are yours to configure.
Each side has a short list of defining characteristics, and workload fit follows from them. Serverless compute is on-demand and managed. It is available by default in most workspaces with no enablement step, scales automatically, upgrades itself, and folds the VM cost into its DBU price. Classic compute is provisioned and tunable. You pick the runtime, instance types and Spark settings, choose an access mode (Standard or Dedicated), set the autoscaling range, and can add instance pools or compute policies. In return you own the idle time and the regular restarts that keep the compute image current.
Classic scaling is configurable rather than fixed. On Premium-plan workspaces, optimized autoscaling scales job compute down after 40 seconds of underutilization and all-purpose compute after 150 seconds. Serverless offers no such dials, which is exactly its appeal when you would rather not tune them.
Serverless pays for that convenience with a shorter feature list. These are the limits you are most likely to hit:
- R is not supported, and only Spark Connect APIs work, so Spark RDD code fails.
- Compute policies, compute-scoped init scripts and libraries, instance pools, compute event logs and most Apache Spark compute configurations are not available.
- The Spark UI is not available. Use the query profile instead.
- Dataframe and SQL cache APIs such as
df.cache()andCACHE TABLEraise an exception. - A run has a maximum runtime of 7 days. Longer runs are terminated and not retried, so split them or use classic compute.
- Workspaces that are not enabled for Unity Catalog have no access to serverless compute at all.
| Aspect | Serverless compute | Classic compute |
|---|---|---|
| Where the machines run | Serverless compute plane, managed by Databricks | Your cloud provider account |
| Who provisions and manages | Databricks | You (or an admin, through compute policies) |
| Runtime version | Always the latest (versionless) | Chosen when you create the compute |
| Tuning | Most Apache Spark compute configurations, init scripts and instance pools not supported | Full configuration settings for users with the Unrestricted cluster creation entitlement |
| Language and API gaps | No R, no Spark RDD APIs | R and RDD APIs available on classic all-purpose compute |
Checkpoint 1 of 9· Check yourself
A team wants to move four workloads off classic compute and onto serverless compute. Which one has to stay on classic compute?
Serverless supports only Spark Connect APIs, so RDD code fails there. That job needs classic compute. Serverless is the better fit for faster start-up and automatic latest-runtime upgrades, and a five-day run is within its 7-day maximum.
“Only Spark Connect APIs are supported. Spark RDD APIs are not supported.”Source: docs.databricks.com
2.All-purpose, jobs and pipeline compute
Classic compute comes in three kinds, and the difference is mostly about lifecycle. All-purpose compute is created in the UI, CLI or REST API. You can terminate and restart it by hand, and several users can share it for collaborative interactive analysis. Jobs compute belongs to a single run: the job scheduler creates it when a job runs on a new job cluster, terminates it when the job completes, and you cannot restart it. Classic pipeline compute runs Lakeflow pipelines when serverless pipelines cannot be used.
Running a scheduled job on all-purpose compute looks thrifty, but it loses on three counts. Databricks bills all-purpose compute at a different rate than jobs compute. All-purpose auto-termination is tied to inactivity rather than the end of the run, so the cluster keeps running after the job finishes, until its idle timer fires. All-purpose compute is also often shared across teams, so a scheduled job has to compete with interactive users and its latency goes up. Saving a few minutes of nightly startup does not make up for any of this.
All-purpose and jobs compute also have an access mode. Standard access mode lets any user with CAN ATTACH TO permission run workloads on the same compute concurrently, with Lakeguard isolating each user's code. Dedicated access mode assigns the compute to a single user or group. Use Standard unless the workload needs something it lacks, such as RDD APIs, GPUs or R. Standard does not support R.
Checkpoint 2 of 9· Check yourself
Several engineers share one classic all-purpose cluster for Python and SQL work. A statistician now needs to run R notebooks on classic compute. Which setup fits?
Standard access mode does not support R, so the R work needs Dedicated compute. Serverless does not support R either. The shared Python and SQL work can stay on Standard, which is the default recommendation.
“Choose dedicated compute only for specialized workloads requiring privileged machine access, RDD APIs, distributed ML, GPUs, or R.”Source: docs.databricks.com
3.DBU billing and what idle time costs
Databricks bills in DBUs (Databricks units), units of processing capability per hour based on VM instance type. What else you pay depends on where the machines run. On classic compute, the total cost is DBUs plus the virtual machine, disk and network costs in your own cloud account. On serverless, the DBU price already includes the virtual machine costs, so there is no separate cloud VM bill for that compute.
Both components keep accruing while classic compute sits idle, so auto-termination is the main cost control. During compute creation you can set the resource to terminate after a specified period of inactivity. Databricks recommends a reasonable value, for example 1 hour, to avoid paying for idle time. A terminated compute keeps its configuration so it can be restarted later. Instance pools cut startup time in a different way: Databricks charges no DBUs for instances idling in a pool, but your cloud provider still bills for them.
Serverless reduces idle cost by design, because Databricks scales the resources and minimizes idle time. It still has its own safeguards. Serverless notebooks have a default execution timeout of 2.5 hours, which workspace admins can change and users can override per notebook with spark.databricks.execution.timeout. To find what a workload actually costs, query the system.billing.usage system table. Usage can take up to 24 hours to appear there.
SQL warehouses follow the same rule through their Auto Stop setting: an idle warehouse keeps accumulating DBU and cloud instance charges until it stops. Pro and classic warehouses default to 45 minutes (minimum 10). Serverless warehouses default to 10 minutes, with a minimum of 5 in the UI and as low as 1 minute through the API. A warehouse is billed for the time it is running, not per query. A short Auto Stop window is cheap on serverless because the warehouse resumes in seconds.
Checkpoint 3 of 9· Check yourself
A team ran a new serverless job this morning and wants to know what that one run cost before they schedule it nightly. What should they do?
The cost of a specific workload comes from the system.billing.usage table, and usage can take up to 24 hours to appear there, so an empty result right after the run proves nothing. Serverless has no Spark UI, and its DBU price already includes the VM costs, so there is no separate cloud VM bill to add.
“To see the cost for a specific workload, query the system.billing.usage system table.”Source: docs.databricks.com
4.SQL warehouse types: serverless, pro and classic
SQL warehouses are compute built for SQL queries, analytics and BI, and they come in three types. The types differ in which of three performance features they support. Photon is the vectorized query engine that speeds up SQL and DataFrame calls. Predictive IO speeds up selective scans. Intelligent Workload Management (IWM) uses AI-powered prediction to give workloads the right resources quickly, instead of relying on static thresholds.
| Warehouse type | Photon Engine | Predictive IO | Intelligent Workload Management | Typical startup |
|---|---|---|---|---|
| Serverless | Yes | Yes | Yes | 2 to 6 seconds |
| Pro | Yes | Yes | No | About 4 minutes |
| Classic | Yes | No | No | About 4 minutes |
Serverless supports every feature, and its behaviour follows from that. It starts in seconds, scales up quickly when queries queue, and scales down quickly to cut cost when demand drops. That suits ETL, BI and exploratory analysis, especially when demand swings during the day. Pro and classic warehouses run their compute in your cloud account. Without IWM they respond less well to changing demand and autoscale more slowly. Classic, which also lacks Predictive IO, gives only entry-level performance.
Pro still wins in two cases: when serverless SQL warehouses are not available in your region, and when you have custom-defined networking. Custom networking matters for federation to databases in your cloud network, for connecting to on-premises systems, or for placing services such as an event bus in your network. Classic is for basic interactive exploration when neither serverless nor pro is an option.
The default type depends on how you create the warehouse. In a workspace that supports serverless warehouses, the UI defaults to serverless, but the SQL warehouses API with default parameters creates a classic warehouse. To get serverless through the API, set enable_serverless_compute to true and warehouse_type to pro. Databricks recommends always setting this field explicitly. In workspaces without serverless support, or with a legacy external Hive metastore, the UI defaults to pro and the API to classic.
Checkpoint 4 of 9· Match them up
Match each SQL warehouse type to its feature set and the situation it suits
Tap a term, then the definition that fits it.
Photon is on all three types, Predictive IO is on serverless and pro, and IWM is on serverless only. Pro is the fallback for regions without serverless or for custom networking, and classic is for entry-level exploration.
“A pro SQL warehouse supports Photon and Predictive IO, but does not support Intelligent Workload Management.”Source: docs.databricks.com
Checkpoint 5 of 9· Check yourself
An automation script provisions BI warehouses through the SQL warehouses API in a workspace that supports serverless. The team wants every warehouse it creates to be serverless. How should the request be configured?
With default parameters the API creates a classic warehouse, even where the UI defaults to serverless. Serverless needs both settings: enable_serverless_compute set to true and warehouse_type set to pro.
“To use serverless, set the enable_serverless_compute parameter to true and warehouse_type to pro.”Source: docs.databricks.com
Checkpoint 6 of 9· Exam question
A BI team refreshes an executive dashboard throughout the business day and needs a SQL compute resource that resumes from idle in a few seconds and scales quickly as concurrent users open the dashboard during peak hours, with no infrastructure to size or manage. Which compute option should the team choose?
Correct answer: A — Provision a serverless SQL warehouse, since it starts in a few seconds and lets Databricks scale clusters automatically as query load changes.
- A. A serverless SQL warehouse resumes in roughly 2 to 6 seconds and its Intelligent Workload Management engine adds or removes clusters automatically as concurrent dashboard queries rise and fall. This matches the requirement for rapid resume and hands-off scaling with no capacity to size in advance.
- B. A classic SQL warehouse typically takes several minutes to start from idle and scales less responsively than serverless, which fails the requirement for a fast dashboard refresh. Cost per DBU is not the deciding factor when the core requirement is startup latency and quick concurrency scaling.
- C. A Pro SQL warehouse still takes minutes to start and is chosen for custom networking, hybrid connectivity, or regions without serverless support, none of which this dashboard scenario mentions. It does not resume as quickly as serverless compute, so it does not fit the stated need.
- D. An all-purpose cluster is built for shared interactive notebook sessions rather than fast-resuming, highly concurrent BI query serving, and it does not offer the few-second resume time serverless warehouses provide. Running SQL through a notebook cluster also adds operational overhead the team wants to avoid.
Checkpoint 7 of 9· Exam question
Which statement correctly compares features supported across Databricks SQL warehouse types?
Correct answer: C — Serverless SQL warehouses support Intelligent Workload Management, while Pro and Classic warehouses do not support this AI-driven scaling.
- A. Predictive IO is supported on Serverless and Pro warehouses, not on Classic warehouses, so this statement reverses which tier actually gets the selective-scan optimization. Classic is the tier that lacks it, not the tier that has it.
- B. The Photon engine is available across all three warehouse types, so restricting it to Pro alone misstates the feature matrix. Photon acceleration is not a differentiator between Serverless, Pro, and Classic warehouses.
- C. Intelligent Workload Management is a Serverless-only capability that forecasts query demand and manages cluster provisioning automatically, and Pro and Classic warehouses rely on manual or threshold-based scaling instead. This correctly identifies the feature as exclusive to the serverless tier.
- D. Photon is supported on Serverless warehouses as well as Pro and Classic, so excluding Serverless from Photon support is incorrect. Photon availability is not tied to whether the warehouse runs on Databricks-managed or customer-account infrastructure.
Checkpoint 8 of 9· Exam question
A data engineering team schedules a Lakeflow Job that runs an ETL pipeline once every night and does not need to support interactive notebook use between runs. Which compute configuration minimizes cost for this workload?
Correct answer: B — Configure the job to launch a job cluster, since Databricks automatically terminates it once the pipeline finishes and no idle DBUs accrue.
- A. Keeping an all-purpose cluster running between nightly runs means it accrues DBU cost around the clock even while idle, which is more expensive than terminating compute after each run. All-purpose clusters are meant for shared interactive work, not for minimizing cost on a single unattended nightly job.
- B. A job cluster is provisioned specifically for the job run and Databricks automatically terminates it as soon as the pipeline completes, so no idle DBUs accrue between nightly executions. This matches the requirement to minimize cost for a workload with no interactive use between runs.
- C. SQL warehouses are designed to execute SQL queries against Databricks SQL, not to run a general ETL pipeline defined as a Lakeflow Job task, so this is not the right compute type for the job. Per-query billing does not apply to running a scheduled pipeline task.
- D. A Pro SQL warehouse is chosen when a workload needs custom networking or runs in a region without serverless support, not for minimizing the cost of a nightly ETL job, and it is not the compute type Lakeflow Job tasks run on. Nothing in the scenario indicates a networking requirement.
Sources12
5.Choosing compute for each workload
Start with serverless and move away from it only for a specific reason. For notebooks, jobs and pipelines alike, serverless is the recommended default: fewer settings to manage, faster start-up, automatic scaling and lower cost. Serverless jobs and pipelines also offer a choice between performance optimized and standard performance mode, depending on your latency and cost needs. Each move away from serverless has a concrete trigger, shown in the table below.
| Workload | Default choice | Use the alternative when |
|---|---|---|
| Interactive notebook development | Serverless compute | Classic all-purpose compute: you need RDD APIs or R |
| Scheduled job tasks | Serverless compute | Classic jobs compute: a non-SQL job needs custom cluster settings not available in serverless |
| SQL tasks inside a job | SQL warehouse | Pick the warehouse type that fits latency and cost |
| Lakeflow pipelines | Serverless compute | Classic pipeline compute: a feature is not supported in serverless, or you use the legacy Hive metastore |
| BI dashboards, SQL analytics, reporting | Serverless SQL warehouse | Pro: serverless unavailable in the region or custom networking needed. Classic: neither is an option |
For automated work, avoid one option entirely: classic all-purpose compute is not optimized for automated workloads. Running a production job on a shared interactive cluster combines the higher rate, idle time and resource contention described earlier. Don't send non-SQL work to a SQL warehouse either. Warehouses are scoped to SQL tasks, so Python ETL belongs on serverless or jobs compute. Check limits before assuming a workload must leave serverless: JAR tasks in jobs are supported on serverless, even though JAR libraries are not supported in serverless notebooks.
Checkpoint 9 of 9· Match them up
For each workload, pick the compute that the selection guidance points to
Tap a term, then the definition that fits it.
Serverless is the default. Each classic option needs a specific reason: custom cluster settings for a non-SQL job, the legacy Hive metastore for a pipeline, or R/RDD APIs for interactive work. SQL tasks in a job go to a SQL warehouse, and classic all-purpose compute is never the choice for an automated job.
“Classic jobs compute | For non-SQL jobs that require custom cluster settings not available in serverless.”Source: docs.databricks.com
Sources
(13)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Classic compute resources are deployed in your cloud provider account, and are not managed by Databricks.”
↩︎ Who runs the machines: serverless versus classic compute“Classic compute resources are deployed in your cloud provider account, and are not managed by Databricks.”
↩︎ Key concept - 2.
“you can run workloads without provisioning any compute resources in your cloud account”
↩︎ Who runs the machines: serverless versus classic compute“This speeds up start-up and scaling times, minimizes idle time, and reduces the need to manage compute resources.”
↩︎ Who runs the machines: serverless versus classic compute“Serverless compute resources run in the serverless compute plane, which is managed by Databricks.”
↩︎ Who runs the machines: serverless versus classic compute“Serverless workloads always run on the latest runtime version.”
↩︎ Who runs the machines: serverless versus classic compute“Serverless compute is available by default in most workspaces and does not require enablement.”
↩︎ Who runs the machines: serverless versus classic compute“Legacy workspaces that are not enabled for Unity Catalog do not have access to serverless compute.”
↩︎ Who runs the machines: serverless versus classic compute“there could be up to a 24-hour delay between when you run a workload and its usage being reflected in the billable usage system table.”
↩︎ DBU billing and what idle time costs“To see the cost for a specific workload, query the system.billing.usage system table.”
↩︎ Checkpoint - 3.https://docs.databricks.com/aws/en/compute/configureOfficial docs
“On job compute, scales down if the compute resource is underutilized over the last 40 seconds.”
↩︎ Who runs the machines: serverless versus classic compute - 4.
“Only Spark Connect APIs are supported. Spark RDD APIs are not supported.”
↩︎ Who runs the machines: serverless versus classic compute“Serverless compute has a maximum runtime of 7 days.”
↩︎ Who runs the machines: serverless versus classic compute“The Spark UI is not available. Instead, use the query profile to view information about your Spark queries.”
↩︎ Who runs the machines: serverless versus classic compute“JAR tasks in jobs are supported.”
↩︎ Choosing compute for each workload - 5.
“terminates the cluster when the job is complete. You cannot restart a job cluster.”
↩︎ All-purpose, jobs and pipeline compute“Databricks bills based on Databricks units (DBUs), which are units of processing capability per hour based on VM instance type.”
↩︎ DBU billing and what idle time costs - 6.
“All-purpose compute supports auto-termination, which is tied to inactivity rather than the end of a job run.”
↩︎ All-purpose, jobs and pipeline compute“Jobs scheduled against all-purpose compute often have increased latency due to competition for compute resources.”
↩︎ All-purpose, jobs and pipeline compute“Databricks bills for all-purpose compute at a different rate than jobs compute.”
↩︎ Exam trap 1“Jobs compute terminates automatically after a job run is complete.”
↩︎ Prediction - 7.
“Choose dedicated compute only for specialized workloads requiring privileged machine access, RDD APIs, distributed ML, GPUs, or R.”
↩︎ All-purpose, jobs and pipeline compute - 8.https://docs.databricks.com/aws/en/lakehouse-architecture/cost-optimization/best-practicesOfficial docs
“Total costs include Databricks Units (DBUs) plus virtual machine, disk, and associated network costs.”
↩︎ DBU billing and what idle time costs“Note that for serverless services, the DBU cost already includes the virtual machine costs.”
↩︎ DBU billing and what idle time costs“Enable cluster auto termination with a reasonable value (for example, 1 hour) to avoid paying for idle times.”
↩︎ DBU billing and what idle time costs“Databricks does not charge Databricks Units (DBUs) while instances are idle in the pool, resulting in cost savings. Instance provider billing does apply.”
↩︎ DBU billing and what idle time costs - 9.
“configure the compute to terminate automatically after a specified period of inactivity.”
↩︎ DBU billing and what idle time costs - 10.https://docs.databricks.com/aws/en/admin/usageOfficial docs
“serverless notebooks have a default execution timeout of 2.5 hours”
↩︎ DBU billing and what idle time costs - 11.
“Serverless SQL warehouses: The default is 10 minutes, which is recommended for typical use.”
↩︎ DBU billing and what idle time costs“Pro and classic SQL warehouses: The default is 45 minutes”
↩︎ DBU billing and what idle time costs“Idle SQL warehouses continue to accumulate DBU and cloud instance charges until they are stopped.”
↩︎ Exam trap 4 - 12.
“Rapid startup time (typically between 2 and 6 seconds).”
↩︎ SQL warehouse types: serverless, pro and classic“Quick downscaling to minimize costs when demand is low”
↩︎ SQL warehouse types: serverless, pro and classic“A pro SQL warehouse takes several minutes to start up (typically approximately 4 minutes)”
↩︎ SQL warehouse types: serverless, pro and classic“Serverless SQL warehouses are not available in a region.”
↩︎ SQL warehouse types: serverless, pro and classic“To use serverless, set the enable_serverless_compute parameter to true and warehouse_type to pro.”
↩︎ SQL warehouse types: serverless, pro and classic“Using the UI, the default SQL warehouse type is serverless.”
↩︎ SQL warehouse types: serverless, pro and classic“A pro SQL warehouse supports Photon and Predictive IO, but does not support Intelligent Workload Management.”
↩︎ Exam trap 2“Using the SQL warehouses API with default parameters, the default SQL warehouse type is classic.”
↩︎ Exam trap 3“A classic SQL warehouse supports Photon but does not support Predictive IO or Intelligent Workload Management.”
↩︎ Prediction“A pro SQL warehouse supports Photon and Predictive IO, but does not support Intelligent Workload Management.”
↩︎ Checkpoint - 13.
“Fewer settings to manage, faster start-up, automatic scaling, and lower cost.”
↩︎ Choosing compute for each workload“For non-SQL jobs that require custom cluster settings not available in serverless.”
↩︎ Choosing compute for each workload“Generally avoid. Not optimized for automated workloads.”
↩︎ Choosing compute for each workload“When you need RDD APIs or R language support.”
↩︎ Choosing compute for each workload“or when you are working with the legacy Hive metastore.”
↩︎ Choosing compute for each workload“Classic jobs compute | For non-SQL jobs that require custom cluster settings not available in serverless.”
↩︎ Checkpoint