-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Add Tuning Guide with shuffle configs
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!--- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
# Tuning Guide | ||
|
||
Comet provides some tuning options to help you get the best performance from your queries. | ||
|
||
|
||
## Shuffle | ||
|
||
Comet provides Comet shuffle features that can be used to improve the performance of your queries. | ||
The following sections describe the different shuffle options available in Comet. | ||
|
||
To enable Comet shuffle, set the following configuration in your Spark configuration: | ||
|
||
``` | ||
spark.shuffle.manager=org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager | ||
spark.comet.exec.shuffle.enabled=true | ||
``` | ||
|
||
`spark.shuffle.manager` is a Spark static configuration which cannot be changed at runtime. | ||
It must be set before the Spark context is created. You can enable or disable Comet shuffle | ||
at runtime by setting `spark.comet.exec.shuffle.enabled` to `true` or `false`. | ||
Once it is disabled, Comet will fallback to the default Spark shuffle manager. | ||
|
||
### Columnar Shuffle | ||
|
||
By default, once `spark.comet.exec.shuffle.enabled` is enabled, Comet uses columnar shuffle | ||
to improve the performance of shuffle operations. Columnar shuffle supports HashPartitioning, | ||
RoundRobinPartitioning, RangePartitioning and SinglePartitioning. | ||
|
||
Columnar shuffle can be disabled by setting `spark.comet.columnar.shuffle.enabled` to `false`. | ||
|
||
### Native Shuffle | ||
|
||
Comet also provides a fully native shuffle implementation that can be used to improve the performance. | ||
To enable native shuffle, just disable `spark.comet.columnar.shuffle.enabled`. | ||
|
||
Native shuffle only supports HashPartitioning and SinglePartitioning. | ||
|
||
|
||
|
||
|
||
|