Bug #75235 | Optimize ibuf merge when reading a page from disk | ||
---|---|---|---|
Submitted: | 16 Dec 2014 11:46 | Modified: | 16 Dec 2014 18:58 |
Reporter: | Naga Satyanarayana Bodapati | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.7.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[16 Dec 2014 11:46]
Naga Satyanarayana Bodapati
[16 Dec 2014 18:07]
Daniel Price
Posted by developer: Bug#20220909 - OPTIMIZE IBUF MERGE WHEN READING A PAGE FROM DISK Problem: -------- For every page we read, we check if there are pending ibuf entries. We acquire RW_X_LATCH on the IBUF page, check if there is ibuf entry for the page. Change buffer is applicable only on for B-tree secondary leaf pages in non-temporary tablespace. So for other page types, we unnecessarily acquire & release latch on IBUF page (page 1). Fix: --- We can skip the ibuf merge early without acquiring & releasing the latch on IBUF page. We will use the page_type, page_level & the tablespace type from the page which is read from disk to skip the ibuf merge.
[16 Dec 2014 18:58]
Daniel Price
Posted by developer: Fixed as of the upcoming 5.7.6 release, and here's the changelog entry: When a page is read from disk, there is a check for pending insert buffer entries which involves acquiring a latch on the insert buffer page. If pending entries are found, they are merged. Because the change buffer is only applicable to B-tree secondary leaf pages in non-temporary tablespaces, insert buffer merge is not necessary for all page types. Using page_type, page_level, and tablespace type information from the page that is read from disk, insert buffer merge is now skipped for non-applicable page types.
[30 Aug 2016 9:58]
Laurynas Biveinis
It might be beneficial to backport this to 5.6 for correctness too, see bug 82798