Skip to content

Commit 2933d16

Browse files
authored
chore: Add scripts for running benchmark based on TPC-DS (#2042)
1 parent 633b25d commit 2933d16

File tree

13 files changed

+714
-366
lines changed

13 files changed

+714
-366
lines changed

dev/benchmarks/comet-tpcds.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
$SPARK_HOME/sbin/stop-master.sh
22+
$SPARK_HOME/sbin/stop-worker.sh
23+
24+
$SPARK_HOME/sbin/start-master.sh
25+
$SPARK_HOME/sbin/start-worker.sh $SPARK_MASTER
26+
27+
$SPARK_HOME/bin/spark-submit \
28+
--master $SPARK_MASTER \
29+
--jars $COMET_JAR \
30+
--driver-class-path $COMET_JAR \
31+
--conf spark.driver.memory=8G \
32+
--conf spark.executor.instances=2 \
33+
--conf spark.executor.cores=8 \
34+
--conf spark.cores.max=16 \
35+
--conf spark.executor.memory=16g \
36+
--conf spark.memory.offHeap.enabled=true \
37+
--conf spark.memory.offHeap.size=16g \
38+
--conf spark.eventLog.enabled=true \
39+
--conf spark.driver.extraClassPath=$COMET_JAR \
40+
--conf spark.executor.extraClassPath=$COMET_JAR \
41+
--conf spark.plugins=org.apache.spark.CometPlugin \
42+
--conf spark.shuffle.manager=org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager \
43+
--conf spark.comet.cast.allowIncompatible=true \
44+
tpcbench.py \
45+
--name comet \
46+
--benchmark tpcds \
47+
--data $TPCDS_DATA \
48+
--queries $TPCDS_QUERIES \
49+
--output . \
50+
--iterations 1

dev/benchmarks/gluten-tpcds.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
export TZ=UTC
21+
22+
$SPARK_HOME/sbin/stop-master.sh
23+
$SPARK_HOME/sbin/stop-worker.sh
24+
25+
$SPARK_HOME/sbin/start-master.sh
26+
$SPARK_HOME/sbin/start-worker.sh $SPARK_MASTER
27+
28+
$SPARK_HOME/bin/spark-submit \
29+
--master $SPARK_MASTER \
30+
--conf spark.driver.memory=8G \
31+
--conf spark.executor.instances=2 \
32+
--conf spark.executor.memory=16G \
33+
--conf spark.executor.cores=8 \
34+
--conf spark.cores.max=16 \
35+
--conf spark.eventLog.enabled=true \
36+
--jars $GLUTEN_JAR \
37+
--conf spark.plugins=org.apache.gluten.GlutenPlugin \
38+
--conf spark.driver.extraClassPath=${GLUTEN_JAR} \
39+
--conf spark.executor.extraClassPath=${GLUTEN_JAR} \
40+
--conf spark.memory.offHeap.enabled=true \
41+
--conf spark.memory.offHeap.size=16g \
42+
--conf spark.gluten.sql.columnar.forceShuffledHashJoin=true \
43+
--conf spark.shuffle.manager=org.apache.spark.shuffle.sort.ColumnarShuffleManager \
44+
--conf spark.sql.session.timeZone=UTC \
45+
tpcbench.py \
46+
--name gluten \
47+
--benchmark tpcds \
48+
--data $TPCDS_DATA \
49+
--queries $TPCDS_QUERIES \
50+
--output . \
51+
--iterations 1

dev/benchmarks/spark-tpcds.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
$SPARK_HOME/sbin/stop-master.sh
22+
$SPARK_HOME/sbin/stop-worker.sh
23+
24+
$SPARK_HOME/sbin/start-master.sh
25+
$SPARK_HOME/sbin/start-worker.sh $SPARK_MASTER
26+
27+
$SPARK_HOME/bin/spark-submit \
28+
--master $SPARK_MASTER \
29+
--conf spark.driver.memory=8G \
30+
--conf spark.executor.instances=2 \
31+
--conf spark.executor.cores=8 \
32+
--conf spark.cores.max=16 \
33+
--conf spark.executor.memory=16g \
34+
--conf spark.memory.offHeap.enabled=true \
35+
--conf spark.memory.offHeap.size=16g \
36+
--conf spark.eventLog.enabled=true \
37+
tpcbench.py \
38+
--name spark \
39+
--benchmark tpcds \
40+
--data $TPCDS_DATA \
41+
--queries $TPCDS_QUERIES \
42+
--output . \
43+
--iterations 1
3.19 KB
Loading
-354 Bytes
Loading
-760 Bytes
Loading
-1.6 KB
Loading

0 commit comments

Comments
 (0)