[MDEV-5755] Scalability: let LOCK_open and THR_LOCK::mutex be normal mutexes Created: 2014-02-27 Updated: 2015-08-19 Resolved: 2015-08-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.0.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergey Vojtovich |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 10.1.7-1 |
| Description |
|
According to my benchmarks, normal mutexes scale better than adaptive at high thread count. At low thread count they behave similarly. LOCK_open and THR_LOCK::mutex are the hot-path mutexes and thus are mostly affected. See also: |
| Comments |
| Comment by Sergey Vojtovich [ 2014-02-27 ] | |||||||||||||||||||||||||
|
Sergei, please review patch for this task. | |||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-06-03 ] | |||||||||||||||||||||||||
|
just for the record (to repeat my email and your reply):
| |||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2014-06-04 ] | |||||||||||||||||||||||||
|
Axel, please benchmark suggested patches and assign back to me. | |||||||||||||||||||||||||
| Comment by Axel Schwenke [ 2014-06-11 ] | |||||||||||||||||||||||||
|
I duplicated this task as TODO-629. Please check there for results. | |||||||||||||||||||||||||
| Comment by Axel Schwenke [ 2015-08-10 ] | |||||||||||||||||||||||||
|
Work will continue here. I'll close TODO-629 | |||||||||||||||||||||||||
| Comment by Axel Schwenke [ 2015-08-10 ] | |||||||||||||||||||||||||
|
This is the patch that I tested vs. MariaDB-10.1.6
| |||||||||||||||||||||||||
| Comment by Axel Schwenke [ 2015-08-10 ] | |||||||||||||||||||||||||
|
Here is the result that I got from running sysbench OLTP with a single table (8 mio rows, ram disk) on a Power8 VM with cores/40 threads:
Conclusion: normal mutexes are a bit slower than fast mutexes. I shall repeat this benchmark on an Intel machine, but currently I don't have a sufficiently large machine avaiable. | |||||||||||||||||||||||||
| Comment by Axel Schwenke [ 2015-08-12 ] | |||||||||||||||||||||||||
|
And here is the result for the same benchmark running on a 4 core (8 threads) Intel machine.
Again the performance is a bit worse with slow mutexes. Conclusion: keep the fast mutexes. | |||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2015-08-19 ] | |||||||||||||||||||||||||
|
Locking scheme has changed a lot since this analysis was performed, so we can assume this task is not relevant anymore. |