Set database page buffers
<< Shadow files | Firebird Database Housekeeping Utility | Limbo transaction management >>
Set database page buffers
The database cache is an area of RAM allocated to store (cache) database pages in memory to help improve the efficiency of the database performance. It is far quicker to read data from memory than it is to have to physically read the data from disc.
The size of the database cache is dependent on the database page size and the number of buffers allocated, a buffer is the same size as a database page, and whether the installation is using Classic or Superserver versions of Firebird.
In a Classic Server installation, each connection to the database gets its own relatively small cache of 75 pages while Superserver creates a much larger cache of 2,048 pages which is shared between all the connections.
The command to set the number of cache pages is:
gfix -b[uffers] BUFFERS database_name
This command allows you to change the number of buffers (pages) allocated in RAM to create the database cache.
You cannot change the database page size in this manner, only the number of pages reserved in RAM. One parameter is required which must be numeric and between 50 (the minimum) and 131,072 (the maximum).
The setting applies only to the database you specify. No other databases running on the same server are affected.
The following example shows the use of gstat
to read the current number of buffers, the gfix
utility being used to set the buffers to 4,000 pages and gstat
being used to confirm the setting. The value of zero for page buffers indicates the default setting for the server type is in use.
Note: You can use the gstat
command-line utility to display the database details with the command line: gstat -header db_name
. However, to run gstat
, you need to be logged into the server - it cannot be used remotely.
linux> gstat -header my_employee | grep -i "page buffers" Page buffers 0 linux> gfix -buffers 4000 my_employee linux> gstat -header my_employee | grep -i "page buffers" Page buffers 4000
See also:
Database buffers
back to top of page
<< Shadow files | Firebird Database Housekeeping Utility | Limbo transaction management >>