Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-7641][VL] Add perf analysis scripts for TPCH workload #8065

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@ dist/

# For Hive
metastore_db/

.ipynb_checkpoints
27 changes: 27 additions & 0 deletions tools/workload/benchmark_velox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,30 @@ We also provide a script [run_tpc_workload.sh](./run_tpc_workload.sh). This scri
## Analyzing Performance Results

You can check the **Show Performance** section in the output notebook after execution. It shows the cpu% per query, and draws charts for the cpu%, memory throughput, disk throughput/util%, network throughput and pagefaults.

## Set up Performance Analysis Tools

Please check the **Set up perf analysis tools (optional)** section in [initialize.ipynb](./initialize.ipynb) to set up the environment required for running performance analysis scripts. Once the setup is complete, update the following variables in your YAML file (as documented in [params.yaml.template](./params.yaml.template)) before running TPC-H/TPC-DS Benchmarks:

- server: Hostname or IP to server for perf analysis. Able to connect via ssh. Can be localhost if you deploy the perf analysis scripts on the local cluster.
- base_dir: Specify the directory on perf analysis server. Usually a codename for this run.
- analyze_perf: Whether to upload profile to perf analysis server and run perf analysis scripts. Only takes effect if server is set. In this case set to `True`
- proxy: Proxy used to connect to server for perf analysis. Only needed if the perf analysis server is accessed via proxy.

After the workload completes, the tool generates a notebook, executes it automatically, and saves the output notebook in the `$HOME/PAUS/base_dir` directory with a suffix of `[APPLICATION ID].nbconvert.ipynb`. Additionally, the output notebook is converted into an HTML format for improved readability, with the same filename, and stored in the `html` sub-folder.

A sample generated notebook for TPCH Q1 and its corresponding HTML file are available for reference:
- Notebook: [tpch_q1.nbconvert.ipynb](./sample/tpch_q1.nbconvert.ipynb)
- HTML file: [tpch_q1.html](./sample/tpch_q1.html)

The notebook also produces a trace-viewer JSON file to analyze workload statistics. This includes SAR metrics and stage/task-level breakdowns. Using this tool, users can compare statistics across stages and queries, identify performance bottlenecks, and target specific stages for optimization.

You can explore the sample trace-viewer JSON file using the Google Chrome browser. To do so:

1. Download the sample file [trace_result_tpch_q1.json](./sample/trace_result_tpch_q1.json)
2. Launch Google Chrome. In the address bar, enter "chrome://tracing/".
3. Use the "Load" button to upload the sample JSON file.

This will allow you to check the sample trace data interactively.

![trace-result-tpch-q1](./sample/Trace-viewer.png)
Loading
Loading