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
Parallel qsort without OpenMP #7689
Comments
How about using std::sort and setting a parallel execution policy? |
Good point of reference on parallel sorting algorithms: https://stackoverflow.com/a/3969847 |
It requires at least GCC 10 (or GCC 9 + TBB), while we still do support GCC 4.8, but most importantly, parallel STL is actually implemented in GCC via OpenMP. |
Closes tarantool#3389 Closes tarantool#7689 Closes tarantool#4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
Closes tarantool#3389 Closes tarantool#7689 Closes tarantool#4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
Closes tarantool#3389 Closes tarantool#7689 Closes tarantool#4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
Closes tarantool#3389 Closes tarantool#7689 Closes tarantool#4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
Closes tarantool#3389 Closes tarantool#7689 Closes tarantool#4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
Closes tarantool#3389 Closes tarantool#7689 Closes tarantool#4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
Closes #3389 Closes #7689 Closes #4646 @TarantoolBot document Title: new box.cfg parameter memtx_sort_threads The parameter sets the number of threads used to sort keys of secondary indexes on loading memtx database. The parameter cannot be changed dynamically (as it does not make sense). Maximum value is 256, minimum is 1. Default is to use all available cores. Usage example: ``` box.cfg{memtx_sort_threads=4} ```
@nshy you forgot to remove this workaround: tarantool/cmake/hardening.cmake Lines 5 to 6 in de0731b
|
OpenMP is no longer used since commit 4f617b7 ("box: introduce memtx_sort_threads config parameter"). All dependencies on libgomp should be removed. Follow-up tarantool#7689 NO_DOC=build NO_TEST=build
Thanks for the care! The issue is addressed in PR #8784 |
Currently OpenMP is used by Tarantool only for parallel qsort:
tarantool/third_party/qsort_arg_mt.c
Lines 218 to 219 in c294a92
However
libgomp.a
in some Linux distros (e.g. CentOS) doesn't work with position-independent code, which is required for security.#7587 (comment)
Let's get rid of OpenMP by rewriting qsort to pthread or something like that.
The text was updated successfully, but these errors were encountered: