Subject Re: FB-1.5.2 slow performance and high memory usage after insert and delete 30M
Author Adam
--- In, "intellekta"
<uwe.cramer@i...> wrote:
> (they would certainly have been rolled back after a while)
> what is a while?
> the server is slow since 6 days.
> Uwe

This is becoming clearer.

Because you terminated the process harshly, it didn't get a chance to
process the undo log, but left all the uncommitted records in the
database. These records are sitting inside your data pages still, and
still have pointers from index pages referencing them. (ie they are
still in the database but new transactions ignore them).

Rollback doesn't happen like in other databases (where you have to
wait for a log to be processed). As soon as Firebird detects the
connection is gone, it flags the transaction as rolled back, and
immediately, all the changes made by that transaction are flagged as
"ignore me" if you like. Garbage collection simply removes these
ignore me records.

Garbage collection will only operate on records for which there is no
active transaction which could be interested. If you have older
transactions than this running, then your garbage collection could be
stuck and unable to remove this garbage. This is a common problem if
you use "commit retaining" rather than normal commits.

At the next "downtime", restart your service which will disconnect
every connection and run a sweep. The sweep will be able to do its job