diff --git a/core/src/main/scala/org/apache/spark/internal/config/package.scala b/core/src/main/scala/org/apache/spark/internal/config/package.scala index 0aed1af023f8..8bf615b23383 100644 --- a/core/src/main/scala/org/apache/spark/internal/config/package.scala +++ b/core/src/main/scala/org/apache/spark/internal/config/package.scala @@ -60,7 +60,7 @@ package object config { .createWithDefaultString("1g") private[spark] val DRIVER_MEMORY_OVERHEAD = ConfigBuilder("spark.driver.memoryOverhead") - .doc("The amount of off-heap memory to be allocated per driver in cluster mode, " + + .doc("The amount of non-heap memory to be allocated per driver in cluster mode, " + "in MiB unless otherwise specified.") .bytesConf(ByteUnit.MiB) .createOptional @@ -185,7 +185,7 @@ package object config { .createWithDefaultString("1g") private[spark] val EXECUTOR_MEMORY_OVERHEAD = ConfigBuilder("spark.executor.memoryOverhead") - .doc("The amount of off-heap memory to be allocated per executor in cluster mode, " + + .doc("The amount of non-heap memory to be allocated per executor in cluster mode, " + "in MiB unless otherwise specified.") .bytesConf(ByteUnit.MiB) .createOptional diff --git a/docs/configuration.md b/docs/configuration.md index d0b2699a5dc7..c59626c34858 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -181,10 +181,16 @@ of the most common options to set are: spark.driver.memoryOverhead driverMemory * 0.10, with minimum of 384 - The amount of off-heap memory to be allocated per driver in cluster mode, in MiB unless - otherwise specified. This is memory that accounts for things like VM overheads, interned strings, + Amount of non-heap memory to be allocated per driver process in cluster mode, in MiB unless + otherwise specified. This is memory that accounts for things like VM overheads, interned strings, other native overheads, etc. This tends to grow with the container size (typically 6-10%). This option is currently supported on YARN, Mesos and Kubernetes. + Note: Non-heap memory includes off-heap memory + (when spark.memory.offHeap.enabled=true) and memory used by other driver processes + (e.g. python process that goes with a PySpark driver) and memory used by other non-driver + processes running in the same container. The maximum memory size of container to running + driver is determined by the sum of spark.driver.memoryOverhead + and spark.driver.memory. @@ -215,10 +221,17 @@ of the most common options to set are: spark.executor.memoryOverhead executorMemory * 0.10, with minimum of 384 - The amount of off-heap memory to be allocated per executor, in MiB unless otherwise specified. - This is memory that accounts for things like VM overheads, interned strings, other native - overheads, etc. This tends to grow with the executor size (typically 6-10%). + Amount of non-heap memory to be allocated per executor process in cluster mode, in MiB unless + otherwise specified. This is memory that accounts for things like VM overheads, interned strings, + other native overheads, etc. This tends to grow with the executor size (typically 6-10%). This option is currently supported on YARN and Kubernetes. +
+ Note: Non-heap memory includes off-heap memory + (when spark.memory.offHeap.enabled=true) and memory used by other executor processes + (e.g. python process that goes with a PySpark executor) and memory used by other non-executor + processes running in the same container. The maximum memory size of container to running executor + is determined by the sum of spark.executor.memoryOverhead and + spark.executor.memory. @@ -1233,6 +1246,9 @@ Apart from these, the following properties are also available, and may be useful If true, Spark will attempt to use off-heap memory for certain operations. If off-heap memory use is enabled, then spark.memory.offHeap.size must be positive. + Note: If off-heap memory is enabled, may need to raise the non-heap memory size + (e.g. increase spark.driver.memoryOverhead or + spark.executor.memoryOverhead).