fabric-delta-spark-perf — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited fabric-delta-spark-perf (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 and resolving Apache Spark and Delta Lake performance issues in Microsoft Fabric Lakehouse environments.
Activate when the user mentions any of the following:
When a user reports slow Spark performance, follow this triage sequence:
| Symptom | Likely Root Cause | Jump To |
|---|---|---|
| Job runs much longer than expected | Data skew or small files | Step 2 |
| OOM error on driver | collect(), toPandas(), or large broadcast | diagnostic-checklist.md |
| OOM error on executor | Wide joins, large shuffles, insufficient memory | diagnostic-checklist.md |
| Many tasks, most finish fast, few stragglers | Data skew | diagnostic-checklist.md |
| High shuffle read/write in Spark UI | Missing broadcast join or too many partitions | diagnostic-checklist.md |
| Query reads thousands of small files | Small file problem, needs OPTIMIZE | Step 3 |
| Capacity throttled (HTTP 430) | Too many concurrent jobs for SKU | spark-configurations.md |
| Streaming lag increasing | Microbatch interval or partition mismatch | diagnostic-checklist.md |
Run the diagnostic script to detect skew in a target table:
# Quick skew detection
df = spark.read.format("delta").table("your_table")
df.groupBy("partition_column") \
.count() \
.orderBy(F.desc("count")) \
.show(20)If the top partition has 10x+ more rows than the median, apply skew mitigation. See diagnostic-checklist.md for remediation steps.
# Check file count and sizes for a Delta table
from delta.tables import DeltaTable
dt = DeltaTable.forName(spark, "your_table")
detail = spark.sql("DESCRIBE DETAIL your_table")
detail.select("numFiles", "sizeInBytes").show()
# Check for small files (< 32MB)
files_df = spark.sql("DESCRIBE DETAIL your_table")If file count is high relative to data volume (e.g., >1000 files for <10GB), run OPTIMIZE. See table-maintenance-guide.md.
Check that the environment has an appropriate resource profile:
# Check current resource profile
print(spark.conf.get("spark.fabric.resourceProfile", "not set"))
# Check key write/read settings
configs = [
"spark.sql.parquet.vorder.default",
"spark.databricks.delta.optimizeWrite.enabled",
"spark.databricks.delta.optimizeWrite.binSize",
"spark.sql.shuffle.partitions",
"spark.sql.autoBroadcastJoinThreshold",
"spark.sql.files.maxPartitionBytes",
"spark.databricks.optimizer.adaptive.enabled"
]
for c in configs:
try:
print(f"{c} = {spark.conf.get(c)}")
except:
print(f"{c} = (default)")See spark-configurations.md for recommended values per workload type.
After identifying the root cause, apply the appropriate fix from the references:
| Root Cause | Fix | Reference |
|---|---|---|
| Small files | Run OPTIMIZE with V-Order | table-maintenance-guide.md |
| Stale files bloating storage | Run VACUUM with 7+ day retention | table-maintenance-guide.md |
| Data skew on joins | Enable AQE skew join + key salting | diagnostic-checklist.md |
| Wrong resource profile | Switch to appropriate profile | spark-configurations.md |
| Driver OOM | Avoid collect(), increase driver memory | diagnostic-checklist.md |
| Executor OOM | Increase executor memory, reduce partition size | diagnostic-checklist.md |
| Excessive shuffling | Use broadcast joins for small tables | diagnostic-checklist.md |
| V-Order not applied | Enable at table or session level | table-maintenance-guide.md |
| Script | Purpose |
|---|---|
| diagnose-delta-performance.py | Automated diagnostic scan: file health, skew detection, config audit |
| table-maintenance.py | Run OPTIMIZE + VACUUM across all tables in a Lakehouse schema |
| Template | Purpose |
|---|---|
| notebook-performance-template.py | Starter notebook with performance best practices baked in |
writeHeavy (V-Order off, stats collection off). Read-heavy analytics should use readHeavyForSpark or readHeavyForPBI (V-Order on, Optimized Write on).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.