Skip to content
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

Read-only transactions in SuperServer could avoid immediate write of Header and TIP pages after change [CORE5434] #5706

Closed
firebird-automations opened this issue Jan 3, 2017 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Votes: 1

Currently engine writes contents of Header and TIP pages to disk immediately after any change (for ex. transaction start increments value of "Next transaction" counter, commit changes transaction state etc).
I.e. Header and TIP pages are written to disk not waiting for commit (flush).
This was done by at least two major reasons:
a) safety
b) in CS (and SC) page locks for Header and TIP pages is released immediately after use to avoid AST overhead

In the case of many light read-only transactions these writes makes almost 100% of whole transaction time.

Since read-only transactions does not change data it is safe to update on disk contents of Header and TIP pages
somewhat later, for example when write transaction started (or committed) or when whole page cache is flushed
at database shutdown.

Note, reason (b) doesn't affect SuperServer.

So, improvement is that read-only transaction will not force write of Header\TIP page content to disk immediately after change
(in SS mode, of course). In the case of many light read-only transactions it gives significant performance gain.

PS to address this issue in CS mode there is more complex solution, probably it will be implemented in v4 a bit later

Commits: bb39d48 a051c78 23a55f0

====== Test Details ======

NOTE.
Actual execution is skipped in case when FB works in SC/CS mode (see stub in the code of test).
Do not forget to remove this stub after improvement will be implemented for SC/CS.

29.10.2018: deferred change min_version to 2.5.9 , have Q expected result. Sent letter to dimitr, 29.10.2018 22:23

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

summary: Read-only transactions in SuperServer could not write Header and TIP pages immediately after edit => Read-only transactions in SuperServer could avoid immediate write of Header and TIP pages after change

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0.2 [ 10785 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

Test Details: NOTE.
Actual execution is skipped in case when FB works in SC/CS mode (see stub in the code of test).
Do not forget to remove this stub after improvement will be implemented for SC/CS.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.5.9 [ 10862 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

Test Details: NOTE.
Actual execution is skipped in case when FB works in SC/CS mode (see stub in the code of test).
Do not forget to remove this stub after improvement will be implemented for SC/CS.

=>

NOTE.
Actual execution is skipped in case when FB works in SC/CS mode (see stub in the code of test).
Do not forget to remove this stub after improvement will be implemented for SC/CS.

29.10.2018: deferred change min_version to 2.5.9 , have Q expected result. Sent letter to dimitr, 29.10.2018 22:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants