[MDEV-10296] Multi-instance table cache Created: 2016-06-28 Updated: 2018-09-10 Resolved: 2016-09-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | 10.2.2 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.2-1, 10.2.2-1, 10.2.2-2, 10.2.2-3, 10.2.2-4 | ||||||||
| Description |
|
Improve scalability by implementing multi-instance table cache. |
| Comments |
| Comment by Sergey Vojtovich [ 2016-06-29 ] | ||||||||||||
|
serg, please review patch for this task. | ||||||||||||
| Comment by Sergey Vojtovich [ 2016-08-03 ] | ||||||||||||
|
Waiting for feedback. | ||||||||||||
| Comment by Sergey Vojtovich [ 2016-09-08 ] | ||||||||||||
|
serg, please review 2 last patches for this task. I'm still not happy with autosizing:
| ||||||||||||
| Comment by Sergei Golubchik [ 2016-09-09 ] | ||||||||||||
You increase the number of instances when lock/trylock ratio reaches 50%. May be you should do it earlier? At 30%, may be?
That should normally be just ++mutex_nowaits, shouldn't it?
Interesting. Why would you think is that? What did you do in your benchmarks? You've never had only 1 instance?
True. How long a warm-up is needed, what was your impression? | ||||||||||||
| Comment by Sergey Vojtovich [ 2016-09-09 ] | ||||||||||||
|
Yes, number of instances is increased at 50%. As I mentioned, if I increase it at 48%, number of instances is quickly raising up to the limit. It's a bit more than ++mutex_nowaits, but close enough. It was multi-table OLTP RO benchmark with 40 threads. I had 1 instance initially. With current numbers warm-up up to 2 instances takes under 5 seconds. With lower numbers it was raising up to the limit in under 1 minute. There's another option, but it's a bit more expensive: count number of waiting threads and activate instances when there're e.g. 10 waiters. This will add 2 atomic adds per lock. | ||||||||||||
| Comment by Sergey Vojtovich [ 2016-09-12 ] | ||||||||||||
|
Changed assignee while waiting for feedback. | ||||||||||||
| Comment by Sergei Golubchik [ 2016-09-16 ] | ||||||||||||
|
ok to push (cd1b39b and whatever you have in the same branch) | ||||||||||||
| Comment by Sergey Vojtovich [ 2016-09-16 ] | ||||||||||||
|
Final autosizing implementation:
|