Skip to content

Commit 9505478

Browse files
authored
Add scripts for running benchmarks with Blaze (#2050)
1 parent 2955a21 commit 9505478

File tree

12 files changed

+555
-4
lines changed

12 files changed

+555
-4
lines changed

dev/benchmarks/blaze-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+
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 $BLAZE_JAR \
30+
--driver-class-path $BLAZE_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.executor.memoryOverhead=16g \
37+
--conf spark.memory.offHeap.enabled=false \
38+
--conf spark.eventLog.enabled=true \
39+
--conf spark.driver.extraClassPath=$BLAZE_JAR \
40+
--conf spark.executor.extraClassPath=$BLAZE_JAR \
41+
--conf spark.sql.extensions=org.apache.spark.sql.blaze.BlazeSparkSessionExtension \
42+
--conf spark.shuffle.manager=org.apache.spark.sql.execution.blaze.shuffle.BlazeShuffleManager \
43+
--conf spark.blaze.enable=true \
44+
--conf spark.blaze.forceShuffledHashJoin=true \
45+
tpcbench.py \
46+
--name blaze \
47+
--benchmark tpcds \
48+
--data $TPCDS_DATA \
49+
--queries $TPCDS_QUERIES \
50+
--output . \
51+
--iterations 1

dev/benchmarks/blaze-tpch.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+
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 $BLAZE_JAR \
30+
--driver-class-path $BLAZE_JAR \
31+
--conf spark.driver.memory=8G \
32+
--conf spark.executor.instances=1 \
33+
--conf spark.executor.cores=8 \
34+
--conf spark.cores.max=8 \
35+
--conf spark.executor.memory=16g \
36+
--conf spark.executor.memoryOverhead=16g \
37+
--conf spark.memory.offHeap.enabled=false \
38+
--conf spark.eventLog.enabled=true \
39+
--conf spark.driver.extraClassPath=$BLAZE_JAR \
40+
--conf spark.executor.extraClassPath=$BLAZE_JAR \
41+
--conf spark.sql.extensions=org.apache.spark.sql.blaze.BlazeSparkSessionExtension \
42+
--conf spark.shuffle.manager=org.apache.spark.sql.execution.blaze.shuffle.BlazeShuffleManager \
43+
--conf spark.blaze.enable=true \
44+
--conf spark.blaze.forceShuffledHashJoin=true \
45+
tpcbench.py \
46+
--name blaze \
47+
--benchmark tpch \
48+
--data $TPCH_DATA \
49+
--queries $TPCH_QUERIES \
50+
--output . \
51+
--iterations 1

0 commit comments

Comments
 (0)