New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache physical numbers of often used data pages to reduce number of fetches of pointer pages [CORE5441] #5712
Comments
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Commented by: @hvlad Improvement was merged into master (v4) and B3_0_Release (v3) branches at 22 November 2016 |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0.2 [ 10785 ] Fix Version: 4.0 Alpha 1 [ 10731 ] |
Commented by: Claudio Valderrama C. (robocop) Interesting but you don't explain how this cache of physical numbers is refreshed. What if some information it holds becomes obsolete? |
Commented by: @hvlad Claudio, every time data page is fetched using cached physical number, engine performs few checks to be sure page is really expected data page : If any of the checks above is failed, engine released fetched page and falls back to usual way - using PP PS glad FB development is still interesting for you :) |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Deferred Test Details: Wait for reply from hvlad, letter 03.02.2017 09:53. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully Test Details: Wait for reply from hvlad, letter 03.02.2017 09:53. => |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @hvlad
When engine need to fetch some data page by its logical number (sequence number of DP in relation) it should fetch corresponding PP
first and look for slot with physical number of given DP. I.e. engine always needs to do two fetches from the page cache to read any row.
Cost of page fetch is small (ideally 2 CAS instructions) but not zero, especially in highly loaded multy-CPU environment. Also, pointer
pages is a very "hot" pages and many readers could force writers to wait.
Note, mapping of logical data page number to physical numbers is more-or-less stable.
Obviously, caching of that mapping information could reduce number of fetches of PP and lower contention in page cache.
The text was updated successfully, but these errors were encountered: