If one executor is taking 90% of the execution time while the rest handle only 10%, how would you handle this imbalance?
1Times asked
Jul 2026Last seen
Jul 2026First seen
💡 Model Answer
This imbalance usually indicates data skew or an uneven partitioning strategy. Steps to resolve:
- Identify the skewed key – use Spark UI or logs to find which partition is large.
- Salting – prepend a random number to the skewed key before the shuffle, then remove it after the join.
- Broadcast join – if the skewed side is small, broadcast it.
- Repartition – increase the number of partitions or use a custom partitioner to spread data.
- Adaptive Query Execution (AQE) – enable
spark.sql.adaptive.enabled=trueandspark.sql.adaptive.skewJoin.enabled=trueto let Spark automatically handle skew. - Resource tuning – increase executor memory or cores if the heavy partition still dominates.
By applying these techniques, the workload can be balanced across executors, reducing the 90/10 split.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500