On 03/11/12 03:03, Jesus Garcia wrote:
> Sorry for post something posted in firebird support, but i have not had any
> response and may be developers can do.
>
> I'm trying to understand the memory usage with classic server 2.5.2 32/64
> bits with cache pages set to 75/300.
>
> Our production database, once one form is opened, uses around 120000 Kb
> memory in Fb 2.5 64 with 300 Cache pages.The memory is allocated the first
> time a form that open a set of tables that is related with many other
> tables in the database with the table's triggers. I think the memory
> allocation is for metadata, because just preparing the querys, the memory
> consumption increases. If i comment one trigger the memory decreases to the
> half, but the triggers are needed.
>
> Once that table is opened, the memory usage ( Working Set ) for
> fb_inet_server is between 120000 Kb and 130000 Kb. That makes the memory
> consumption for 150 users around 20-24 Gb. I'm trying to understand haw can
> I avoid using so much RAM, if i can.
> After I close the form, the transaction and the tables, the memory
> consumption is the same, but after some minutes i see that the memory
> consumption (Working Set) decreases and uses between 8 and 15 Mb. After
> that if i reopen again the form that opens the tables that makes
> fb_inet_server uses a lot of memory, then the memory consumption in
> fb_inet_server is between 20 Mb and 30 Mb, what i see normal. Working after
> that with the app, never uses more than 50 MB, but never less than 25 MB
>
> After that i have created a test program that opens a connection to the
> database, opens tha datasets that forces the memory consumption, closes
> them and wait with the connection opened. I have downloaded the last builds
> of fb 2.5 for 32 and 64 bits and have  runned the test over firebird 32 and
> 64 bits in a Windows 7 64 bits workstation.
>
> I have created 10 connections to both servers with the default
> configuration in firebird.conf (75 cache pages).
>
> 64 bits. Each connection uses 112000 Kb Working Set, while 106364 Private
> Bytes
> 32 bits. Ecah connection uses 85000 Kb Working Set, while  around 80000
> Private bytes
>
> Waiting some minutes, i see that the working set decreases, process by
> process to less than 1 MB.
>

That's sooner of a kind of OS-specific effect. Such small working set as
1Mb is too small for firebird.

> What is the real RAM needed for each connection?

That depends first of all upon the metadata, needed at he given moment
of time.

> Is there any option to force firebird to free memory used for loading
> metadata?

Right now not. May be it's possible to have one, but that's not trivial
change.

> Is there any option for not use so much RAM?

Use superserver.

> Why 64 bits version uses 27000 Kb than 32 bits more for each connection?

Because metadata cache contains a lot of pointers. They are twice bigger
in 64 bits case.



------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to