Firebird server is very slow, using 100% of system resources, etc.


There are various possible reasons for this. Here are some things that you can check:

- Database queries that are not optimized. In Firebird 2.1 and higher you have monitoring tables, so you can detect which query is causing problems. Once you isolate it, check the query plan and try to change it to use indexes wherever possible.

- There are common problems with the usage of filesystem cache. Firebird stores an in-memory copy of the database file from the hard disk. The cache is big for SuperServer since all connections share the same cache. However, on most modern operating systems, the filesystem stores a cache of its own, thus duplicating the same thing in RAM twice. This is especially evident on Linux where all of RAM is in use all the time (whatever is not used for applications is used by filesystem cache). Sometimes the Firebird cache and filesystem cache could be so big that they exceed the physical RAM and some of it goes into swap space. This can hog the system completely, especially if it swaps back and forth all the time. You should not set the cache size to consume large part of your RAM. In newer Firebird versions, there's the MaxFileSystemCache parameter in the firebird.conf file. Make sure you read the release notes before using it.

- If you're using .gdb as file extension, make sure you read FAQ #353


Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.



All contents are copyright © 2007-2024 FirebirdFAQ.org unless otherwise stated in the text.


Links   Firebird   News   FlameRobin   Powered by FB: Home Inventory   Euchre  
Add content   About  

Categories
 Newbies
 SQL
 Installation and setup
 Backup and restore
 Performance
 Security
 Connectivity and API
 HOWTOs
 Errors and error codes
 Miscellaneous