You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2024/08/19 20:47:24 UTC
[PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
andygrove opened a new pull request, #848:
URL: https://github.com/apache/datafusion-comet/pull/848
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## How are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#discussion_r1722362908
##########
benchmarks/README.md:
##########
@@ -0,0 +1,104 @@
+<!--
+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.
+-->
+
+# Running Comet Benchmarks in Microk8s
+
+This guide explains how to run benchmarks derived from TPC-H and TPC-DS in Apache DataFusion Comet deployed in a
+local Microk8s cluster.
+
+## Use Microk8s locally
+
+Install Micro8s following the instructions at https://microk8s.io/docs/getting-started and then perform these
+additional steps, ensuring that any existing kube config is backed up first.
+
+```shell
+mkdir -p ~/.kube
+microk8s config > ~/.kube/config
+
+microk8s enable dns
+microk8s enable registry
+
+microk8s kubectl create serviceaccount spark
+```
+
+## Build Comet Docker Image
+
+Run the following command from the root of this repository to build the Comet Docker image, or use a published
+Docker image from https://github.com/orgs/apache/packages?repo_name=datafusion-comet
+
+```shell
+docker build -t apache/datafusion-comet -f kube/Dockerfile .
+```
+
+## Build Comet Benchmark Docker Image
+
+Build the benchmark Docker image and push to the Microk8s Docker registry.
+
+```shell
+docker build -t apache/datafusion-comet-tpcbench .
+docker tag apache/datafusion-comet-tpcbench localhost:32000/apache/datafusion-comet-tpcbench:latest
+docker push localhost:32000/apache/datafusion-comet-tpcbench:latest
+```
+
+## Run benchmarks
+
+```shell
+export COMET_DOCKER_IMAGE=localhost:32000/apache/datafusion-comet-tpcbench:latest
+
+# Location of Comet JAR within the Docker image
+export COMET_JAR=/opt/spark/jars/comet-spark-spark3.4_2.12-0.2.0-SNAPSHOT.jar
+
+$SPARK_HOME/bin/spark-submit \
+ --master k8s://https://127.0.0.1:16443 \
+ --deploy-mode cluster \
+ --name comet-tpcbench \
+ --driver-memory 8G \
+ --conf spark.driver.memory=8G \
+ --conf spark.executor.instances=1 \
+ --conf spark.executor.memory=32G \
+ --conf spark.executor.cores=8 \
+ --conf spark.cores.max=8 \
+ --conf spark.task.cpus=1 \
+ --conf spark.executor.memoryOverhead=3G \
+ --jars local://$COMET_JAR \
+ --conf spark.executor.extraClassPath=$COMET_JAR \
+ --conf spark.driver.extraClassPath=$COMET_JAR \
+ --conf spark.plugins=org.apache.spark.CometPlugin \
Review Comment:
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#discussion_r1722361682
##########
benchmarks/Dockerfile:
##########
@@ -0,0 +1,24 @@
+#
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#discussion_r1722365476
##########
benchmarks/README.md:
##########
@@ -0,0 +1,104 @@
+<!--
+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.
+-->
+
+# Running Comet Benchmarks in Microk8s
+
+This guide explains how to run benchmarks derived from TPC-H and TPC-DS in Apache DataFusion Comet deployed in a
+local Microk8s cluster.
+
+## Use Microk8s locally
+
+Install Micro8s following the instructions at https://microk8s.io/docs/getting-started and then perform these
+additional steps, ensuring that any existing kube config is backed up first.
+
+```shell
+mkdir -p ~/.kube
+microk8s config > ~/.kube/config
+
+microk8s enable dns
+microk8s enable registry
+
+microk8s kubectl create serviceaccount spark
+```
+
+## Build Comet Docker Image
+
+Run the following command from the root of this repository to build the Comet Docker image, or use a published
+Docker image from https://github.com/orgs/apache/packages?repo_name=datafusion-comet
+
+```shell
+docker build -t apache/datafusion-comet -f kube/Dockerfile .
+```
+
+## Build Comet Benchmark Docker Image
+
+Build the benchmark Docker image and push to the Microk8s Docker registry.
+
+```shell
+docker build -t apache/datafusion-comet-tpcbench .
+docker tag apache/datafusion-comet-tpcbench localhost:32000/apache/datafusion-comet-tpcbench:latest
+docker push localhost:32000/apache/datafusion-comet-tpcbench:latest
+```
+
+## Run benchmarks
+
+```shell
+export COMET_DOCKER_IMAGE=localhost:32000/apache/datafusion-comet-tpcbench:latest
+
+# Location of Comet JAR within the Docker image
+export COMET_JAR=/opt/spark/jars/comet-spark-spark3.4_2.12-0.2.0-SNAPSHOT.jar
+
+$SPARK_HOME/bin/spark-submit \
+ --master k8s://https://127.0.0.1:16443 \
+ --deploy-mode cluster \
+ --name comet-tpcbench \
+ --driver-memory 8G \
+ --conf spark.driver.memory=8G \
+ --conf spark.executor.instances=1 \
Review Comment:
for benches its probably good to run it in scale? to put instances > 1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#discussion_r1725452044
##########
benchmarks/README.md:
##########
@@ -0,0 +1,104 @@
+<!--
+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.
+-->
+
+# Running Comet Benchmarks in Microk8s
+
+This guide explains how to run benchmarks derived from TPC-H and TPC-DS in Apache DataFusion Comet deployed in a
+local Microk8s cluster.
+
+## Use Microk8s locally
+
+Install Micro8s following the instructions at https://microk8s.io/docs/getting-started and then perform these
+additional steps, ensuring that any existing kube config is backed up first.
+
+```shell
+mkdir -p ~/.kube
+microk8s config > ~/.kube/config
+
+microk8s enable dns
+microk8s enable registry
+
+microk8s kubectl create serviceaccount spark
+```
+
+## Build Comet Docker Image
+
+Run the following command from the root of this repository to build the Comet Docker image, or use a published
+Docker image from https://github.com/orgs/apache/packages?repo_name=datafusion-comet
+
+```shell
+docker build -t apache/datafusion-comet -f kube/Dockerfile .
+```
+
+## Build Comet Benchmark Docker Image
+
+Build the benchmark Docker image and push to the Microk8s Docker registry.
+
+```shell
+docker build -t apache/datafusion-comet-tpcbench .
+docker tag apache/datafusion-comet-tpcbench localhost:32000/apache/datafusion-comet-tpcbench:latest
+docker push localhost:32000/apache/datafusion-comet-tpcbench:latest
+```
+
+## Run benchmarks
+
+```shell
+export COMET_DOCKER_IMAGE=localhost:32000/apache/datafusion-comet-tpcbench:latest
+
+# Location of Comet JAR within the Docker image
+export COMET_JAR=/opt/spark/jars/comet-spark-spark3.4_2.12-0.2.0-SNAPSHOT.jar
+
+$SPARK_HOME/bin/spark-submit \
+ --master k8s://https://127.0.0.1:16443 \
+ --deploy-mode cluster \
+ --name comet-tpcbench \
+ --driver-memory 8G \
+ --conf spark.driver.memory=8G \
+ --conf spark.executor.instances=1 \
Review Comment:
This is really meant as an example. I would expect users to customize the script for their local environment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#discussion_r1722334099
##########
benchmarks/Dockerfile:
##########
@@ -0,0 +1,26 @@
+#
+# 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.
+
+FROM apache/datafusion-comet:latest
+
+RUN apt update \
+ && apt install -y git python3 python3-pip \
+ && apt clean
+
+RUN cd /opt \
+ && git clone https://github.com/andygrove/datafusion-benchmarks.git \
+ && cd datafusion-benchmarks \
+ && git checkout tpcds
Review Comment:
I will update this to use official repo once I have a PR merged over there
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#issuecomment-2310945851
@andygrove are you planning to merge it, I'd also like to add the Helm chart section to run in the Kubernetes cluster
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: Add documentation on running benchmarks with Microk8s [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #848:
URL: https://github.com/apache/datafusion-comet/pull/848#discussion_r1722341476
##########
benchmarks/Dockerfile:
##########
@@ -0,0 +1,26 @@
+#
+# 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.
+
+FROM apache/datafusion-comet:latest
+
+RUN apt update \
+ && apt install -y git python3 python3-pip \
+ && apt clean
+
+RUN cd /opt \
+ && git clone https://github.com/andygrove/datafusion-benchmarks.git \
+ && cd datafusion-benchmarks \
+ && git checkout tpcds
Review Comment:
https://github.com/apache/datafusion-benchmarks/pull/12
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org