Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spark executor max memory limit

Am wondering if there is any size limit to Spark executor memory ?

Considering the case of running a badass job doing collect, unions, count, etc.

Just a bit of context, let's say I have these resources (2 machines)

Cores: 40 cores, Total = 80 cores
Memory: 156G, Total = 312

What's the recommendation, bigger vs smaller executors ?

like image 457
Adetiloye Philip Kehinde Avatar asked Sep 13 '26 07:09

Adetiloye Philip Kehinde


1 Answers

The suggestion by Spark development team is to not have an executor that is more than 64GB or so (often mentioned in training videos by Databricks). The idea is that a larger JVM will have a larger Heap that can result in really slow garbage collection cycles.

I think is a good practice to have your executors 32GB or even 24GB or 16GB. So instead of having one large one you have 2-4 smaller ones.

It will perhaps have some more coordination overhead, but I think these should be ok for the vast majority of applications.

If you have not read this post, please do.

like image 170
marios Avatar answered Sep 16 '26 11:09

marios



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!