Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic

2014-01-16 Thread Ann Harrison
On Wed, Jan 15, 2014 at 4:42 PM, rmcgi...@oceris.com 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


Re: [firebird-support] RE: Garbage collection / sweep not happening on super classic

2014-01-07 Thread fabianoaspro
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, rmcgi...@oceris.com 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

2014-01-07 Thread Alexey Kovyazin

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

2014-01-07 Thread fabianoaspro
I forget to say that you must disconnect all clients before run gfix
Em 07/01/2014 18:35, Alexey Kovyazin a...@ib-aid.com 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

2014-01-07 Thread rmcginty
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