Subject | Re: [firebird-support] FB uses 100% cpu |
---|---|
Author | Ann W. Harrison |
Post date | 2005-06-16T16:33:08Z |
Guido Klapperich wrote:
you're going to have to perform some mechanical maintenance. If you can
take your database off-line periodically,
1) drop the foreign key constraints that create non-selective indexes on
fields that change frequently, and those where the child (referencing)
records are frequently deleted
2) force a garbage collection on those tables - select count (*)
3) recreate the constraints.
or backup with garbage collection turned off and restore the whole database.
Regards,
Ann
>>there's usually another factor when you see that level of CPUNever? How long have you let it run?
>>utilization: non-selective indexes. Ordinary garbage collection
>>imposes some overhead and will show up in performance. Garbage
>>collection on indexes with lots of duplicates will eat your CPU.
>
> But normally the garbage collection should stop after some time. THe
> problem, that I have, is that FB never stops using 100% CPU until I
> restart the FB-server.
>In that case, Firebird 2 will fix the problem, but until it is released,
>
>>You can look for indexes with large numbers of duplicates.
>
> All indexes with max dup > 10000 come from foreign keys and I don't want
> to delete the FK, because of the referential integrity.
you're going to have to perform some mechanical maintenance. If you can
take your database off-line periodically,
1) drop the foreign key constraints that create non-selective indexes on
fields that change frequently, and those where the child (referencing)
records are frequently deleted
2) force a garbage collection on those tables - select count (*)
3) recreate the constraints.
or backup with garbage collection turned off and restore the whole database.
Regards,
Ann