spark-optimization

Optimize Spark jobs with partitioning, memory tuning, and shuffle optimization.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/haxlys/skills --skill spark-optimization-haxlys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spark-optimization
Source: https://github.com/haxlys/skills/tree/main/vendored/wshobson-agents/plugins/data-engineering/skills/spark-optimization
Command: npx skills add https://github.com/haxlys/skills --skill spark-optimization-haxlys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizes slow Spark jobs by applying proven tuning patterns for partitions, memory, and shuffle management, helping teams extract more throughput from large-scale data pipelines.

Core Features & Use Cases

  • Partitioning and coalescing for balanced task distribution and reduced shuffle overhead.
  • Memory tuning and adaptive execution (AQE) to minimize spills and GC pauses.
  • Join and data-format optimizations (e.g., caching, bucketing, Parquet/Delta) to speed up analytics.

Quick Start

Configure a SparkSession with AQE enabled, apply common optimization patterns (partitioning, memory tuning, and cache strategies) to your existing job, and validate throughput improvements.

Frequently Asked Questions about spark-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow Spark jobs caused by shuffle overhead?

Optimize slow Spark jobs by applying partitioning and coalescing patterns to balance task distribution, directly reducing shuffle overhead and improving overall pipeline throughput.

What's the best way to tune Spark memory for large-scale data workloads?

Tune Spark memory for large-scale data workloads by adjusting memory configurations and enabling adaptive execution (AQE) to minimize disk spills and reduce garbage collection pauses.

How does adaptive query execution improve Spark batch ETL performance?

Adaptive query execution (AQE) improves Spark batch ETL performance by dynamically coalescing partitions and optimizing shuffle stages at runtime, which minimizes memory pressure and ensures scalable runs.

Can I use Spark partitioning and caching to speed up analytics pipelines?

You can speed up Spark analytics pipelines by applying partitioning, caching strategies, and data-format optimizations like Parquet or Delta to accelerate join operations and data reads.

Why does my Spark job experience memory pressure during large-scale data processing?

Spark jobs experience memory pressure during large-scale data processing when memory configurations are untuned, causing excessive spills and garbage collection pauses that bottleneck throughput.

When should I apply bucketing and data-format optimizations in Spark?

Apply bucketing and data-format optimizations like Parquet or Delta in Spark when you need to speed up analytics pipelines by reducing shuffle overhead and accelerating repeated join operations.