Subject | Re: very high cpu usage |
---|---|
Author | Alexander V.Nevsky |
Post date | 2003-08-22T15:46:17Z |
--- In firebird-support@yahoogroups.com, "ochnap2" <ochnap2@y...>
wrote:
exlusive connection, when there are not another transactions running,
deactivate indices on this table before cleaning (especially those,
which have many duplicates), make Select from log after cleaning
transaction is commited (this will force garbage collection start),
re-activate indices. If you can't do this in exlusive mode, build your
strategy considering the next: any transaction started before start of
clean and not commited before it's end will prevent collection of
garbage created by it. Any rolled back before clean transaction will
do the same while sweep will not change it's status to commited.
You can look into gstat -h result to check situation with transactions
before and after clean. If oldest transaction after clean is more than
next before clean, you can force garbage collection in log selecting
from it.
faster and less expensive than under general load.
Sweep moves forward oldest transaction (converting rolled back to
commited) and collects garbage as side effect. General garbage
collection is started each time any query encounter clearly unneeded
for any of alive transactions versions. If gap beetwen oldest and next
is large, garbage collection is nearly blocked and when gap will be
minimized server have much work to do, sometimes too much.
Best regards, Alexander.
wrote:
> So far so good. The problem is that we are noticing that some hoursFB don't like mass deletes and updates. The best is to make it in
> after the cleanup process finishes, the responsiveness of the system
> decays sharply for a while (1-2 hours).
exlusive connection, when there are not another transactions running,
deactivate indices on this table before cleaning (especially those,
which have many duplicates), make Select from log after cleaning
transaction is commited (this will force garbage collection start),
re-activate indices. If you can't do this in exlusive mode, build your
strategy considering the next: any transaction started before start of
clean and not commited before it's end will prevent collection of
garbage created by it. Any rolled back before clean transaction will
do the same while sweep will not change it's status to commited.
You can look into gstat -h result to check situation with transactions
before and after clean. If oldest transaction after clean is more than
next before clean, you can force garbage collection in log selecting
from it.
> - Is there any way to limit the amount of cpu time that firebirdIf you can quickly collect garbage just after clean it will be much
> consumes?
faster and less expensive than under general load.
> or else:Sweep and garbage collection are different beasts, though alike.
> - Can I choose the moments that the server uses to sweep?
Sweep moves forward oldest transaction (converting rolled back to
commited) and collects garbage as side effect. General garbage
collection is started each time any query encounter clearly unneeded
for any of alive transactions versions. If gap beetwen oldest and next
is large, garbage collection is nearly blocked and when gap will be
minimized server have much work to do, sometimes too much.
Best regards, Alexander.