PySpark / Performance Track · 14 lessons
PySpark Performance · v1.1 OSS Spark + Azure Databricks

PySpark performance

Spark internals · execution · tuning

Fourteen connected lessons on how Apache Spark actually runs your PySpark — told as one story. Your code becomes jobs, stages, and tasks across a driver and executors; joins and wide operations trigger the expensive shuffle; memory decides what runs, spills, or OOMs; and the final section teaches how to debug, size, and explain the plan like an FDE. Each lesson is a self-contained interactive page with a runnable notebook and a markdown companion.

14 lessons interactive runnable notebooks verified Jun 2026

How to use this track

Read it in order — it's one story, not a menu

The track follows a Spark job from how it runs to how you make it fast: read the plan, avoid the shuffle, fix skew, reuse work, tune memory and GC, then debug and size production jobs. Parts A → B → C → D build on each other, so the intended path is 01 through 14. Each page stands alone if you need to jump straight to a topic.

→ Full learning plan (suggested order, timings & self-check questions)

The one-line tuning method Slow Spark job? Read the plan (.explain()) and the Spark UI first. Then, in order: read less (partition pruning / DPP, column pruning) → avoid or repair the shuffle (broadcast the small side, bucket repeated joins, let AQE coalesce) → fix skew (AQE skew join, then salting) → reuse work (cache only reused DataFrames) → size memory and GC last. Always verify the change in .explain() / the Spark UI — never assume.

The lessons

Fourteen lessons, four parts

Part A · The engine

How a PySpark line of code becomes work on a cluster, the join strategies that move (or save) the most data, and where memory goes on the driver and executors.

Part B · Runtime adaptivity and reuse

The plan that rewrites itself at runtime, how to stop recomputing the same DataFrame, and how to read far fewer files.

Part C · Skew, shared variables and last-mile tuning

The recurring villain (skew) and its fixes, the two shared-variable types, and the JVM-level levers — GC and bucketing.

Part D · Debugging and production readiness

The practical FDE layer: read Spark UI evidence, size partitions and clusters, and explain the optimizer and execution-engine terms behind physical plans.

Field guide

Real-world scenarios FDEs face

Beyond the lessons: the recurring Databricks performance calls you make on customer workloads — a slipping SLA, an autoscaling job that plateaus, a driver that dies on a "small" result — each with the diagnosis and the fix, cross-linked to the lesson that explains the mechanism.