Subject Re: Question to entry in log file
Author Michael Vilhelmsen
--- In firebird-support@yahoogroups.com, "Vlad Khorsun" <hvlad@...> wrote:
>
> >> This mean that Firebird's process already allocated 2GB of VM and
> >> failed to get more.
> >>
> >> Usually this is because of some high value of
"DefaultDbCachePages"
> >> setting in firebird.conf
> >
> >
> > In the firebird.conf file, the setting regarding "DefaultDbCachePages"
> > is the standard value.
> > This value should be decreased, rigth ?
> >
> > #
> > #DefaultDbCachePages = 2048
> >
> > should be changed to
> >
> > #
> > DefaultDbCachePages = 1024
> >
> > Or what value should I try to use.
>
> It depends. At least now we know you didn't changed it, ok.
>
> > or database(s) have high value of "page buffers"
> >> configured at header page.
> >>
> >
> > Database header page information:
> > Flags 0
> > Checksum 12345
> > Generation 11563831
> > Page size 4096
> > ODS version 10.1
> > Oldest transaction 8836719
> > Oldest active 8836720
> > Oldest snapshot 8811773
> > Next transaction 8921833
> > Bumped transaction 1
> > Sequence number 0
> > Next attachment ID 0
> > Implementation ID 16
> > Shadow count 0
> > Page buffers 0
> > Next header page 0
> > Database dialect 1
> > Creation date Mar 20, 2008 11:26:39
> > Attributes force write
> >
> > Variable header data:
> > Sweep interval: 0
> > *END*
> >
> >
> >
> > The "Page buffers" is the above value.
> > And a setting of 0 means its disabled, rigth?
>
> 0 means - use value from firebird.conf. I.e. for this database
Firebird SS will
> use 4KB * 2048 = 8MB of memory for page cache. Sounds not big.
>
> Count how many databases is opened when VM use is near 2GB.


Easy: 34 is opened.



Look at every
> such database header page and see value of "Page buffers" and "Page
size". This
> gives you sum of amount of memory allocated for page cache for all
databases.


Every DB has "page buffer" of 0.
Every DB has page size of 4096

This will always give me:

34 * 2048 * 4096 = 285.212.672
Some 285 Mbs.

I havn't made any changes to any conf. file or any DB.
I use the standard values all over.


>
> If this sum much lower than 2GB, you probably have memory leak
in Firebird or
> in some UDF.


I dont use any UDFs.



If after full disconnect from all databases FB still used big amount
> of VM (say more than 50MB), then this is definitely memory leak.

See - I cant get all people to just disconnect and see have much
memory is used by FB.
When it happens some 200+ custommers are affected.

I have to get the server up and running again. Quickly.


Besides - When this happens I usually cant even connect to the DB.
I get this error on the client side:

Unable to complete network request to host "willoxdbserver".
Error writing data to the connection.
An existing connection was forcibly closed by the remote host.


And this goes on until I stop and restart Firebird.
And the instant I stop firebird the memory use drops and after restart
every thing is back to normal.


We have other customers with larger DBs.
On there site they have 1 server running 2 DBs.
Here this problem never occurs.

It only happens on this server running all those DB.
Funny thing s - We have another server running same firebird version
but only serving 12 DBs.
It never happens here.


So I suspect it to many DBs working at the same time is giving FB a
hick up ;-)


Sinse we are moving all from FB 1.5 to FB 2.1 its not a big problem
any more.
FB 2.1 can use more than 2 Gb of RAM.
At least its not a problem rigth now with FB 2.1


But I would like to see, if a change in some some value in the conf
file could make a difference.
I.e. lowering the #DefaultDbCachePages = 2048


Thx so far Vlad.

Michael