server
server copied to clipboard
MDEV-34431 More fine grained control of spin loops could be useful
- [x] The Jira issue number for this PR is: MDEV-34431
Description
In 5b26a07698b92f58e5d1f55c7929b0e25d1a586b (#3317) I enabled spin loops on dict_index_t::lock. This helps in some workloads and causes performance degradation in others, especially when there are large numbers of concurrent connections.
It could make sense to enable spin loops on a case-by-case basis, or to introduce a configuration parameter for choosing when index tree latch acquisition should include spin loops.
Release Notes
TBD
How can this PR be tested?
I would like to see stack traces of the most popular spin loops for index_lock in a workload where 5b26a07698b92f58e5d1f55c7929b0e25d1a586b causes a regression. Maybe we can selectively disable spin loops in some fo those cases.
If there is no such low-hanging fruit, then this should be revised further with a runtime parameter to enable or disable spin loops for index_lock.
Basing the PR against the correct MariaDB version
- [ ] This is a new feature and the PR is based against the latest MariaDB development branch.
- [x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [ ] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.