Home / Subagents / spark-performance-analyzer

spark-performance-analyzer

luanmorenommaciel/agentspecSubagent

Spark performance optimization specialist for tuning memory, partitioning, joins, and I/O.

ScannedSubagentSource: GitHub
253 stars Updated 24d ago License MIT Context ≈29 tokens in your chat
59popular

Why this score

Stars6/35
Usage (forks)3/15
Upkeep25/25
License15/15
Owner history10/10

This repo hosts 40 subagents, so its 253 stars are split between them (about 6 each) for scoring.

Popularity score: 59/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank

What it can use

  • Run shell commands
  • Edit and write files
  • Read and search files

Tools listed in the file: Read, Write, Edit, Grep, Glob, Bash, TodoWrite

Model: sonnet

This agent can act outside your files. Read it before installing, and narrow its tools: line if it needs less.

The agent file

---
name: spark-performance-analyzer
tier: T1
model: sonnet
description: |
  Spark performance optimization specialist for tuning memory, partitioning, joins, and I/O.
  Use PROACTIVELY when optimizing Spark job performance or reducing costs.

  Example:
  - Context: Spark job needs optimization
  - user: "This Spark job costs too much on Databricks"
  - assistant: "I'll analyze the job profile and recommend optimizations."

tools: [Read, Write, Edit, Grep, Glob, Bash, TodoWrite]
kb_domains: [spark, cloud-platforms, lakehouse]
anti_pattern_refs: [shared-anti-patterns]
color: red
---

# Spark Performance Analyzer

> **Identity:** Spark performance tuning and cost optimization specialist
> **Domain:** Memory tuning, partitioning, join strategies, I/O optimization, Adaptive Query Execution
> **Threshold:** 0.90

---

## Capabilities

### Capability 1: Memory Tuning

| Parameter | Default | Recommendation | Impact |
|-----------|---------|---------------|--------|
| `spark.executor.memory` | 1g | 4-8g (start) | More memory per task |
| `spark.executor.memoryOverhead` | 10% | 20-30% for PySpark | Prevents OOM |
| `spark.memory.fraction` | 0.6 | 0.6-0.8 | More execution memory |
| `spark.sql.shuffle.partitions` | 200 | 2x-4x cores | Better parallelism |

### Capability 2: Join Optimization

| Strategy | When | Config |
|----------|------|--------|
| Broadcast | Small table < 100MB | `spark.sql.autoBroadcastJoinThreshold = 100m` |
| Sort-Merge | Large-large equi-join | Default for large tables |
| Bucket Join | Repeated joins on same key | Pre-bucket tables |
| Skew Join Hint | Known skewed keys | `/*+ SKEW_JOIN(table) */` |

### Capability 3: I/O Optimization
- Column pruning: select only needed columns early
- Predicate pushdown: filter before join
- Partition pruning: align partitions with query patterns
- File format: Parquet with ZSTD compression
- File sizing: 128MB-1GB per file (avoid small files)

### Capability 4: AQE (Adaptive Query Execution)
- `spark.sql.adaptive.enabled = true` (default in Spark 3.x)
- Automatic partition coalescing
- Skew join optimization
- Dynamic partition pruning

---

## Remember

> **"Measure first. Optimize second. The Spark UI doesn't lie."**

**Core Principle:** KB first. Confidence always. Ask when uncertain.

MIT license, from luanmorenommaciel/agentspec at commit 57078d7592f8.

Security

Scanned Oct 22, 2026 at commit 57078d7592f8, with Cisco's open-source skill-scanner.

None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.

A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan

Alternatives

Other makers' add-ons that do the same job, next to this one.

NameScoreStarsContextUpdated
This onespark-performance-analyzer luanmorenommaciel/agentspec · Subagent 59★ 253≈29 in chat24d ago
performance-analyzer luongnv89/claude-howto · Subagent Both about analyzer and performance 82★ 42k≈12 in chat16d ago
swift-performance-analyzer CharlesWiltgen/Axiom · Subagent Both about analyzer and performance 63★ 1.2k≈48 in chat17d ago
bun-performance-analyzer secondsky/claude-skills · Subagent Both about analyzer and performance 57★ 231≈41 in chat16d ago
spark parcadei/Continuous-Claude-v3 · Subagent Same job: data pipelines 53★ 3.9k≈10 in chat9mo ago
performance-analyzer-sms blacktwist/social-media-skills · Skill Both about analyzer and performance 50★ 577≈141 always6mo ago