Subject Re: [firebird-support] Re: FB3 Memory usage
Author Si Carter
Fair point, I only took a snapshot of the "orphaned" stats from one of the databases, if it happens again, will gather all data for all databases.

But as far as your concerned it's normal to have orphaned records within there?

regards

Si

On 3 November 2016 at 15:47, Dmitry Yemanov dimitr@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
 

03.11.2016 09:37, Si Carter wrote:
>
> I recently installed FB v3.0.1.32609 on Windows server 2008.
>
> This is a dual installation as I still have 2.5.3 installed.
>
> I noticed that my fb3 service is using in excess of 4gb memory

How did you get that number?

> Given this sql
>
> SELECT ma.MON$ATTACHMENT_NAME, ma.MON$USER, a.MON$STAT_ID,
> a.MON$STAT_GROUP, a.MON$MEMORY_USED, a.MON$MEMORY_ALLOCATED,
> a.MON$MAX_MEMORY_USED, a.MON$MAX_MEMORY_ALLOCATED
> FROM MON$MEMORY_USAGE a
> LEFT JOIN MON$ATTACHMENTS ma ON (ma.MON$STAT_ID = a.MON$STAT_ID)
> ORDER BY ma.MON$ATTACHMENT_NAME
>
> it produces the following results, STAT_ID 1 is the one I am more
> concerned about at this point.
>
> [null] [null] 138 2 3248 0 4272 0
> [null] [null] 115 2 44048 0 440480
> [null] [null] 218 3 22104 8112 87984 73688
> [null] [null] 116 3 22384 8112 91760 73688
> [null] [null] 95 3 21192 24336 2121800 2121568
> [null] [null] 1 0 58128176 81557240 1685336336 2771125200

I see that the database utilizes only 81MB of memory (with a 2.8GB peak
somewhen in the past).

> Previously it was using in excess of 5gb of ram, a restart bought it
> back to normal, but it soon escalated to 3gb (within seconds) and now to
> 4gb ram.

I don't see 4GB here, sorry.

> The database has only 4 normal connections, plus Cache Writer and
> Garbage Collector, so it's not under unusual usage at the mo.

Number of connections does not directly affect memory usage.

Dmitry