fabric-spark-perf-remediate — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited fabric-spark-perf-remediate (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Systematic workflows for diagnosing, analyzing, and resolving Apache Spark performance problems in Microsoft Fabric Data Engineering and Data Science workloads.
Activate when encountering any of the following scenarios:
Start here when a Spark job is slow:
These are the three settings Fabric Autotune manages automatically. If autotune is disabled, tune them manually:
| Setting | Default | Purpose | Tuning Guidance |
|---|---|---|---|
spark.sql.shuffle.partitions | 200 | Partition count during joins/aggregations | Set to 2-3x total executor cores for your pool |
spark.sql.autoBroadcastJoinThreshold | 10 MB | Max table size for broadcast joins | Increase to 100-256 MB for star-schema joins |
spark.sql.files.maxPartitionBytes | 128 MB | Max bytes per file-read partition | Increase for large sequential scans, decrease for high parallelism |
Fabric provides predefined profiles that bundle optimized Spark settings:
| Profile | Best For | VOrder | Key Characteristics |
|---|---|---|---|
writeHeavy | ETL, batch ingestion, streaming | Disabled | Default for new workspaces; optimized write throughput |
readHeavyForSpark | Interactive Spark queries, analytics | Enabled | Optimized read paths for Spark workloads |
readHeavyForPBI | Power BI dashboards, DW queries | Enabled | Optimized for DirectLake and cross-engine reads |
Apply a profile at the environment level or override per-session:
# Per-session override example
spark.conf.set("spark.fabric.resource.profile", "readHeavyForSpark")Enable autotune to let Fabric automatically optimize shuffle partitions, broadcast thresholds, and partition bytes:
# Enable in a notebook session
spark.conf.set("spark.ms.autotune.enabled", "true")
# Or set in Environment > Spark Properties
# spark.ms.autotune.enabled = trueRequirements: Runtime 1.1 or 1.2 only. Not compatible with high concurrency mode or private endpoints. Needs 20-25 iterations to converge on optimal settings.
Check autotune status after a query:
# View autotune decisions in Spark UI SQL tab
# Status values: QUERY_TUNING_SUCCEED, QUERY_TUNING_DISABLED,
# QUERY_PATTERN_NOT_MATCH, QUERY_DURATION_TOO_SHORT| Error / Symptom | Root Cause | Quick Fix |
|---|---|---|
| HTTP 430: TooManyRequestsForCapacity | All Spark VCores consumed | Cancel idle jobs in Monitoring Hub or upgrade SKU |
| Stage with 200 tasks, 1 task 100x slower | Data skew on join/group key | Add salting or use broadcast join |
| OOM on executor | Partition too large or broadcast too big | Increase partitions or lower broadcast threshold |
| Write takes >60% of total job time | Small files or missing optimization | Enable Optimized Write or run table maintenance |
| Streaming micro-batch latency increasing | Checkpoint overhead or partition mismatch | Tune trigger interval and Event Hub partitions |
For detailed procedures, see the reference guides:
Run the Fabric Spark diagnostics script to collect Spark application metrics via the Fabric REST API:
./scripts/Get-FabricSparkDiagnostics.ps1 -WorkspaceId "<guid>" -Token "<bearer-token>"Use the performance analysis notebook template as a starting point for in-session diagnostics:
# Paste into a Fabric notebook to analyze current session performance| Problem | Check | Resolution |
|---|---|---|
| Autotune not activating | Runtime version, HC mode, private endpoint | Switch to Runtime 1.1/1.2, disable HC mode |
| Resource profile not applying | Environment publish status | Republish environment after profile change |
| Pool autoscale not scaling up | Capacity SKU limits | Verify VCore headroom in Capacity Metrics app |
| Table maintenance job stuck | Concurrent maintenance on same table | Wait for previous job or cancel via API |
| Notebook cell shows no Spark Advisor | Runtime < 3.4 | Upgrade to Spark 3.4+ runtime |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.