1

Topic: Sweep / Garbage collector, the garbage is removed, but the basis grows

All greetings!
Server Firebird 2.5, basis in the size 5GB, for days grows approximately on 1GB.
The useful data which are necessary and remain in basis very little, we admit 100MB a day.
Growth of the size of basis directly depends on the table with the variable data. During the day millions records are written to it and from it are deleted (INSERT/DELETE). UPDATE - is not present.
In a config:
#GCPolicy = combined
I.e. it turns out so - for the morning basis 5GB, by the evening 6GB.
If I do so:
1) sweep,
2) ,
3)
I receive basis 5.1GB.
If I do only sweep the basis continues to grow, and by next evening its size 7GB.
As I to myself understand the operation mechanism:
1) the garbage collector, after not strong a considerable quantity (by default) transactions, should clean itself garbage (the size of basis does not decrease), and new  happen in earlier selected and released place of basis. That that happens during the day.
2) sweep - manual cleaning after which the size of basis does not decrease and it is similar to a garbage collector, record begins happens in earlier led out place.
As though the basis should (figuratively) for first days grow 1GB, and then on the sly grow, on the 100MB a day. But cleaning becomes, and the basis continues to grow.
Where an error, what not so?

2

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Imperous;
The point "1) sweep" is not absolutely clear
What for it to do, if all the same there is a point "3) " which anyway does a file with fresh basis.

3

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Filippov Dmitry;
It agree, wrote, then understood that wrote nonsense, at beka/restore it is not necessary. Upon sweep becomes every night, and bekap/retsore once a week.

4

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Imperous wrote:

a garbage collector, after not strong a considerable quantity (by default) transactions

If there are the active transactions not all old versions turn to garbage.
If the collector removes garbage this place is used repeatedly.
If does not remove, versions do not become garbage, and to the collector it nothing to remove.
Garbage collection works permanently, it not sweep.

Imperous wrote:

and the basis continues to grow.

Directly on  in day, even at manual start sweep every day? Means there is no garbage and the version are not removed, so there are long active transactions. With which it is necessary to struggle in applications.
http://www.ibase.ru/sweep

5

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Imperous wrote:

the garbage collector, after not strong a considerable quantity (by default) transactions, should clean itself garbage (the size of basis does not decrease), and new  happen in earlier selected and released place of basis. That that happens during the day.

Apparently you CS/SC there do not have background garbage collection so from yours DELETE anybody except you does not clean garbage (SELECT under that data which have been remote)
sweep except advancement OIT can anything and not make, if at you the active transactions retaining versions
Give here gstat-h

6

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Simonov Denis;
Database header page information:
Flags 0
Checksum 12345
Generation 348725
Page size 4096
ODS version 11.2
Oldest transaction 284034
Oldest active 289718
Oldest snapshot 289718
Next transaction 346482
Bumped transaction 1
Sequence number 0
Next attachment ID 2138
Implementation ID 26
Shadow count 0
Page buffers 4096
Next header page 0
Database dialect 3
Creation date Aug 5, 2018 11:10:57 PM
Attributes force write
Variable header data:
Sweep interval: 0
*END*

7

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Imperous wrote:

Oldest snapshot 289718
Next transaction 346482

However....

8

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

Imperous wrote:

Growth of the size of basis directly depends on the table with the variable data. During the day
Millions records are written to it and from it are deleted (INSERT/DELETE).
Where an error, what not so?

At first and the main things - in architecture which does the quoted. If you can not
To get rid of desire to write down in a DB something unnecessary, at least make this table temporal.

9

Re: Sweep / Garbage collector, the garbage is removed, but the basis grows

kdv;
By the way http://www.ibase.ru/garbage/
[quote =] sweep, automatic or manual. The server views all data pages (tables) for garbage collection. If after garbage collection it is possible to "move" forward Oldest transactionLINIK it becomes.