Subject Re: [IBO] How to specify cache (buffer) size
Author Helen Borrie
At 01:06 PM 26/04/2005 +0000, you wrote:


>Hi,
>
>I need to control the size of Firebird's page cache when connecting to
>a database. However I can't find any TIB_Connection property for that
>purpose.
>
>My application attaches to a central "controller" DB which is rather
>small and static, and to one of many "data" DBs. A data DB may be
>anything from a few thousands rows to millions of rows (company's
>financial data).
>
>Firebird allocates a seperate page cache for each database. There may
>be several clients accessing different DBs, so Firebird needs to
>allocate multiple caches. This can lead to a significant memory
>requirement.
>
>I read in http://www.cvalde.net/document/cache_settings_priority.htm
>that the cache size can be set at connection time. So I want to
>calculate a reasonable cache size before connecting to a data DB,
>based on the size of the DB. I have all the logic in place only I
>can't find the way to do it with IBO.

There was once an API call you could use to set the cache size temporarily
for a connection to Classic on Unix. There used to be a property for it in
TIB_Connection, long ago, before it was deprecated by the Services Manager
(at about IB 5.1 or 5.5, AFAIR). It's not something you should try to have
a user do arbitrarily with Superserver.

The right way to set the database cache override is by running gfix
-buffers (or the equivalent Services Manager operation using the
PageBuffers param of an IBOConfigService component, see IBOAdmin at
www.mengoni.it). It will only work if SYSDBA or the database owner is
logged into a shut-down database, i.e. has exclusive access. You can also
specify a cache size in a database restore, using the -buffers switch.

Helen