ibconfig file) isc_dpb_num_buffers parameter) ibconfig file).
DATABASE_CACHE_PAGES set to 10000
and use 8K pages; it means 80MB of cache per database ,
i.e. after connecting to 4 databases, InterBase will allocate 320MB of RAM for cache!
For this reason it seems better to keep this value relatively small,
and set cache size individually for each database.
Do not forget to uncomment proper line in ibconfig file
(i.e. remove # from DATABASE_CACHE_PAGES line)
and restart InterBase (superserver) to take change into account.
isc_dpb_num_buffers parameter in DPB block,
that is used by isc_attach_database() function.
The behavior is different for Classic and for Superserver:
Because in classic InterBase each user runs its own copy of IB server, each user has its own buffers, and thus user can set whichever value he/she wants (i.e. changing number of buffers in one process does not affect other users/processes).
In superserver IB, buffers are shared among all users; it means
ibconfig file or built-in default)
In isql utility there are two possibilities how to change cache size at attachment level -
either by -c command line parameter, or by CACHE parameter of CONNECT statement.
In fact, InterBase does not directly support CONNECT statement
(i.e. you can't directly execute CONNECT statement by isc_dsql_execute-like calls).
isql will parse its command line, and when it encounters CONNECT,
it will convert it to calling isc_attach_database() function
It means both "-c" command line parameter, and CACHE parater of CONNECT
statement are finally converted to isc_dpb_num_buffers value in DPB block.
CACHE has higher priority than -c if you use both.
-buffers 1234)
and stored on gdb header page. New value does not take effect immediately,
but when the server opens database file (i.e. after closing all connections first).
The value is preserved when doing backup/restore,
but sometimes it does not work correctly, so you should verify it after restore.
You can also change the value during restore (gbak -c -buffers 1234).
To get rid of database wide cache setting, set the value to zero.
CACHE parameter for CREATE DATABASE command.
E.g. when you create new database by isql and immediately check
cache size, you will see that command line -c parameter is ignored,
and built-in or ibconfig value will be used.
SET STAT; COMMIT;In WISQL use menu command
Session Basic Settings Display Statisticsand then execute
COMMIT;
isc4.gdb (that must be opened during each login) shows the same effect
(slow login) if you set large cache size directly in security database (by gfix),
but is not influenced by large default value in ibconfig file.