mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 15:23:03 +01:00
Misc.
This commit is contained in:
parent
320ae0c598
commit
902671a044
@ -3,36 +3,36 @@ Firebird 2.0 garbage collector
|
||||
-----------------------------------------------------------
|
||||
|
||||
Engine knows about each record versions produced by update\delete statement
|
||||
and can remove it as soon as oldest snapshot transaction (OST) allowed this.
|
||||
This is eliminate need to read pages with this versions again by user request
|
||||
(i.e. SELECT COUNT(*) FROM table) and avoid situation when this versions is
|
||||
never reads (of course sweep always removed all unused record versions). Also
|
||||
there are high probability that needed pages still reside in the buffer cache
|
||||
and can remove them as soon as oldest snapshot transaction (OST) allowed this.
|
||||
This eliminates the need to read pages with these versions again by user request
|
||||
(i.e. SELECT COUNT(*) FROM table) and avoids situation when these versions are
|
||||
never read (of course sweep always removed all unused record versions). Also
|
||||
there is high probability that needed pages still reside in the buffer cache
|
||||
thus there are less additional disk IO needed.
|
||||
|
||||
Between notifying garbage collector about page with unused versions and time
|
||||
when garbage collector will read this page new transaction can update record
|
||||
and garbage collector can't cleanup this record if this new transaction number
|
||||
is above OST or still active. In this case engine again notified garbage collector
|
||||
is above OST or still active. In this case engine again notifies garbage collector
|
||||
with this page number and it will clean up garbage at some time later (old garbage
|
||||
collector will "forget" about this page until user reads it again)
|
||||
|
||||
Both cooperative and background garbage collection now possible. To manage it
|
||||
introduced new configuration parameter "GCPolicy". It can be set to:
|
||||
Both cooperative and background garbage collection are now possible. To manage it
|
||||
new configuration parameter "GCPolicy" was introduced. It can be set to:
|
||||
|
||||
a) cooperative - garbage collection performed only in cooperative mode, such
|
||||
as before IB6. Each user request is responsible for removing unused record
|
||||
versions. This is how engine works before IB6. This is only option for
|
||||
Classic Server mode. Engine don't track versions produced as result of
|
||||
Classic Server mode. Engine doesn't track versions produced as result of
|
||||
update and delete statements
|
||||
|
||||
b) background - garbage collection performed only by background thread, such
|
||||
as in IB6 and latter. No user requests is removed unused record versions.
|
||||
Instead user request notified dedicated garbage collector thread with page
|
||||
number where unused record version detected. Also engine remember page numbers
|
||||
as in IB6 and later. No user requests remove unused record versions.
|
||||
Instead user request notifies dedicated garbage collector thread with page
|
||||
number where unused record version is detected. Also engine remembers page numbers
|
||||
where update\delete statement created backversions.
|
||||
|
||||
c) combined - both background and cooperative garbage collection is performed.
|
||||
c) combined - both background and cooperative garbage collection are performed.
|
||||
|
||||
Default is "combined" for SuperServer. ClassicServer ignore this parameter and
|
||||
always worked in "cooperative" mode
|
||||
Default is "combined" for SuperServer. ClassicServer ignores this parameter and
|
||||
always works in "cooperative" mode
|
||||
|
Loading…
Reference in New Issue
Block a user