You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Which issue does this PR close?
Closes#1388
## Rationale for this change
Following up on #1369 and #1386
## What changes are included in this PR?
Updated the doc
## How are these changes tested?
Copy file name to clipboardExpand all lines: docs/source/user-guide/tuning.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,21 @@ Comet provides some tuning options to help you get the best performance from you
28
28
The recommended way to share memory between Spark and Comet is to set `spark.memory.offHeap.enabled=true`. This allows
29
29
Comet to share an off-heap memory pool with Spark. The size of the pool is specified by `spark.memory.offHeap.size`. For more details about Spark off-heap memory mode, please refer to Spark documentation: https://spark.apache.org/docs/latest/configuration.html.
30
30
31
+
The type of pool can be specified with `spark.comet.exec.memoryPool`.
32
+
33
+
The valid pool types are:
34
+
35
+
-`unified` (default when `spark.memory.offHeap.enabled=true` is set)
36
+
-`fair_unified`
37
+
38
+
The `unified` pool type implements a greedy first-come first-serve limit. This pool works well for queries that do not
39
+
need to spill or have a single spillable operator.
40
+
41
+
The `fair_unified` pool type prevents operators from using more than an even fraction of the available memory
42
+
(i.e. `pool_size / num_reservations`). This pool works best when you know beforehand
43
+
the query has multiple operators that will likely all need to spill. Sometimes it will cause spills even
44
+
when there is sufficient memory in order to leave enough memory for other operators.
45
+
31
46
### Dedicated Comet Memory Pools
32
47
33
48
Spark uses on-heap memory mode by default, i.e., the `spark.memory.offHeap.enabled` setting is not enabled. If Spark is under on-heap memory mode, Comet will use its own dedicated memory pools that
@@ -48,6 +63,7 @@ The valid pool types are:
48
63
-`fair_spill`
49
64
-`fair_spill_global`
50
65
-`fair_spill_task_shared`
66
+
-`unbounded`
51
67
52
68
Pool types ending with `_global` use a single global memory pool between all tasks on same executor.
53
69
@@ -61,13 +77,19 @@ pool works well for queries that do not need to spill or have a single spillable
61
77
62
78
The `fair_spill*` pool types use DataFusion's [FairSpillPool], which prevents spillable reservations from using more
63
79
than an even fraction of the available memory sans any unspillable reservations
64
-
(i.e. `(pool_size - unspillable_memory) / num_spillable_reservations)`). This pool works best when you know beforehand
80
+
(i.e. `(pool_size - unspillable_memory) / num_spillable_reservations`). This pool works best when you know beforehand
65
81
the query has multiple spillable operators that will likely all need to spill. Sometimes it will cause spills even
66
82
when there was sufficient memory (reserved for other operators) to avoid doing so. Unspillable memory is allocated in
67
83
a first-come, first-serve fashion
68
84
85
+
The `unbounded` pool type uses DataFusion's [UnboundedMemoryPool], which enforces no limit. This option is useful for
86
+
development/testing purposes, where there is no room to allow spilling and rather choose to fail the job.
87
+
Spilling significantly slows down the job and this option is one way to measure the best performance scenario without
0 commit comments