Apache Spark makes it easy for enterprises to process data quickly and solve complex data problems easily. It is obvious that during the development of any program, it is very much important to take care of its performance. Spark optimization techniques help out with in-memory data computations. The only thing that can hinder these computations is the memory, CPU, or any other resource. Every spark optimization technique is used for a different purpose and performs certain specific actions. Some of the widely used spark optimization techniques are: 1. Serialization 2. API selection 3. Advance variable 4. Cache and persist 5. ByKey operation 6. File format selection 7. Garbage collection tuning 8. Level of parallelism