CertLumen

Microsoft Fabric Data Engineer (DP-700) · Section 3 · 33% of the exam

Optimize Spark performance

One of the objectives of the Microsoft Certified: Fabric Data Engineer Associate (exam DP-700: Implementing Data Engineering Solutions Using Microsoft Fabric) exam, in the section “Monitor and optimize an analytics solution”. Here is what it covers, the points to remember and a question to try.

What it covers

Spark performance in Fabric comes from the right pool and session type, the native execution engine, resource profiles, sensible Spark settings and a healthy table layout. Query performance means writing T-SQL, KQL and Spark SQL that read less data, using statistics, caches and materialized views, and measuring with queryinsights and the Spark UI.

Points to remember

  • Starter pool: Medium nodes only, session starts in about 5 to 10 seconds; custom pools, libraries, Private Link or managed VNet add minutes.
  • 1 capacity unit equals 2 Spark VCores; bursting allows 3 times the base cores (F64: 128 base, 384 burst).
  • High concurrency: same user, workspace, default lakehouse, Spark configuration and libraries; up to 5 notebooks; session tag in pipelines.
  • spark.fabric.resourceProfile: writeHeavy (default), readHeavyForSpark, readHeavyForPBI, custom; runtime setting overrides environment.
  • Native execution engine: spark.native.enabled, Runtime 1.3 and 2.0, automatic fallback, no structured streaming, JSON and XML not accelerated, look for Transformer nodes.

Try a question

Two notebooks run by the same user in one workspace use the same default lakehouse, Spark configuration and libraries. They are started one after another and each waits for a new session. How can session startup and cost be reduced?

  1. AIncrease the Spark pool node size to XX-Large so that every session starts faster
  2. BDisable autoscale on the pool so that sessions are reused
  3. CUse high concurrency mode so the second notebook attaches to the first session
  4. DEnable the native execution engine for both notebooks
Show the answer

C. High concurrency mode shares one Spark session across notebooks that meet the sharing conditions (same user, workspace, default lakehouse, Spark configuration and libraries). The second notebook attaches instantly, and up to five notebooks can share a session.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Optimize Spark performance and query performance teaches this objective (about 55 minutes), and 20 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 49 objectives · Next objective →