Start here
A setting is a named value that tells Spark how to run, such as spark.executor.memory. Spark has hundreds of settings.
Only a few decide if a job is fast or slow. This chapter shows those few, and how to work out their values from your data and your cluster.
You already know the parts. An executor is a process on a worker machine that runs tasks. A partition is one piece of the data.
You know the memory model from "Memory Management & Tungsten". You know how to read the Spark UI from "Performance Tuning & Debugging with the Spark UI". Now you set the numbers.
The chapter has seven parts.
- Where you can set a value, and which place wins.
- Which settings cannot change after the job starts.
- The formula for executors, cores and memory.
- A full example on a real-size cluster.
- How to choose the number of shuffle partitions.
- How the numbers change with the size of your data.
- Dynamic allocation: adding and removing executors.
Every number in this chapter is a starting point. Run the job, read the Spark UI, then adjust.
