Subject Re: [firebird-support] Re: Performance tuning large FDB
Author Jan Bakuwel
Hi Helen,

> It's not a question of comparison. FB's cache is a dynamic page
> cache. Its use is to progressively cache data and index pages that have
> already been read, to reduce the number of disk I/Os.

Thanks, that explains.

> Page caching is not "memory management", of the kind you are referring
> to. It is a cache in RAM and the server does manage the cache, i.e. it
> maintains it, requests more if necessary [or if possible], writes to it,
> reads from it, switches out obsolete pages, et al. But it doesn't use the
> page cache for anything but page caching.
>
> There's a big difference in the way the page cache is used, too, depending
> on whether you are using SS or Classic. And page cache should *always* be
> budgeted for allocation from RAM: paging it to disk defeats its purpose.
>
> The way the OS manages RAM *does* matter. If RAM is available, the server
> will use it for storing the intermediate sets during sorting operations
> (order by, group by) and (I think) for unions. This RAM is managed by the
> OS and it's as likely to be paged to disk as any other RAM that is managed
> by the OS. If virtual memory is insufficient for the sort operation, the
> engine will store the entire intermediate output in disk files. You should
> allocate space on disk for this, preferably on your fastest disks and NOT
> on the same physical disk[s] where the OS is caching RAM.
>
> You can bump up the maximum RAM available for sorts by reconfiguring the
> SortMemBlockSize and SortMemUpperLimit parameters.

It seems FB doesn't allocate all the available RAM (in this case 8GB). I
would expect FB to use all the available RAM, however FB's memory usage
doesn't grow beyond approx 1GB, even after the processes accessing the
DB have run for a while (and gone thru most of the records).

Do you know what the optimal (max?) settings is for the FB parameters?
Daniel suggested that the page cache shouldn't exceed 10.000 pages
because it would decrease performance on FB < 2.0.

> You can also reconfigure the Lock Manager memory. There's an article about
> this by Ann Harrison in the second issue of the IBDeveloper magazine at
> www.ibdeveloper.com ....

Thanks for the link... however since I have mostly 1 concurrent user I
don't think the Lock Manager will offer any optimizations. Good to know
though, for not all dbs have such a low concurrency.

I guess I'll have to wait for FB 2 ... hopefully FB 2 will be able to
make better use of the available RAM.

brgds,
Jan


--

A journalist once asked the late Gandhi what he thought of the western
civilization. Gandhi replied: "Western Civilization? That would be a
good idea!".

----

Ships Unit
Information, Communication, Technology
Greenpeace International
Ottho Heldringstraat 5
1066 AZ AMSTERDAM
Netherlands (MET)

direct +31 (0)20 7182084
fax +31 (0)20 5148151
reception +31 (0)20 5148150
email jan.bakuwel&int.greenpeace.org
private jan.bakuwel&hccnet.nl
(replace & by @ in the emailaddress)