> Hi. Today, the users of one of my Firebird 2.5 databases reported that > the database works very slow. After I checked I saw that there is an > attachment from SWEEPER user and it is doing something. The database > size is little over 500 MB. But the sweeper is working over 2 hours now, > with no other connections to the database and no signs to finish soon. > What can I do? Set the sweep interval to 0, restart the Firebird server > and perform manually backup restore? Or to wait to finish, but the users > need the database. > > The gap between Oldest transaction and Next transaction is very big - > few times bigger than Sweep interval, perhaps this is the reason why it > started. But this problem is for the developers to resolve.
Basically sweep visits all records and record versions and removes non-interesting record versions. Depending on the database size and the underlaying I/O subsystem, this can take a while. Sweeping is an online operation, thus doesn't exclusively lock tables, but it is most efficient if no other interesting transaction are active. Regarding the sweep interval, usually the gap between OAT/OST - OIT counts. If you are using Firebird 2.5.2, you can use the Trace API to get more insight into the sweep process, e.g. some sort of progress, I/O per table etc. Check out our demo video here: http://www.iblogmanager.com/download/demos/fbtm/fbtm_sweep_tracing.htm -- With regards, Thomas Steinmaurer http://www.upscene.com/ Professional Tools and Services for Firebird FB TraceManager, IB LogManager, Database Health Check, Tuning etc.
