Issue Details (XML | Word | Printable)

Key: CORE-5434
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 1
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Read-only transactions in SuperServer could avoid immediate write of Header and TIP pages after change

Created: 03/Jan/17 03:52 PM   Updated: 31/Jan/17 07:33 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 3.0.2, 4.0 Alpha 1

QA Status: 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.


 Description  « Hide
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


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.