Configuring Parameters in ibconfig

From InterBase
Jump to: navigation, search

Go Up to Server Configuration


You specify configuration parameters for InterBase Server by entering their names and values in the configuration file, ibconfig. Entries are in the form:

parameter <whitespace> value
  • <parameter> is a string that contains no white space and names a property of the server being configured.
  • <value> is a number or string that is the configuration of the specified property.

Each line in ibconfig is limited to 80 characters, including the parameter name and any whitespace.

If you specify a value of zero or less for a parameter, the server ignores the setting and uses the default value for that parameter. However, there is no upper limit applied to these parameters.

The server reports the values for each of these parameters in the InterBase.log file on startup.

When a parameter is commented out in the ibconfig file, the server uses the default value.

The following is a summary of allowable entries in ibconfig:

Contents of ibconfig
Parameter Description

ADMIN_DB

  • Platforms: All
  • Specifies the name of the InterBase security database.
  • Needed only if the security database is not named.

admin.ib

  • The security database must always be in the InterBase home directory.

APPDATA_DIRECTORY

  • The directory path MUST be enclosed in double quotes.
  • The choice entered may vary based on the underlying OS platform version.
  • It is an application for all platforms.
  • It specifies a directory where InterBase data files (requiring read-write) access are located. This includes database files admin.ib, examples/ sub-folder, ext/ sub-folder, secure/ sub-folder to support SSL/OTW configuration, license/ sub-folder to deliver licenses required for InterBase runtime, and, other temporary files InterBase creates to support its runtime engine (.lck and .env files, interbase.log etc.).
  • This has been introduced to support Windows UAC driven requirements when installing under "Program Files" area, but can also be applied to isolate InterBase "writable" files into a separate location on other supported Editions and/or OS platforms.

CPU_AFFINITY

  • Platform: Windows only.
  • 32-bit values only allowed. Only the first 32 processors can be set.
  • On a SMP system, sets which processors can be used by the InterBase server. The value is taken from a bit vector in which each bit represents a processor. Thus, to use only the first processor, the value is 1. To use both the first and second processors, the value is 3. To use the second and third, the value is 6.
  • The default is to use all processors (when entry is commented out).

CONNECTION_TIMEOUT

  • Platforms: All
  • Seconds to wait before concluding an attempt to connect has failed.
  • Default: 180

DATABASE_CACHE_PAGES

  • Platforms: All
  • Server-wide default for the number of database pages to allocate in memory per database.
  • Can be overridden by clients.
  • See Configuring the Database Cache for more information.
  • Default: 2048

DATABASE_ODS_VERSION

  • Platforms: All
  • Version: starting in InterBase XE7
  • The database server/engine will automatically create/restore databases to this major ODS version number, if specified.
  • Valid ODS major versions are in the range of 13 to 16.
  • Default major ODS version is the latest version supported by the product.
  • Default: 16

DEADLOCK_TIMEOUT

  • Platforms: All
  • Seconds before an ungranted lock causes a scan to check for deadlocks.
  • Default: 10

DUMMY_PACKET_INTERVAL

  • Platforms: All
  • Seconds to wait on a silent client connection before the server sends dummy packets to request acknowledgment.
  • The default value of 0 will not send any dummy keepalive packets to the client from the server.
  • Versions of InterBase before 7.1 used to have this set at 60 seconds, by default. This has now been modified to have a default of 0 (zero) seconds due to a memory leak bug in one of the Windows system drivers for socket connections.
  • Alternatively, you can set the interval value for a specific client by using the isc_dpb_dummy_packet_interval DPB parameter while doing a connection.

ENABLE_HYPERTHREADING

  • Platforms: Windows, for InterBase 32-bit Edition(s) only
  • Specifies whether Intel Hyper-threading technology enabled logical processors should be enabled.
  • Valid values are: 1 (enable), 0 (disable).
  • Default: 0 (disable)

EXTERNAL_FILE_DIRECTORY

  • Platforms: All
  • The default directory for an external table's file is <interbase_home>/ext.
  • Using this parameter, you can list additional directories where external files can reside.
  • For security reasons, do not put other files in this directory.
  • Directory path MUST be enclosed in double quotes. For e.g.
EXTERNAL_FILE_DIRECTORY "C:\Temp"
EXTERNAL_FILE_DIRECTORY "/tmpdir"
  • List multiple entries one per line; directories are used in the order specified.

