Subject | Re: [firebird-support] Re: backup very slow and how often sweep a database ? |
---|---|
Author | Dmitry Kuzmenko |
Post date | 2011-12-20T11:20:39Z |
Hello, Aage!
Tuesday, December 20, 2011, 3:02:26 PM, you wrote:
AJ> Everyday i sweep the database and i backup it
AJ> gfix.exe -sweep
AJ> and just after a backup like this :
AJ> gbak.exe -B -t -v -z
wrong sequence and some gbak parameters.
I suggest to make backup first, with the following options
gbak -b -g -v
-t is the default. -z is useless.
backup is a process to make backup copy, so it must be run first, run
as fast as possible, and (in most cases) without trying to collect garbage.
AJ> the probleme is that the sweep can take up to 5 hours to finish and the
AJ> backup up to 12 hours to finish :(
What is the size of database?
AJ> i know that in the backup i don't put the -g params (inhibit garbage
AJ> collection) but someone say me that
AJ> the -g do something else that the gfix.exe -sweep doesn't do ...
Sweep, if it could, already collected garbage. So, it is useless
to run gbak without -g after sweep. If sweep couldn't collect garbage
due to some active "being interested" transaction, neither gbak can
collect garbage, so, -g is again useless.
You need to check gstat -h before you run sweep to
know will sweep help, and after sweep to know is sweep helped.
AJ> I think it is the other way around: sweep can do
AJ> something that gbak's GC doesn't do.
yes. sweep can move forward oldest interesting transaction marker.
AJ> Sweep does
AJ> a more thorough cleaning when no other user is connected, I think.
no.
AJ> Note: When I started to use the ServerManager
AJ> switch (-se service_mgr) I noticed a significant speedup for gbak.
yes, up to 2-4 times faster. we made tests 3 years ago and found that.
--
Sincerelly,
Dmitry Kuzmenko, www.ib-aid.com
Tuesday, December 20, 2011, 3:02:26 PM, you wrote:
AJ> Everyday i sweep the database and i backup it
AJ> gfix.exe -sweep
AJ> and just after a backup like this :
AJ> gbak.exe -B -t -v -z
wrong sequence and some gbak parameters.
I suggest to make backup first, with the following options
gbak -b -g -v
-t is the default. -z is useless.
backup is a process to make backup copy, so it must be run first, run
as fast as possible, and (in most cases) without trying to collect garbage.
AJ> the probleme is that the sweep can take up to 5 hours to finish and the
AJ> backup up to 12 hours to finish :(
What is the size of database?
AJ> i know that in the backup i don't put the -g params (inhibit garbage
AJ> collection) but someone say me that
AJ> the -g do something else that the gfix.exe -sweep doesn't do ...
Sweep, if it could, already collected garbage. So, it is useless
to run gbak without -g after sweep. If sweep couldn't collect garbage
due to some active "being interested" transaction, neither gbak can
collect garbage, so, -g is again useless.
You need to check gstat -h before you run sweep to
know will sweep help, and after sweep to know is sweep helped.
AJ> I think it is the other way around: sweep can do
AJ> something that gbak's GC doesn't do.
yes. sweep can move forward oldest interesting transaction marker.
AJ> Sweep does
AJ> a more thorough cleaning when no other user is connected, I think.
no.
AJ> Note: When I started to use the ServerManager
AJ> switch (-se service_mgr) I noticed a significant speedup for gbak.
yes, up to 2-4 times faster. we made tests 3 years ago and found that.
--
Sincerelly,
Dmitry Kuzmenko, www.ib-aid.com