HomeInterview QuestionsIf one executor is taking 90% of the execution tim…

If one executor is taking 90% of the execution time while the rest handle only 10%, how would you handle this imbalance?

🟡 Medium Conceptual Junior level
1Times asked
Jul 2026Last seen
Jul 2026First seen

💡 Model Answer

This imbalance usually indicates data skew or an uneven partitioning strategy. Steps to resolve:

  1. Identify the skewed key – use Spark UI or logs to find which partition is large.
  2. Salting – prepend a random number to the skewed key before the shuffle, then remove it after the join.
  3. Broadcast join – if the skewed side is small, broadcast it.
  4. Repartition – increase the number of partitions or use a custom partitioner to spread data.
  5. Adaptive Query Execution (AQE) – enable spark.sql.adaptive.enabled=true and spark.sql.adaptive.skewJoin.enabled=true to let Spark automatically handle skew.
  6. 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