Add options to support Profile Guided Optimization#5160
Add options to support Profile Guided Optimization#5160ti-chi-bot merged 9 commits intopingcap:masterfrom
Profile Guided Optimization#5160Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
cool,good autofdo results. |
|
/lgtm |
|
Add benchmark about tpch100 with 3 tiflash nodes. PTAL @zanmato1984 . |
|
/hold |
|
/merge |
|
@solotzg: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 92072a8 |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
|
/unhold |
|
@solotzg: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #4909
What is changed and how it works?
doc: https://solotzg.github.io/2022/06/01/system/cpp-compile-optimize/#PGO%EF%BC%88Profile-Guided-Optimization%EF%BC%89
Profile Guided Optimization aka
Feedback Directed Optimizationmake it possible to achieve better optimization by profile information. This PR supports profile guided optimization with two different kinds of profiling:ENABLE_LLVM_PGOandENABLE_LLVM_PGO_USE_SAMPLE, then recompile.TIFLASH_LLVM_PROFDATA=xxxxfor recompiling.ENABLE_LLVM_PROFILE_INSTRto generate instrumented code and recompile.LLVM_PROFILE_FILE=xxxxthen start program and run benchmark to collect profile dataprofdata merge -output=xxxx xxxx.profrawENABLE_LLVM_PGOand env varTIFLASH_LLVM_PROFDATA=xxxxfor recompilingProfiling with Instrumentationwill harm performance, and CAN NOT collect the real online profile info. So it's recommended to use the sampling way.Benchmark-10G
env:
workload:
steps:
-DENABLE_LLVM_PGO=ON -DENABLE_LLVM_PGO_USE_SAMPLE=ONcreate_llvm_proffor converting perf data to llvm profile data<pid>python3 perf-tpch.py --perf --pid <pid> --workload <workload-scripts-path> --convert-llvm --convert-tool <create_llvm_prof-path> --binary <tiflash-bianry-path>tiflash.llvm.code.profby default)TIFLASH_LLVM_PROFDATA=<output-perf-file>and cmake option-DENABLE_LLVM_PGO=ON -DENABLE_LLVM_PGO_USE_SAMPLE=ONUpdated in 2022-07-08
version info with
pgo-sampleandfdoBenchmark-100G
env:
Conclusion
Except Q1, io/net/schedule-wait cause much more latency in other queries when using multi nodes with large data. We believe if usage about cpu resource is relatively high, the improvement brought by fdo will be better.
Check List
Tests
Side effects
Documentation
Release note