Subject Re: [IBO] application using up ram
Author Michael Vilhelmsen
--- In, Helen Borrie <helebor@t...> wrote:
> At 10:48 PM 4/03/2004 +0000, you wrote:
> >My page size (of the DB, right?) is 4096.
> >Where do I see the cache pages ?
> With ib_sql, log on to the database and click the Characteristics
tab. It
> is the Page Buffers field. If it says "0" it means your database
is using
> the DefaultDBCachePages configured for the server in firebird.conf
> default_cache_pages in ibconfig if you are using IB or Fb 1.0).
> You can also get it with gstat -h (it is the Buffers field).

Its 0

> > > >I do the same commits the same places as before.....
> > >
> > > COMMIT or CommitRetaining? i.e. are you always using Autocommit
> >(Does
> > > CommitRetaining) or do you sometimes call COMMIT to end those
> >transactions?
> >
> >I do COMMIT.
> >
> >I practically never uses commitretaining, unless the program does a
> >commit just a little later.
> >A this point I have just tried to start up my appl.
> >At start up, I open 1 query (select), insert a record into another
> >table and COMMIT.
> >The I delete this record again. COMMIT.
> >
> >If I do the above 25 times, I will have used some 200 K more RAM !
> OK. The pages containing committed record versions (yours and
> else's) will be kept in the DbCache until the cache reaches its
> limit. After that, the engine will swap out less recently accessed
> as it needs to cache more. So you should see the RAM growth
stopping once
> the cache is "full".
> Fb 1.5 uses RAM for sorts (IB and FB 1.0 don't). But you still
need to
> configure your temp filespaces in case a sort is needed and you
don't have
> enough RAM available. You should read the docs for info on doing
> If you created your database on InterBase, Forced Writes will be
off by
> default. Windows never writes anything to disk until the last
> is disconnected. That's bad in two ways with IB or Fb 1.0. 1) all
> work (old and new record versions) stays in memory and 2) if there
are any
> network, power or memory problems, everyone's work will be either
> (in the case of brownouts or memory problems) or lost entirely.
> So, while you are checking the cache size, check Forced Writes too,
and set
> it on if it's off.

Forced writes are on

Are we talking about the same thing ?

Its not FB that uses this amount of RAM.
Its my own appl. !
And this has started since I changed some comp. from TIBOQuery to
either TIB_DSQL or TIBCursor.

It seems as if my OWN appl. just uses more and more RAM.
At one point in my program, I have tried to COMMIT all transactions,
closing all querys and cursor, and closing the connection to the DB
and reconnect.
It still uses this amount of RAM.

> Helen