Subject Re: [firebird-support] Re: How to find out buffer size.
Author Alexandre Benson Smith
Mike wrote:
> so that means there is no way to limit the amount of memory thats
> used. Is that so? If it is than what am I to do? Upgrading to 2.0 is
> not an option now? To keep restarting database server is not a desired
> solution either.
>

FB 2.0 is 32bit app too, I think will be available 64bit version, but I
think it's not available right know, but don't took it as authoritative
answer since I had not even looked for it. :-)

> Anyway here are the numbers I gathered:
> Database 1:
> Page Size: 8192 bytes.
> Default Cache Size (Page buffers field from gstat -h): 65536
>
> Database 2:
> Page Size: 8192 bytes.
> Default Cache Size: 65536
>

Reduce de Cache Size to something between 8000-10000. There is a known
limitation on the FB 1.X dirty page algorithm that tends to slow down
with Cache Size greater than 10k. FB 2.0 can handle bigger caches

> If I use my formula to plug these numbers it does not come close to
> the 2 G. 8192 X 65536 X 2 = 1,074,135,040 bytes.
>

Don't forget that there are other dynamic memory allocations (sort
process for example) and as any kind of software FB has his own internal
structures that resides on RAM. The Cache are *only one* of them
(probably the biggest) but just one of them.

> So I guess my question is how to limit the memory used by the database
> server.
>

I think you should decrease the Cache size to around 10k pages, I think
you will get better performance and will not suffer the 2GB memory limit
exceeded.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br