I am studying Spark and I have some doubts regarding the Executor memory split. Specifically, in the Spark Apache documentation (here) is stated that:
Java Heap space is divided in to two regions Young and Old. The Young generation is meant to hold short-lived objects while the Old generation is intended for objects with longer lifetimes.
this one:
But for the Spark Executor there is another abstract split for the memory, as stated by spark apache doc (here):
Memory usage in Spark largely falls under one of two categories: execution and storage. Execution memory refers to that used for computation in shuffles, joins, sorts and aggregations, while storage memory refers to that used for caching and propagating internal data across the cluster. In Spark, execution and storage share a unified region (M).
As shown here:
I don't understand how Young Gen\Old gen are overlapped with storage\execution memory, because in the same doc (always here) is stated that:
spark.memory.fraction expresses the size of M as a fraction of the (JVM heap space - 300MiB) (default 0.6). The rest of the space (40%) is reserved for user data structures, internal metadata in Spark, and safeguarding against OOM errors in the case of sparse and unusually large records.
Where spark.memory.fraction represent the execution\storage memory part of the Java Heap
But
If the OldGen is close to being full, reduce the amount of memory used for caching by lowering spark.memory.fraction; it is better to cache fewer objects than to slow down task execution.
This seems suggesting that the oldgen is in fact the User Memory, but the following statement seems to contradict my hypothesis
If the OldGen is close to being full, alternatively, consider decreasing the size of the Young generation.
What am I no seeing?
How is Young Gen\Old Gen split related to the spark fraction \ User Memory?

