Domain 4 of 4 · Chapter 4 of 4

Monitoring, Troubleshooting, and Optimizing Workloads

Unlock the complete study guide + 1,040 practice questions across 16 full exams.

Bundled into the existing Implementing Data Engineering Solutions Using Azure Databricks premium course — no separate purchase.

14-day money-back guarantee — no questions asked.

Included in this chapter:

  • Match the diagnostic lens to the symptom
  • Read the Spark UI: scale up versus scale out
  • Fix skew, spill, and shuffle
  • Maintain Delta tables: OPTIMIZE, cluster, VACUUM
  • Control and attribute compute cost
  • Recover a failed job run
  • Centralize monitoring with Azure Monitor
  • Exam-pattern recognition

Compute cost levers and what each one actually controls

Compute cost controlAuto-terminationAutoscalingCluster poolAzure Spot VMs
What it changesstops an idle clusterworker count (min to max)warm idle instancesworker VM price
Cost effectremoves idle DBU and VM costmatches capacity to loadcuts cluster start latencylower price for interruptible work
Main caveatonly affects idle clustersnever stops an idle clusteryou pay for warm idle instancesinstances can be evicted mid-run

Decision tree

Cost or DBU spend?system.billing.usage+ tags for attributionDid a job run fail?Run matrix viewthen Repair runSlow SQL warehouse query?SQL query profileSlow notebook / cluster job?Spark UIskew / spill / shuffleAzure Monitor + Log Analyticscentralize alerting on any of the aboveYesNoYesNoYesNoYesElse

Cheat sheet

  • Auto termination stops an idle all-purpose cluster to remove idle cost
  • Autoscaling, pools, and spot instances trade cost against latency and interruption
  • System tables and tags attribute DBU consumption to workloads
  • Photon can improve price-performance despite a higher DBU rate
  • Repair run re-executes only the failed and dependent tasks
  • Repairing a non-idempotent task can duplicate its output
  • The run matrix view exposes per-task status and logs to locate a failure
  • Stop cancels an in-progress job run; Run now re-triggers or backfills
  • Use the Spark UI to decide whether to scale up or scale out
  • Driver out-of-memory from large collects may require a cluster restart
  • Verify Photon and an appropriate runtime version for performance work
  • Data skew creates stragglers that AQE or salting can relieve
  • Spill is data overflowing executor memory onto disk
  • Shuffle moves data across the network; broadcast joins avoid it for small tables
  • Disk cache and Spark cache serve different reuse patterns
  • The SQL query profile diagnoses slow SQL warehouse queries
  • OPTIMIZE compacts the many small files that frequent DML creates
  • VACUUM deletes unreferenced files beyond the retention window
  • Liquid clustering (CLUSTER BY) is the recommended alternative to partitioning plus ZORDER
  • Predictive optimization automates OPTIMIZE and VACUUM on managed tables
  • Diagnostic settings stream operational logs for troubleshooting
  • Azure Monitor alert rules fire actions on log or metric thresholds
  • The spark-monitoring GitHub library is legacy and in maintenance mode

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. Debugging with the Spark UI
  2. Query profile
  3. Troubleshoot and repair job failures
  4. Billable usage system table reference
  5. Configure diagnostic log delivery
  6. Compute configuration reference
  7. What is Photon?
  8. Optimize performance with caching on Azure Databricks
  9. Diagnose cost and performance issues using the Spark UI
  10. Adaptive query execution
  11. Optimize data file layout
  12. Use liquid clustering for tables
  13. Remove unused data files with vacuum
  14. Predictive optimization for Unity Catalog managed tables
  15. Pool best practices
  16. Trigger a single job run
  17. Overview of Azure Monitor alerts