Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic
On Wed, Jan 15, 2014 at 4:42 PM, wrote: > > > Ok, running the gfix -sweep with everyone logged out did work and only > took about 5 minutes. I believe the issue came from me only trying to run > the sweep one time and a transaction being stuck. I never tried to run > sweep AFTER restarting the services. I also think there was confusion > because I was under the incorrect assumption that gbak was doing a sweep > while backing up. > Gbak (without the -g switch) will remove old record versions, but, like a sweep, it only works up to the oldest transaction that was active when the oldest transaction currently open started. So if you have a transaction that's stuck, neither gbak nor sweep will remove versions newer than some version older than the stuck transaction. The difference between sweep and a gbak backup without the -g is that sweep resets the value of the Oldest Interesting Transaction (OIT), and gbak does not. After a sweep, all record versions older than the sweep threshold are guaranteed to be committed. That used to be important because InterBase had to carry around a bit vector the length of the difference between the OIT and the current transaction - which could be a lot of bits on a machine with a mid-1980's sized memory. Each bit in the vector represents the state of a transaction - committed or not. The vector still exists, but it takes a whole lot of bits to use any significant fraction of the memory of a modern computer. Good luck, Ann
[firebird-support] RE: Garbage collection / sweep not happening on super classic
Ok, running the gfix -sweep with everyone logged out did work and only took about 5 minutes. I believe the issue came from me only trying to run the sweep one time and a transaction being stuck. I never tried to run sweep AFTER restarting the services. I also think there was confusion because I was under the incorrect assumption that gbak was doing a sweep while backing up. I really appreciate everyone's responses that help me get to the root of the problem. Thanks! Ryan
[firebird-support] RE: Garbage collection / sweep not happening on super classic
Last time I tried it, the gfix process hung and sat at 0% CPU for hours. I had to terminate it. A backup only takes about 20 minutes, so I figured gfix should take several hours. I will try to run it again and get more detailed information to report back here (with everyone logged out). Ryan ---In firebird-support@yahoogroups.com, wrote: Are you sure gfix hangs? Maybe is a hdd slowdown in the process. We had this same issue. Gbak does not clean all the mess on only one of our clients. The sollution is run a gfix and wait. Em 07/01/2014 18:22, mailto:rmcginty@...> escreveu: This is Classic, so yes, automatic sweep is disabled. My understanding is that gbak does a sweep while doing a backup, which happens nightly, so sweep should be happening then (if I understand it correctly that is). Also, running a manual sweep hangs indefinitely. As for the active transaction, restarting Firebird doesn't fix the problem. The ONLY thing that fixes the problem is restoring from a backup file to create a fresh file. According to Sinatica, there are no active transactions while the problem is being exhibited. I will check the raw MON tables, but would restarting the Firebird service not terminate any active transactions? Thanks for all the quick responses! Ryan
Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic
>You are wrong. Gbak does not do sweep, it runs snapshot transaction and reads >all records in all tables - and, with some conditions, it can clear some >garbage versions. Ah I see - the documentation simply mentioned something like "garbage collection maybe done during backup" - now I see that doesn't mean the same thing as a sweep. >Restart should fix oldest active stuck - if it's a real restart (Classic >processes sometimes remain active). Did you check that all processes are >down? Or did you restart hardware? It is super classic (with only the one process), so I shut it down, verified processes were no longer running, and verified that the file was no longer "in use". On top of that, the server hardware reboots each week. Nothing, so far, has released the oldest transaction. I will try gfix making sure no one is attached to the database and see what happens, then report here. Ryan
Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic
I forget to say that you must disconnect all clients before run gfix Em 07/01/2014 18:35, "Alexey Kovyazin" escreveu: > > > Hi Ryan, > > >My understanding is that gbak does a sweep while doing a backup, which > happens nightly, so sweep should be happening then (if I understand it > correctly that is). > > You are wrong. Gbak does not do sweep, it runs snapshot transaction and > reads all records in all tables - and, with some conditions, it can clear > some garbage versions. > > Restart should fix oldest active stuck - if it's a real restart (Classic > processes sometimes remain active). Did you check that all processes are > down? Or did you restart hardware? > > And it also could be another problem, more complex... I can't say more > without detailed investigation. > > Regards, > Alexey Kovyazin > www.ibsurgeon.com > > > > > > This is Classic, so yes, automatic sweep is disabled. My understanding is > that gbak does a sweep while doing a backup, which happens nightly, so > sweep should be happening then (if I understand it correctly that is). > Also, running a manual sweep hangs indefinitely. > > > As for the active transaction, restarting Firebird doesn't fix the > problem. The ONLY thing that fixes the problem is restoring from a backup > file to create a fresh file. According to Sinatica, there are no active > transactions while the problem is being exhibited. I will check the raw > MON tables, but would restarting the Firebird service not terminate any > active transactions? > > > Thanks for all the quick responses! > > > Ryan > > > >
Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic
Hi Ryan, >My understanding is that gbak does a sweep while doing a backup, which happens nightly, so sweep should be happening then (if I understand it correctly that is). You are wrong. Gbak does not do sweep, it runs snapshot transaction and reads all records in all tables - and, with some conditions, it can clear some garbage versions. Restart should fix oldest active stuck - if it's a real restart (Classic processes sometimes remain active). Did you check that all processes are down? Or did you restart hardware? And it also could be another problem, more complex... I can't say more without detailed investigation. Regards, Alexey Kovyazin www.ibsurgeon.com This is Classic, so yes, automatic sweep is disabled. My understanding is that gbak does a sweep while doing a backup, which happens nightly, so sweep should be happening then (if I understand it correctly that is). Also, running a manual sweep hangs indefinitely. As for the active transaction, restarting Firebird doesn't fix the problem. The ONLY thing that fixes the problem is restoring from a backup file to create a fresh file. According to Sinatica, there are no active transactions while the problem is being exhibited. I will check the raw MON tables, but would restarting the Firebird service not terminate any active transactions? Thanks for all the quick responses! Ryan
Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic
Are you sure gfix hangs? Maybe is a hdd slowdown in the process. We had this same issue. Gbak does not clean all the mess on only one of our clients. The sollution is run a gfix and wait. Em 07/01/2014 18:22, escreveu: > > > This is Classic, so yes, automatic sweep is disabled. My understanding is > that gbak does a sweep while doing a backup, which happens nightly, so > sweep should be happening then (if I understand it correctly that is). > Also, running a manual sweep hangs indefinitely. > > > As for the active transaction, restarting Firebird doesn't fix the > problem. The ONLY thing that fixes the problem is restoring from a backup > file to create a fresh file. According to Sinatica, there are no active > transactions while the problem is being exhibited. I will check the raw > MON tables, but would restarting the Firebird service not terminate any > active transactions? > > > Thanks for all the quick responses! > > > Ryan > >
[firebird-support] RE: Garbage collection / sweep not happening on super classic
This is Classic, so yes, automatic sweep is disabled. My understanding is that gbak does a sweep while doing a backup, which happens nightly, so sweep should be happening then (if I understand it correctly that is). Also, running a manual sweep hangs indefinitely. As for the active transaction, restarting Firebird doesn't fix the problem. The ONLY thing that fixes the problem is restoring from a backup file to create a fresh file. According to Sinatica, there are no active transactions while the problem is being exhibited. I will check the raw MON tables, but would restarting the Firebird service not terminate any active transactions? Thanks for all the quick responses! Ryan