Lock Configuration Settings - Firebird

The Lock Manager’s default settings should suit most environments initially. Under load, especially with the Classic server, there may be benefits in tuning the settings to improve throughput or to resolve deficiencies in the lock resources.

Configuration Files

Configuration files are located in the Firebird root directory. For Firebird 1.5 and later servers, the configuration file is named firebird.conf. For v.1.0.x, it is named ibconfig on Windows and isc _config on POSIX. Use a plain text editor to open and edit the file.

Changes made to the configuration file on a Classic server will affect the next attachment that is made after the modifications are saved. On Superserver, they will not take effect until all users have logged out and the first user logs back in.


Version 1.5 forward, firebird.conf


Versions prior to Firebird 1.5, isc_config/ibconfig

This setting is relevant only on SMP machines running Classic server.

In Classic server, only one client process may access the lock table at any time. A mutex governs access to the lock table. Client processes may request the mutex conditionally or unconditionally. If it is conditional, the request fails and must be retried. If it is unconditional, the request will wait until it is satisfied. Lock Acquire Spins establishes the number of attempts that will be made if the mutex request is conditional.

An integer is required. The default is 0 (unconditional). There is no recommended minimum or maximum.


Version 1.5 forward, firebird.conf


Versions prior to Firebird 1.5, isc_config/ibconfig Use this parameter for tuning the lock hash list. Under heavy load, throughput might be improved by raising the number of hash slots to disperse the list in shorter hash chains. The value is integer; prime number values are recommended. The default is 101.

This parameter and the Lock Mem Size should be evaluated at the same time, using the Lock Print tool. If the lock hash chains are longer than 20 on average, the number of hash slots is too small. If you need to increase the number of hash slots, you should increase the lock table size by the same percentage.


Version 1.5 forward, firebird.conf


Versions prior to Firebird 1.5, isc_config/ibconfig

This integer parameter represents the number of bytes of shared memory allocated to the memory table used by the lock manager. For a Classic server, the LockMemSize gives the initial allocation, which will grow dynamically until memory is exhausted (“Lock manager is out of room” does not mean somebody went for coffee!) This parameter’s value is related to the size of the database cache, since each page will require a separate lock in table. When the number of pages of database cache is set to a high value, it often causes problems with the lock memory table.

In Superserver, the memory allocated for the lock manager does not grow.

The default size on Linux and Solaris is 98,304 bytes (96K). On Windows, it is 262,144 (256K).


Version 1.5 forward, firebird.conf


Versions prior to Firebird 1.5, isc_config/ibconfig

When a connection wants to lock an object, it gets a lock request block, which specifies the object and the lock level requested. Each locked object has a lock block. Request blocks are connected to those lock blocks either as requests that have been granted or as pending requests.

The LockGrantOrder parameter is a Boolean. The default (1=True) indicates that locks are to be granted on a first -come, first-served basis.

The False setting (0), emulating InterBase v.3.3 behavior, grants the lock as soon as it becomes available. It can result in lock requests being “starved.” Treat this as adeprecated setting and don’t try to set it unless you need it for debugging some modification to the database engine.


Version 1.5 forward, firebird.conf


Versions prior to Firebird 1.5, isc_config/ibconfig

This is an integer parameter, specifying the number of semaphores available for interprocess communication (IPC) between Classic server processes. The default is 32. Set this parameter on a Classic server to raise or lower the number of available emaphores.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Firebird Topics