EXTERNAL_FUNCTION_DIRECTORY

  • Platforms: All
  • The default directory for UDF libraries is <interbase_home>/UDF.
  • Using this parameter, you can list additional directories where UDF libraries should be loaded from.
  • For security reasons, do not put other files in this directory.
  • Directory path MUST be enclosed in double quotes. For e.g.
EXTERNAL_FUNCTION_DIRECTORY "C:\Temp"
EXTERNAL_FUNCTION_DIRECTORY "/tmpdir"
  • List multiple entries one per line; directories are used in the order specified.

LOCK_ACQUIRE_SPINS

  • Platforms: All
  • Number of spins during a busy wait on the lock table mutex
  • Relevant only on SMP machines
  • Default: 0

LOCK_HASH_SLOTS

  • Platforms: All
  • Tune lock hash list; more hash slots means shorter hash chains.
  • Not necessary except under very high load
  • Prime number values are recommended.
  • Default: 101

MAX_DB_VIRMEM_USE

  • Platforms: Windows
  • Define an upper percentage limit of how much of the available virtual memory InterBase can use for its large memory allocations like those of database cache etc. This is set as a percentage of total virtual memory available to the process.
  • This can be used to set the limit to a lower level if you observe that other critical memory allocations such as file I/O buffers, file handles, socket buffers etc. need the user space.
  • Valid range that can be set is between 50 and 100.
  • Please note that setting this to 100 indicates that InterBase can use up all available virtual memory for its database cache etc. This is not recommended. For e.g.
setting this to 90 (the default), indicates that on a 2GB virtual address space, InterBase process will only use up 1.8GB of the available virtual memory for database cache allocations; the rest will be available for other critical memory allocations.

MAX_THREADS

  • Platforms: All
  • Controls the maximum number of threads that can be active at one time within the InterBase engine. The listed value applies to a system with multiple licensed CPUs. For a single CPU system, the value defaults to 1 which eliminates the synchronization overhead required by multiple CPUs.
  • Default: 1000000

MAX_ASSISTANTS

  • Platforms: All
  • Controls the maximum number of threads that can be active assisting other threads with their tasks. This number should be less than the number of CPUs on which InterBase can run.
  • Default: 1

MEMORY_RECLAMATION

  • Platforms: All
  • Number of seconds between attempts to return unused memory to OS.
  • This parameter enables better co-existence with neighboring processes by not monopolizing memory. It cannot guarantee that other processes will behave in kind.
  • 0 = disable memory reclamation
  • 1 = memory reclamation on attach of first database
  • 2 = memory reclamation on detach of last database
  • 3 = 1 + 2 above
  • > 15 = number of seconds between memory reclamations
  • Default: 300

PAGE_CACHE_EXPANSION

  • Platforms: All
  • Number of MB of memory to expand page buffer cache until upper limit is reached. The upper limit can be a database-specific setting or the DATABASE_CACHE_PAGES parameter. The page buffer cache is expanded when there are no more free buffers, which occurs when all buffers have been loaded with a database page.
  • This parameter is used to smooth the memory allocation of page buffers to match demand generated by client load.
  • 0 = allocate all page buffers on first database attach.
  • > 0 = expand this many MBs at a time until all page buffers allocated.
  • Default: 256

SERVER_CLIENT_MAPPING

  • Platform: Windows
  • Size in bytes of one client’s portion of the memory mapped file used for interprocess communication.
  • Valid values are 1024, 2048, 4096, 8192
  • Default: 4096

SERVER_PRIORITY_CLASS

  • Platforms: Windows
  • Priority of the InterBase service on Windows
  • The value 1 is low priority, 2 is high priority
  • Relevant only on Windows NT/2000/XP
  • Default is 1

SERVER_WORKING_SIZE_MAX

  • Platforms: Windows
  • Threshold above which the OS is requested to swap out all memory.
  • Default is 0 (system-determined)

SERVER_WORKING_SIZE_MIN

  • Platforms: Windows
  • Threshold below which the OS is requested to swap out no memory.
  • Default is 0 (system-determined)

SOLARIS_BOUND_THREADS

  • Platform: Solaris
  • When set to 1 each user-level thread is bound to a LWP thread.
  • The default of 0 creates user-level threads unbound and causes a user-level scheduler to map them to available LWPs.
  • Default: 0

