Subject Re: [firebird-support] Re: Firebird Server Memory is Increasing
Author Helen Borrie
At 05:00 AM 17/07/2003 +0000, you wrote:
>--- In, Helen Borrie <helebor@t...>
> > Chooi-Ting,
> > At 11:18 AM 16/07/2003 +0000, you wrote:
> > >How to resolve firebird server memory ? it is increasing and never
> > >drop, though the increase number of not much, eg. from 23040 to
> > >23496 in few hours time.
> >
> > Please explain what you think is a problem. What needs "resolving"?
>Server Version : firebird 1.0
>architecture: how to check ?

Did you install Superserver or Classic? I'm not sure if you have ps on
Solaris. If not, use the equivalent command to show you what processes are
running. If you have a number of processes called gds_inet_server (one per
attached client) then you have Classic; if you have processes called
ibserver, then it is Superserver.

>platform : Sun Solaris 2.8
># of client attached: <10
>Action: insert/update/delete
>size of database cache : is it same as allocated db pages? if yes, it
>is 37980

Where did you get this figure of 37980? If you configured
database_cache_pages (in isc_config) to be this high then it is waaaaaay
too high, even for SS. Classic would allocate about 300 Mb of static RAM
to each client connection. SS would make a 300 Mb pooled cache for all
connections and grow it dynamically if more is needed. It's still too big.

I think the number you give here probably isn't the right one. See what
you have in isc_config and also check it in isql using SET STATS. The
defaults are 75 for Classic and 2048 for SS. If this parameter is
commented out (#) then you are running with the default.

ISQL> CONNECT database_name;
Current memory = 415768
Delta memory = 2048
Max memory = 419840
Elapsed time = 0.03 sec
Buffers = 2048 <---- this one tells you how many database pages your cache
is. Cache = this figure times the page_size (in bytes)
Reads = 0
Writes 2
Fetches = 2

>database page_size : 8192
>RAM reading now is 23928 (the reading that i captured yesterday is

Where are you reading it from? What is it? and why are these figures a

>it is a problem if the memory keep increasing as I am afraid one day
>it will use all memory in the machine, that will cause the entire
>system hang. Unexpected server down is unacceptable to our client.

The server itself is about 3Mb. With SS, the db cache gets allocated when
the first client connection is made and is released when the last
connection logs out. With Classic the memory will increase each time
another client connection is made and will reduce each time a connection is
logged out. Each client pipe also adds to memory usage, not much, about
200 Kb per connection.

Still, I'm still very unclear about what your numbers are, or what a
difference of 432 between two numbers actually means. If it's Kb on
Superserver, it might be just the difference between 8 connections and 10
connections. If it's Mb on Classic, it might be the difference between one
connection and two connections with a misconfigured db cache. Who knows?

If you have Forced Writes off, then at times you will have some OS cache
holding the commits that are waiting to be flushed...without more adequate
information, who knows?