Advanced Settings FIREBIRD

Tips for setting FIREBIRD

Introduction

Normally it is not necessary to configure Firebird is one of its advantages, but we do have many (more than ten for example) simultaneous users of the program, so if there are certain tricks and considerations that may improve speed. It is also necessary to say here that the author does not know the ins and outs of this particular scene of the Firebird server configuration, but you know who did it knows that ultimately it is often important!

If you choose, you will find the text file where you change these settings in the folder where Firebird is installed ("C: \ Program Files \ Firebird \ Firebird_2_0" for example) and is called "firebird.conf" (different versions can be used other names in the future).

It is a plain text file (save a copy before you begin to modify it). Removing '#' the beginning of a line that option will be taken into account when you restart Firebird (no need to restart the complete machine). You can restart the server control panel icon Firebird, here is a button to stop and start the service.

You can also use a graphical mode tool to perform these tasks, you can download
here.


Firebird Installation Type

The manager of Firebird databases can be installed in two ways, although the default is usually the most interesting, it is worth knowing the second format, which in some cases (machines with multiple processors, generous memory and for 20 or more users) can help us to improve performance.

The default installation is the "SuperServer", the second format is called "Classic Server".

They differ in how to organize themselves to serve multiple connections, and this organization influences the consumption of RAM.
 
"SuperServer" reserve a number of MB for each database to be accessed. In this format is a single process fbserver, which makes the memory consumption is fixed, regardless of the number of connected users. In addition to being a single process multiprocessor machines are not used: this process takes one of them and forget the rest of processors.

Firebird version 3, which should go out sometime in 2008 - approximate date, remove this restriction in the number of processors and probably two ways to install.

"Classic Server" creates a process and reserve the number of MB per-user connection, and thus taking advantage of all processors we have, but the RAM needed increases as we add more users to the system.

Only recommended to install this way if: We have a multiprocessor server and enough memory (2 GB for example) and SuperServer mode does not give us a good performance ... but we must bear in mind that the RAM required when adding users will increase.
If you install this version, we must take this into account when choosing the cache size we assign to each connection (discussed below), since in this case there will be MB per database will be MB per user. Indeed, the default value for this parameter is 2048 pages (8 MB) in the SuperServer but just 75 (300KB) at the Classic server.

Helpful Hints

Here are some things that can change in the configuration "factory" and what effect it will have in daily use.

1) Size CACHE:
Simplifying how much RAM is reserved for each database that opens Firebird, and the more the better, of course.
This memory is measured in "pages" and a page can vary in size, the size default data HCLab of 4 KB. The default mode Superserver "Firebird," the default installation DefaultDbCachePages-usa = 2048, ie about 8 MB, so I really here have much to gain by putting, for example, 10 times more (80 MB) or even substantially more. Should play with some values and see how it SO (Windows or Linux) of free memory, and to spend all free memory, if only for a noble cause, we never pays. As the normal use of HCLab is on a single database, if we decide to use 1 GB for Firebird, we would use a hundred times more than what comes by default, some 200 thousand pages, so DefaultDbCachePages = 204 800 might be an interesting value test. ClassicServer For a good number would be about 512 (512 x 4 = 2 MB per simultaneous user).

2) Temporary files:
Used to sort data and the like, that is, very often.
These files should not be on the same disk where the database itself, since in this case, manipulating both files at the same time significantly speed penalty. Check the configuration file TempDirectories clause and then point to the disk operating system, or if you have it, a bonus disc that you use only for these temporary files.

3) RAM disc: If you have RAM to spare, let's say more than 2 GB on 32 bit systems or more than 4 in 64-bit systems, the extra RAM can be used to give more speed to the time-yes, again are the key-using a "RAM disk." These discs are programs that are installed and the system to believe that memory is a new disk, but very fast. If you installed one of these programs and use that unit as a temporary directory Firebird, change can be dramatic.
We recommend Virtual Hard Drive Pro
www.farstone.com for its versatility and ease of use, taking PRESAT magnificent.

Font:
http://www.hcsoft.net