SOLARIS_SYNC_SCOPE

  • Platform: Solaris
  • When set to 1 threads use process-level synchronization variables.
  • The default of 0 causes thread-level synchronization variables to be used.
  • Default: 0

SORTMEM_BUFFER_SIZE

  • Platforms: All
  • Specifies the size of a sort buffer in memory.
  • Versions of InterBase before 7.1 used to have a static value of approx. 128 KB. This is now configurable per server using this parameter. The default value is just about 1 MB.
  • Setting this to a higher value will enable better performance in large sort-merge queries.
  • Default: 1048500

SQL_COMPILER_RECURSION

  • Platforms: All
  • Specifies the call depth that the recursive descent parsing algorithm will try during SQL compilation phase of statement preparation. If the call depth would exceed this limit than a stack overflow is declared and returned as an error. Note that this is an artificial stack overflow detection and not a hardware detected stack overflow.
  • Default: 2000

STARTING_TRANSACTION_ID

  • Platforms: All
  • Version: starting in InterBase XE7
  • ODS version: 16+
  • The database server/engine will automatically create/restore databases with this transaction ID as the starting number.
  • If you want to restore your database(s) to test with very high transaction ID numbers, to evaluate 48-bit transaction ID support, set this value and restart InterBase.
  • Valid values include any value >= 0, that can be represented in a 48-bit Integer data type.
  • Default starting transaction ID on database create/restore is 0
  • Default: 0

SWEEP_QUANTUM

  • Platform: All
  • Specifies the maximum number of records that a garbage collector thread or a sweeper thread is allowed to work before yielding control back to the worker threads.
  • Default:10

SWEEP_YIELD_TIME

  • Platforms: All
  • Specifies the time, in milliseconds, the sweeper or garbage collector thread sleeps.
  • Default:1 millisecond

TCP_REMOTE_BUFFER

  • Platforms: All
  • TCP/IP buffer size for send and receive buffers. This applies to both client and server programs.
  • Valid range is 1448 to 32768
  • Default: 8192 bytes

TMP_DIRECTORY

  • Platforms: All
  • Directory to use for storing temporary files (such as sort files).
  • Default is the value of environment variables INTERBASE_TMP or TMP, in that order; otherwise /tmp on UNIX or C:\temp on Windows NT/2000/XP.
  • If you have lots of space in your default temporary folders as above, then there is no need to mention any further directory listings here.
  • Specify directory path and number of bytes available in the directory.
  • Directory path MUST be enclosed in double quotes.
  • Format for entry is as follows.
TMP_DIRECTORY <MaxBytes> <AbsoluteDirectoryPath>
MaxBytes should be a number indicating maximum space in bytes to be used in the directory, of type 32-bit unsigned integer.
Valid range: 1MB - 4GB (in bytes)
  • For e.g.
TMP_DIRECTORY 500400300 "C:\Temp"
TMP_DIRECTORY 1500400300 "/tmpdir"
  • List multiple entries, one per line; directories are used in the order specified.

USER_QUANTUM

  • Platforms: All
  • Specifies the maximum number of records that a worker thread (thread running an user query) is allowed to work before yielding control back to other threads.
  • Default: 1000

V4_EVENT_MEMSIZE

  • Platforms: All
  • Bytes of shared memory allocated for event manager.
  • Default: 32768

V4_LOCK_GRANT_ORDER

  • Platforms: All
  • 1 means locks are granted first come, first served.
  • 0 means emulate InterBase V3.3 behavior, where locks are granted as soon as they are available; can result in lock request starvation.
  • Default: 1

V4_LOCK_MEM_SIZE

  • Platforms: All
  • Bytes of shared memory allocated for lock manager.
  • Default is 98304 on Linux and Solaris, 256K on Windows.

V4_LOCK_SEM_COUNT

  • Platforms: All
  • Number of semaphores for interprocess communication (Classic architecture only).
  • Default: 32

V4_LOCK_SIGNAL

  • Platforms: All
  • UNIX signal to use for interprocess communication
  • (Classic architecture only).
  • Default: 16

V4_SOLARIS_STALL_VALUE

  • Platform: Solaris
  • Number of seconds a server process waits before retrying for the lock table mutex.
  • Default is 60