-
Notifications
You must be signed in to change notification settings - Fork 409
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
feat: add page_stress_testing as a subcommand of tiflash #5038
feat: add page_stress_testing as a subcommand of tiflash #5038
Conversation
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
[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. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
/build |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
/build |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
run like: ./dbms/src/Server/tiflash stressworkload -M 0 -I true -V 3 -P stress -T 120
# or
ninja stress-workload
./dbms/src/Storages/Page/stress/workload/stress-workload -M 0 -I true -V 3 -P stress -T 120 |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
int StressWorkload::mainEntry(int argc, char ** argv) | ||
{ | ||
{ | ||
// maybe due to sequence of linking, REGISTER_WORKLOAD is not visible to main function in dbms/src/Server/main.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why __attribute__((constructor))
won't triggered before mainEntry
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just as the comment says, maybe due to sequence of linking, REGISTER_WORKLOAD is not visible to main function in dbms/src/Server/main.cpp
.
when we run in this way:
./dbms/src/Server/tiflash pageworkload -M 0 -I true -V 3 -P stress -T 120
__attribute__((constructor))
won't be triggered.
we run in this way:
ninja page-workload
./dbms/src/Storages/Page/stress/workload/page-workload -M 0 -I true -V 3 -P stress -T 120
it will be triggered.
I still could not find the detail reason. 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change the registration to be explicit like the function registerStorages
? __attribute__((constructor))
is not a common way and depends on specific compiler behavior.
tiflash/dbms/src/Storages/registerStorages.cpp
Lines 38 to 56 in 5b61ae7
void registerStorages() | |
{ | |
auto & factory = StorageFactory::instance(); | |
registerStorageLog(factory); | |
registerStorageTinyLog(factory); | |
registerStorageDeltaMerge(factory); | |
registerStorageStripeLog(factory); | |
registerStorageNull(factory); | |
registerStorageMerge(factory); | |
registerStorageBuffer(factory); | |
registerStorageMemory(factory); | |
registerStorageFile(factory); | |
registerStorageDictionary(factory); | |
registerStorageSet(factory); | |
registerStorageJoin(factory); | |
registerStorageView(factory); | |
registerStorageMaterializedView(factory); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still could not find the detail reason. 😢
__attribute__((constructor))
doesn't work when we compile those files into a static lib https://stackoverflow.com/questions/1202494/why-doesnt-attribute-constructor-work-in-a-static-library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change the registration to be explicit like the function
registerStorages
?__attribute__((constructor))
is not a common way and depends on specific compiler behavior.
That's how we've settled it. explicitly trigger them.
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
add_executable (page-workload Main.cpp ${page-workload-src}) | ||
target_link_libraries (page-workload dbms clickhouse_functions clickhouse-server-lib) | ||
target_compile_options (page-workload PRIVATE -Wno-format -lc++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the binary page_workload
is useless. Do you think we still need this standalone binary? @jiaqizho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would increase the compile time of tiflash
but can decrease the compile when we just want to run page-workload
only. So maybe we can keep it just like dt-workload
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I want to remove the binary of dt-workload
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will remove both of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete useless code files as well: https://github.com/pingcap/tiflash/blob/master/dbms/src/Storages/DeltaMerge/tools/workload/Main.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
include_directories (${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
add_subdirectory (workload EXCLUDE_FROM_ALL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to keep this "stress" directory? Maybe move "dbms/src/Storages/Page/stress/workload" -> "dbms/src/Storages/Page/workload"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed, the same as dbms/src/Storages/DeltaMerge/workload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comment
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
@Lloyd-Pottiger: 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. Instructions 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. Commit hash: 247ae77
|
@Lloyd-Pottiger: 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. Instructions 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 files
Coverage summary
full coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: close #5037
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note