[firebird-support] FB 2.5.8 - Next transaction value growing too much.

2019-07-01 Thread duque.herna...@yahoo.com [firebird-support]
Hi group.

 

 I've working around tuning up a database speed and found that gstat -h shows 
valuable information about transactions. Also that gfix -sweep removes garbage 
from the database.
 

 I understood that when Next transaction grows too much from Oldest active 
transaction, "sweeping" the database makes this difference become smaller.
 

 But this is not the case with my database.
 

 What am I doing wrong?
 

 this is the gstat -h from the database:
 

 *
 Database "d:\med6\ibdata\sistmed6.fdb"
 Gstat execution time Mon Jul 01 10:39:55 2019
 

 Database header page information:
 Flags   0
 Checksum12345
 Generation  236628301
 Page size   4096
 ODS version 11.2
 Oldest transaction  236413964
 Oldest active   236413965
 Oldest snapshot 236413965
 Next transaction236627938
 Bumped transaction  1
 Sequence number 0
 Next attachment ID  31194
 Implementation ID   16
 Shadow count0
 Page buffers0
 Next header page0
 Database dialect3
 Creation date   Mar 24, 2018 10:27:14
 Attributes  force write
 

 Variable header data:
 Sweep interval: 2
 *END*
 

 *
 Any help will be appreciated.
 

 Regards,
 

 
 Hernando.
 



Re: [firebird-support] FB 2.5.8 - Next transaction value growing too much.

2019-07-01 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
01.07.2019 18:11, duque.herna...@yahoo.com [firebird-support] wrote:
> What am I doing wrong?

   You misunderstood documentation. Sweep does move OAT (and collect garbage as 
a side 
effect), but it has nothing to do with Next Transaction.
   Numbers from your gstat output tell that your application has a bad 
transaction 
management: it either starts too much unnecessary transactions or keep them 
alive longer 
than necessary.
   I'd suggest read the Firebird Book by Helen Borrie where these things are 
explained in 
details.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] FB 2.5.8 - Next transaction value growing too much.

2019-07-01 Thread Helen Borrie hele...@tpg.com.au [firebird-support]
Hernando Duque wrote:

> I've working around tuning up a database speed and found that gstat
> -h shows valuable information about transactions. Also that gfix
> -sweep removes garbage from the database.

Sweep (whether automatic or manual) removes garbage that is able to be
removed.

> I understood that when Next transaction grows too much from Oldest
> active transaction, "sweeping" the database makes this difference become 
> smaller.

No, the 'Next' transaction is not relevant.  It is simply the ID that
will be assigned to the next transaction that will be started.  Of
course, gstat only provides you with a snapshot of the state of
transactions, as read from the transaction inventory page (TIP) when
gstat was run.

> But this is not the case with my database.

It would not be the case with any database that was being used, except
perhaps right after a restore from a gbak backup.  In a newly restored
database, transaction id numbers start from 1.

> What am I doing wrong?

Let's look at your gstat -h results and decide whether you are
actually doing anything wrong. ;-)

> this is the gstat -h from the database:
> *

> Database "d:\med6\ibdata\sistmed6.fdb"
> Gstat execution time Mon Jul 01 10:39:55 2019

> Database header page information:
> Flags   0
> Checksum   !  ; 12345
> Generation  236628301
> Page size   4096
> ODS version 11.2
> Oldest transaction  236413964
This is the "oldest interesting transaction". a.k.a., OIT. An
"interesting transaction" is one that, although already committed or
rolled back, involves records that are still being actively worked on
by other transactions.  As long as a transaction remains
"interesting", the records associated with it cannot be
garbage-collected.

> Oldest active   236413965
a.k.a. OAT, this is the oldest transaction that was still active when
gstat -h was run.  An "active" transaction is one that has not yet
been committed or rolled back.

> Oldest snapshot 236413965
This is the value of the OAT the last time garbage collection (GC)
happened.  On successive runs of gstat -h, the difference between it
and the OIT (known as "the gap") is an indicator of how effectively
the transactions are being managed by your applications.  The bigger
the gap, the more likely it is that oneor more long-running
transactions are inhibiting GC.
> Next transaction236627938
> Bumped transaction  1
> Sequence number 0
> Next attachment ID  31194
>!   Implementation ID   16
> Shadow count0
> Page buffers0
> Next header page0
> Database dialect3
> Creation date   Mar 24, 2018 10:27:14
> Attributes  force write

> Variable header data:
> Sweep interval: 2
The sweep interval determines how big the "gap" should be in order for
the engine to register that an automatic sweep is needed.  With this
(the default) configuration, the need for the auto-sweep will be
registered when the gap hits 20,000.  Auto-sweeping is done by a
worker thread and will run when the engine detects a suitable lull in
operations.  In a well-tempered database (as yours appears to be), an
autosweep will never occur because that gap simply never reaches that
size.
> *END*
> *

Your numbers, as shown here, look fine, especially considering you
have not done a restore for 15 months. ;-)

BTW, sweeping is not garbage collection.  It is a process that marks
old record versions for GC, which will be carried out subsequently by
a GC worker thread (on Superserver) or by cooperative GC, or both,
depending on how your GCPolicy is set up in firebird.conf.  GC happens
automatically, one way or another. A gbak backup also causes
cooperative GC, unless you run gbak with the -[no_]g[arbage_collect]
switch.

Helen


---
This email has been checked for viruses by AVG.
https://www.avg.com



[firebird-support] FB 3.0 SS WriteFile Error

2019-07-01 Thread trsk...@yahoo.com [firebird-support]
Hi guys,

I have installed FB 3.04 on Windows 7 64 bit.

On Firebird configuration file, have set Temporary Directory to e:\;d:\temp.

I got an error :

I/O error during "WriteFile" operation for file "e:\fb_table_u9" Error while 
trying to write to file. There is enough space on the disk.
 

 I checked drive e, there a file fb_table_u9, the size is about 2 GB and drive 
e has about 3.3 GB free space. Database file size is about 8 GB. Drive e is a 
ram drive, size is 8 GB.

 

 How many space needed for temporary file? 3 GB is not enough? If it was not 
enough, why Firebird not switch to drive d? 

 

 Thanks in advance.
 Anto