Firebird Documentation Index → Firebird 2.5 Release Notes → Configuration Parameter Additions and Changes → Parameters Affecting Filesystem Cache Usage |
There are now two parameters for configuring how Firebird interacts with the filesystem cache.
New in Firebird 2.5, FileSystemCacheSize controls the maximum amount of RAM used by a Windows file system cache on 64-bit Windows XP or a Microsoft Server 2003 host with Service Pack 1 or higher.
At the V.2.5 initial release, it has no effect on POSIX host systems.
The setting for this parameter is an integer expressing the percentage of the total physical RAM that is available to the OS. To be valid, settings must be within the range 10 (per cent) to 95 (per cent), or explicitly set to 0 to enforce the host caching settings. Numbers outside that range will assume the default, which is 30 (per cent).
As with any firebird.conf
setting, changes will not take effect until
the server process is restarted.
The OS user needs the SeIncreaseQuotaPrivilege in order to adjust the filesystem cache settings. This right is built in for users with Administrator privileges and for service accounts and it is also granted to the Firebird service account explicitly by the Windows installer.
Under other conditions, e.g., embedded, or where the Firebird server is run as an
application, or in a custom service installation, the user may not have that privilege.
The process startup does not fail as a result of this misconfiguration: it will write a
warning to the firebird.log
and start-up will simply proceed with
the host OS settings.
This parameter was introduced in V.2.1 as MaxFileSystemCache. Because its name has been changed, its description is repeated here to alert upgraders.
FileSystemCacheThreshold sets a threshold determining whether Firebird will allow the page cache to be duplicated to the filesystem cache or not. If this parameter is set to any (integer) value greater than zero, its effect depends on the current default size of the page cache: if the default page cache (in pages) is less than the value of MaxFileSystemCache (in pages) then filesystem caching is enabled, otherwise it is disabled.
This applies both when the page cache buffer size is set implicitly by the DefaultDBCachePages setting or explicitly as a database header attribute. It applies to all platforms.
Thus,
To disable filesystem caching always, set FileSystemCacheThreshold to zero
To enable filesystem caching always, set FileSystemCacheThreshold an integer value that is sufficiently large to exceed the size of the database page cache. Remember that the effect of this value will be affected by subsequent changes to the page cache size.
The default setting for FileSystemCacheThreshold is 65536 pages, i.e. filesystem caching is enabled.
Observe that, if the configured cache size affecting a particular database is greater than the FileSystemCacheThreshold then the setting for FileSystemCacheSize (see above) will have no effect on that database.
Firebird Documentation Index → Firebird 2.5 Release Notes → Configuration Parameter Additions and Changes → Parameters Affecting Filesystem Cache Usage |