Subject Re: [IBO] application using up ram
Author Helen Borrie
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 (or
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).


> > >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 everyone
else's) will be kept in the DbCache until the cache reaches its
limit. After that, the engine will swap out less recently accessed pages
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 that.

If you created your database on InterBase, Forced Writes will be off by
default. Windows never writes anything to disk until the last attachment
is disconnected. That's bad in two ways with IB or Fb 1.0. 1) all the
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 corrupted
(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.

Helen