Subject | Firebird 1.5 database size increasing |
---|---|
Author | Bill Oliver |
Post date | 2006-05-29T18:35:09Z |
Hi all!,
I have a customer who is testing their application under load. It's
a Java application, using Hibernate.
After 1 hour of traffic database size increases from 45 Mb to 50 Mb.
The application gets slower, too, but the speed issue may be
something else - we've just started doing analysis.
Each of the tables in the database seems to be using the same number
of data pages. There is no "gap" apparent between OAT and OIT. But,
in the space of an hour we go from:
Number of DB pages allocated = 11317
Transaction - oldest = 153368
Transaction - oldest active = 153369
Transaction - oldest snapshot = 153369
Transaction - Next = 153372
to
Number of DB pages allocated = 12756
Transaction - oldest = 443915
Transaction - oldest active = 443916
Transaction - oldest snapshot = 443916
Transaction - Next = 443919
So, nearly 300,000 transactions and 1400 DB pages in the space of an
hour.
I saw Helen's post of about a month ago, when a user was asking
about a database file growing in size w/o any apparent increase in #
of records. Helen said:
<HELEN>
No. But stop worrying about it. It's not a "problem" and it is not
a sign that the database size will increase in size exponentially for
ever. Firebird stores data on "pages" - these are blocks of disk
that the server requests from the operating system. It never gives
pages back to the OS.
When garbage gets cleared out, the space on these pages is released
for re-use. So, as long as you take regular care with database
hygiene, at some point your database file size will settle down and
growth will be more in keeping with your expectations.
</helen>
Here's my question - While the data pages will be recylced, do the
TIP pages ever get recycled, short of a backup/restore? And, is
there any easy way to see how many database pages are being used to
track old transactions?
One would think that this wouldn't cause a speed slowdown anyhow,
since those old pages would age out of the cache, but maybe there is
something weird going on with the OS (Windows) cache?
-bill
I have a customer who is testing their application under load. It's
a Java application, using Hibernate.
After 1 hour of traffic database size increases from 45 Mb to 50 Mb.
The application gets slower, too, but the speed issue may be
something else - we've just started doing analysis.
Each of the tables in the database seems to be using the same number
of data pages. There is no "gap" apparent between OAT and OIT. But,
in the space of an hour we go from:
Number of DB pages allocated = 11317
Transaction - oldest = 153368
Transaction - oldest active = 153369
Transaction - oldest snapshot = 153369
Transaction - Next = 153372
to
Number of DB pages allocated = 12756
Transaction - oldest = 443915
Transaction - oldest active = 443916
Transaction - oldest snapshot = 443916
Transaction - Next = 443919
So, nearly 300,000 transactions and 1400 DB pages in the space of an
hour.
I saw Helen's post of about a month ago, when a user was asking
about a database file growing in size w/o any apparent increase in #
of records. Helen said:
<HELEN>
No. But stop worrying about it. It's not a "problem" and it is not
a sign that the database size will increase in size exponentially for
ever. Firebird stores data on "pages" - these are blocks of disk
that the server requests from the operating system. It never gives
pages back to the OS.
When garbage gets cleared out, the space on these pages is released
for re-use. So, as long as you take regular care with database
hygiene, at some point your database file size will settle down and
growth will be more in keeping with your expectations.
</helen>
Here's my question - While the data pages will be recylced, do the
TIP pages ever get recycled, short of a backup/restore? And, is
there any easy way to see how many database pages are being used to
track old transactions?
One would think that this wouldn't cause a speed slowdown anyhow,
since those old pages would age out of the cache, but maybe there is
something weird going on with the OS (Windows) cache?
-bill