Prepstellar

DP-750 · Compute and Catalog Foundations

19 cards

Configuring Compute Performance

Swipe, scroll or use ← →
  1. The three dials behind every cluster

    Compute performance is not one number. It is the combination of processor capacity, memory, local storage, worker count, and lifecycle settings, and each of them fixes a different kind of slowness. Over-provisioning wastes money; under-provisioning produces spill, instability, and slow queries.

    Three resource components do the heavy lifting.

    Component What it decides Symptom when it is short
    Total executor cores The maximum parallelism available: how many tasks Spark can run at the same time Tasks queue while machines look idle
    Total executor memory How much data can be processed in memory before Spark spills it to disk Spill to disk, which slows execution sharply
    Local storage Temporary space for shuffle files and cached data Long shuffle stages waiting on disk

    Cores are counted across the cluster: eight workers with four cores each give thirty-two cores of parallelism.

    1 / 19
  2. Quick check

    Which compute component sets the maximum number of tasks Spark can process at the same time?

    1. AThe inactivity period configured for the automatic termination setting

      The inactivity period decides when an unused cluster stops; it adds no processing slots.

    2. BThe idle-instance timeout configured on the pool

      A pool timeout governs how long spare machines are kept warm, which affects startup rather than parallelism.

    3. CThe total executor core count across the cluster's workers

      Right. Cores are the processing slots for simultaneous tasks, and they are counted across all the workers in the cluster.

    2 / 19

  3. Pick the node type for the bottleneck

    A node type is chosen for the resource the workload runs out of first. Reading the bottleneck correctly is worth more than buying a bigger machine of the wrong family.

    Node family Fits Why
    Memory-optimized Large joins, aggregations, data that should stay in memory More memory per core, so intermediate data spills to disk far less often
    Compute-optimized Calculation-heavy transformations that do not need much memory High processor performance with a lower memory ratio
    Storage-optimized Repeated reads of the same data, caching, heavy local disk access Fast local disks for high input and output rates
    GPU-accelerated Machine learning, deep learning, image processing Graphics processors accelerate model training dramatically; these nodes require Databricks Runtime ML

    The clearest signal is spill: when large joins and aggregations write intermediate data to disk, the missing resource is memory, and memory-optimized nodes are the answer. A faster processor would not stop the spilling.

    3 / 19
  4. Quick check

    A nightly job runs large joins and aggregations and keeps spilling data to disk. Which node family fits?

    1. AMemory-optimized nodes, which give more memory per core

      Right. Spill happens when the data does not fit in memory, and this family raises the memory available per core.

    2. BCompute-optimized nodes, because heavy joins are mainly a processor problem

      Extra processor power does not create room in memory, so the data would still spill.

    3. CStorage-optimized nodes, since the data is already being written to local disk anyway

      Faster disks make the spilling cheaper but leave the cause untouched; the goal is not to spill at all.

    4 / 19

  5. Shape the cluster: worker size and count

    Cluster size is node capacity multiplied by node count, and the same total can be assembled in very different shapes. Two workers with sixteen cores and 128 GB each provide the same cores and memory as eight workers with four cores and 32 GB each. The totals match; the behavior does not.

    • Fewer, larger workers reduce network traffic during shuffle operations, because more of the data already sits on the machine that needs it. Analytical workloads with many shuffles usually run better this way.
    • More, smaller workers offer greater parallelism for highly distributed work, which can be more cost-effective for simple batch processing.

    Neither shape removes local storage writes or switches parallel execution off. They only change where data has to travel.

    5 / 19
  6. Shape the cluster: worker size and count

    The other shape decision is the cluster architecture itself.

    Architecture Composition Scaling
    Multi-node One driver and one or more workers Add workers to scale horizontally
    Single-node A driver, no workers Cannot distribute processing across machines

    A single-node cluster is fine for light exploration or a framework that does not distribute, but it cannot grow sideways. Only a multi-node cluster can take on more workers, which is why horizontal scaling and single-node are mutually exclusive.

    Combine the two decisions when a case gives you both symptoms. A shuffle-heavy nightly transformation that spills to disk on a fixed budget wants fewer, larger, memory-optimized workers: larger nodes cut the shuffle traffic and the memory family stops the spill, with the memory total unchanged.

    6 / 19
  7. Quick check

    With total cores and memory held equal, why can fewer large workers beat more small workers on a shuffle-heavy analytical job?

    1. ABecause consolidating the capacity removes every write to local storage

      Shuffle files are still written locally; the shape of the cluster does not eliminate that.

    2. BBecause fewer, larger workers reduce the network traffic that shuffle operations generate

      Right. More of the data sits where it is needed, so less of it crosses the network during shuffles.

    3. CBecause the cluster then behaves as a single-node resource and skips distribution

      Fewer workers is not the same as no workers: a multi-node cluster keeps distributing work across the machines it has.

    7 / 19

  8. Keep your progress in the app

    That’s 3 of 8 quick checks. In the app they stay answered, and every lesson remembers where you left off.

  9. Autoscaling for demand that moves

    Autoscaling changes the worker count between a configured minimum and maximum as demand changes. You set the two bounds; the platform adds workers when the workload needs them and removes workers when it does not.

    Optimized autoscaling is the default behavior once autoscaling is on. It scales up quickly toward the maximum and can scale down even while the cluster is busy, because it tracks the state of shuffle files before releasing a machine. It reviews utilization far more often for job compute than for interactive all-purpose compute.

    Autoscaling earns its keep when resource needs vary during a run: an exploration session that starts on a small sample and later processes the full dataset grows and shrinks with the work.

    8 / 19
  10. Autoscaling for demand that moves

    Variable demand is the condition, not a universal default. For a predictable workload that uses the same resources throughout each run, a fixed worker count usually gives more stable performance and simpler capacity planning, and it avoids the small overhead of scaling decisions.

    Two settings that are easy to confuse:

    Setting Trigger Effect
    Autoscaling Demand during the run Adds or removes workers within the configured range
    Automatic termination Inactivity Stops the whole cluster

    They are complementary, not alternatives: a stable production cluster can run a fixed worker count and still terminate itself after inactivity.

    9 / 19
  11. Quick check

    A production workload uses the same resources throughout every run. Operations wants predictable performance and simple capacity planning, and compute must stop once it goes idle. What fits?

    1. AA fixed worker count together with automatic termination

      Right. Steady demand does not benefit from scaling decisions, and termination separately removes the idle cost.

    2. BAutoscaling with no inactivity termination configured on the cluster

      Autoscaling suits demand that varies, and without termination the cluster keeps running once the work stops.

    3. CMore, smaller workers and no termination setting at all, so the cluster is always ready

      Changing worker shape does not answer the planning requirement, and an always-on cluster is exactly the idle cost to avoid.

    10 / 19

  12. Automatic termination stops what nobody is using

    Automatic termination watches for inactivity. You configure a period in minutes; if no command runs for longer than that, Azure Databricks stops the cluster. Crucially, it stops the cluster while preserving its configuration, so the same definition can be restarted later. Nothing is deleted, no metadata is lost, and the worker count is not merely reduced.

    For interactive work, set the period from real session habits: around forty-five minutes suits most analysis, leaving room to read results between queries without paying for hours of silence.

    Job compute follows its own lifecycle. The cluster terminates after the job completes and starts again for the next scheduled run, so nobody has to manage startup by hand. Either way, the point is the same: idle compute should not keep consuming resources.

    11 / 19
  13. Quick check

    What happens when a cluster's automatic termination period elapses with no activity?

    1. AThe cluster shrinks to its minimum worker count and waits

      Reducing workers within a range is what autoscaling does; termination acts on the whole cluster.

    2. BThe cluster stops and its configuration is preserved for a later restart

      Right. The cluster is stopped so it stops costing, and its definition survives so it can be started again.

    3. CThe workers go back to the instance pool while the driver node keeps running

      Termination does not leave a driver running: that would keep exactly the idle cost the setting exists to remove.

    12 / 19

  14. Instance pools cut the wait at startup

    An instance pool keeps idle virtual machines ready for clusters. A cluster created from a pool starts faster for one reason: the machines are already provisioned, so nothing has to be requested from the cloud provider first. When the cluster releases them, they go back to the pool.

    Four settings shape a pool:

    Setting What it controls
    Minimum idle instances How many machines stay warm; match it to the clusters you typically run at once
    Maximum capacity A ceiling that keeps one team or workload from consuming the whole quota
    Idle instance auto termination How long machines above the minimum are kept before being released
    Runtime preloading Installs a Databricks Runtime version on idle machines so a matching cluster starts almost immediately

    The trade-off is on the invoice: idle pool machines still cost virtual-machine money, even though they do not consume Databricks compute units. A pool never removes the capacity ceiling and never makes the machines free.

    13 / 19
  15. Instance pools cut the wait at startup

    Because of that cost, pools fit frequent creation and termination cycles on classic compute, where the time saved repeatedly justifies the idle capacity. A production job on one long-running cluster gains very little.

    Pools and autoscaling work well together. Set the minimum worker count at or below the pool's minimum idle instances, and scaling up is fast because the machines it reaches for are already provisioned.

    That combination answers a common case: classic clusters created many times a day, unacceptable startup delay, demand that varies within each run, and a team willing to accept a controlled idle cost. The pool fixes startup; autoscaling handles the varying demand during the run.

    14 / 19
  16. Quick check

    Classic clusters are created many times a day, startup delay is unacceptable, demand varies within each run, and the team accepts a controlled idle cost. Which configuration fits?

    1. AA single-node cluster with a preloaded runtime version

      Preloading helps a cluster start, but a single-node cluster cannot follow demand that varies during the run.

    2. BA fixed cluster and a short inactivity timeout

      A short timeout controls idle cost after the work ends; it does nothing for startup delay or for demand that changes mid-run.

    3. CAn instance pool combined with autoscaling

      Right. The pool supplies already provisioned machines for fast starts, and autoscaling adjusts the worker count while the run is in progress.

    15 / 19

  17. Tune from evidence, not from assumptions

    Start conservative and read the signals. Frequent spilling to disk or slow queries means more memory or more cores. Utilization that stays low means the cluster is too big, or that autoscaling should be doing the sizing.

    The Spark UI is where those signals live: the jobs timeline exposes long-running stages, and a stage's details show how much data spilled from memory and to disk. Comparing stage durations tells you which part of the workload is actually the bottleneck.

    Two habits keep the configuration honest:

    • Review actual utilization against provisioned capacity, then adjust node types, worker counts, or scaling settings from what you observed rather than from what you expected.
    • Use serverless compute where the workload supports it: it removes these configuration decisions and scales on demand, which is often the best balance without manual tuning.
    16 / 19
  18. Quick check

    A team sees heavy shuffle spill in the Spark UI on a cluster whose processors are barely used. What does the evidence point to?

    1. ARaise the memory available to executors, since spill means the data did not fit

      Right. Spill is a memory signal, and idle processors confirm that cores are not the constraint here.

    2. BExtend the automatic termination period so stages have more time to finish

      Termination governs idle clusters, not the duration or memory of a running stage.

    3. CLower the pool's minimum idle instances to free capacity for the running job

      Pool settings affect how quickly clusters start, not how much memory a running executor has.

    17 / 19

  19. Key takeaways

    • Match cores, memory, and local storage to the resource the workload runs out of first: cores set parallelism, memory prevents spill, local storage carries shuffle and cache data.
    • Choose the node family for that bottleneck: memory-optimized for joins and aggregations, compute-optimized for calculation, storage-optimized for repeated reads, GPU with Databricks Runtime ML for machine learning.
    • Combine node type and node count: fewer larger workers cut shuffle traffic, more smaller workers add parallelism, and only a multi-node cluster scales horizontally.
    • Use autoscaling for demand that varies within a run, and a fixed worker count for steady, predictable demand.
    • Use automatic termination to stop inactive compute while keeping the configuration, and instance pools when frequent classic starts justify paying for idle machines.
    18 / 19
  20. Quick check

    Which summary keeps the settings in their own lanes?

    1. AAutoscaling moves workers with demand, termination stops an idle cluster but keeps its configuration, and a pool shortens startup at the cost of idle machines

      Right. Demand, inactivity, and startup are three different triggers handled by three different settings.

    2. BAutoscaling stops idle clusters, termination reduces the worker count, and a pool removes the virtual-machine cost of the machines it keeps warm

      Those roles are swapped: termination is the inactivity setting, scaling is the demand setting, and warm pool machines are still billed as virtual machines.

    3. CTermination deletes the cluster definition, a single-node cluster scales out, and GPU nodes are the answer to shuffle spill

      The definition survives termination, single-node clusters have no workers to add, and spill is a memory problem rather than a graphics one.

    19 / 19

  21. 8 quick checks · then the test

    In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.

The whole course, on your phone

Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.