Subject Re: [ib-support] Re: DB-file growth VERY rapidly!??
Author Paul Reeves
_a_x_e_ wrote:
>
> Hello Paul,
>
> it is a Perl-Script running on Debian-Linux, connecting to an Firebird
> RC2 Server (running on another host, Debian-Linux too) using DBI für
> connection.
>
> No special transaction isolation, I use standard settings (should be
> READ-WRITE, SNAPSHOT, WAIT)
>
> My problem is not that data is not written into the database, that
> works fine, ALL data is correctly written into the database during the
> transactions, the problem is the enormous and rapid growing of the
> database file, also the RAW data is MUCH smaller, the database-file
> still continues growing even if there are ONLY updates! This space
> seems to be never freed and used again, sweep does not help, database
> restart does not help, only backup restore helps, but then file-size
> continues to grow in same speed. 8 MB per day for only 160kb raw data
> is too much!?
>

Unfortunately this is largely how Firebird works. Each update stores a back
record version of the data that has changed. These back record versions are
saved until a sweep occurs. However, the server does not shrink the database -
you have to do that with a backup and restore.

But shrinking the database is not really what you want. What you want is to
consistently maintain the database size. This should be possible by running
sweep on a regular basis. That should free space used by back records that are
no longer needed. Try running gstat -h to get the header page stats, then
running gfix -sweep and then running gstat -h again. The transaction pointers
should have moved on. From there you should see re-use of the existing pages.


Paul
--

Paul Reeves
http://www.ibphoenix.com
taking InterBase further