Subject Re: Firebird Sleeping
Author lseckde
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
> lseckde wrote:
> >
> > But suddenly one of the applications (not always the same) stops
> > while reading from the database. An read that normaly takes about
> > 200ms takes more that 5 minutes.
> >
> > Has anybody an idea what could causes such an behavior. Or an tip
of
> > what to check.
>
> I'd do a gstat -a -r Pipe the output to a file, it will be big.
Then
> look for tables with lots of back versions, especially tables with
a
> large value (>10) for max version. That the number of back
versions of
> a single record. Then look at the values of max dup: for indexes.
A
> large (>10000) value indicates that you've got an index that will
slow
> down garbage collection.
>
> Both those problem show up as a server that does almost nothing,
using
> huge amounts of CPU.
>
>
> Regards,
>
>
> Ann


First of all thank you very much Ann,

this seems to be the right hint!

Yes there are about 20000 record versions of some record's.

But this leads me to the next question, why there are as many
versions ?
I made an little test, I wrote an simple application that does:
-start transaction
-change an single record
-commit
-repeate endless ..

Result:
Interbase:
-With each change there is an new recorversion
-While changing is running, reading the same record with diffenent
application has no influence at the record versions
-stopping changing, and reading the same record with an different
application, seems to start garbage collection (100%CPU for 30
minutes at about 100000 record versions (400 pages))

Firbird:
-With each change there is an new recorversion
-While changing is running, reading the same record with diffenent
application has no influence at the record versions
-stopping changing, and reading the same record with an different
application, seems to start garbage collection but absolutely no CPU
usage, there are just gone

Now I have even more questions:
1. Why are there recordversion if there is only on application that
is connected to the database (one transaction)?
2. Why does garbage collection does not occure if I read the record,
while still an other transaction changed the record again. I thought
that still the older versions could be marked as garbage?
3. Is there realy such an big inmprovment in garbage collection in
firebird, that an cleanup that take minutes in interbase takes
milliseconds in firebird?

Again any help is welcome

Regards
Thomas





With the result I have two more questions: