[MDEV-26826] Duplicated computations of buf_pool.page_hash addresses Created: 2021-10-14 Updated: 2021-11-09 Resolved: 2021-10-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.5, 10.6, 10.7 |
| Fix Version/s: | 10.6.5, 10.7.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Maintaining and passing the guess could cause some overhead. However, an attempt to remove that parameter caused prominent performance regressions, possibly due to trx_undo_t::guess_block. So, we’d better keep that parameter. What we can and should do instead is to refactor the buf_pool.page_hash code so that the address in buf_pool.page_hash.array will be computed while not holding any mutexes. This became possible after the fix of |
| Comments |
| Comment by Axel Schwenke [ 2021-10-15 ] |
|
Results in attached sysbench.pdf |
| Comment by Marko Mäkelä [ 2021-10-15 ] |
|
Thank you. I should check if buf_page_get_low() is unnecessarily calculating the hash table address twice. The address of the latch could be obtained by simply masking some bits of the address of the hash bucket. We might currently calculate the address twice, or once if the guess parameter is valid. |
| Comment by Marko Mäkelä [ 2021-10-15 ] |
|
It turns out that in |
| Comment by Krunal Bauskar [ 2021-10-21 ] |
|
I have completed benchmarking of this said branch |
| Comment by Marko Mäkelä [ 2021-10-21 ] |
|
krunalbauskar, thank you. The commit that you probably tested also included |