Add revocable memory and reserved memory pool docs to spill
Cherry-pick of and
@@ -48,6 +48,24 @@ memory intensive queries. It is still possible that the query runner will fail
to divide intermediate data into chunks small enough that every chunk fits into
memory, leading to ``Out of memory`` errors while loading the data from disk.
+Revocable memory and reserved pool
+----------------------------------
+
+Both reserved memory pool and revocable memory are designed to cope with low memory conditions.
+When user memory pool is exhausted then a single query will be promoted to a reserved pool.
+In such case only that query is allowed to progress thus reducing cluster
+concurrency. Revocable memory will try to prevent that by triggering spill.
+Reserved pool is of ``query.max-total-memory-per-node`` size. If
+``query.max-total-memory-per-node`` is large compared to the total memory
+available on the node, then the general memory pool may not have enough
+memory to run larger queries. If spill is enabled, then this will cause
+excessive spilling for queries that consume large amounts of memory per node.
+These queries would finish much quicker if spill were disabled because they
+would execute in the reserved pool. However, doing so could also significantly
+reduce cluster concurrency. In such a situation we recommend disabling the
+reserved memory pool via the ``experimental.reserved-pool-enabled`` config
+property.
+
Spill Disk Space
----------------
