SMP Support

From InterBase

Go Up to Server Configuration


InterBase provides symmetric multiprocessor (SMP) support for both clients and servers. Older versions of InterBase ran on SMP systems safely by allowing only a single processor at a time to execute within the InterBase components. Current versions of InterBase exploit SMP hardware by running InterBase threads on all processors simultaneously for increased throughput and performance.

Important:
When you purchase a single server license, you acquire the right to use a single processor. You must purchase one additional license for each additional processor that you wish to use.

On Windows platforms, the CPU_AFFINITY setting in the ibconfig configuration file specifies which processors of a multiprocessor system InterBase should use. The default setting, in effect when CPU_AFFINITY is commented out, is to use as many processors as licensing permits. See Expanded Processor Control: CPU_AFFINITY below for how to specify a subset of processors to use.

Expanded Processor Control: CPU_AFFINITY

On Windows multiprocessor platforms, you can specify which processors InterBase should use by adding the CPU_AFFINITY parameter to the ibconfig file. This setting is useful whenever the number of licensed processors is less than the number of actual processors present.

Important:
Note that when you purchase a single server license, you acquire the right to use a single processor. You must purchase one additional license for each additional processor that you wish to use.

The CPU_AFFINITY parameter populates a bit vector in which each bit represents a processor on the system on which the threads are allowed to run. The maximum number of processors depends on the operating system. To specify which processors should be used, give CPU_AFFINITY a decimal value that corresponds to the binary value that results from setting a bit for each desired machine. For example, to use processors 2 and 3, set CPU_AFFINITY to 6:

CPU_AFFINITY 6
To use these processors CPU_AFFINITY value Array setting

1

1

0 0 1

2

2

0 1 0

1 and 2

3

0 1 1

3

4

1 0 0

2 and 3

6

1 1 0

1, 2, and 3

7

1 1 1

ibconfig Parameter: MAX_THREADS

Setting the MAX_THREADS parameter in ibconfig controls the maximum number of threads that can be active at one time within the InterBase engine. The default setting is 100:

MAX_THREADS 100

This configuration parameter controls the number of active threads in the engine. The ideal setting for this number depends partly on the nature of the work being performed by your clients. If you have many clients performing very similar tasks, you may want to lower the MAX_THREADS setting to reduce contention. On the other hand, if simultaneous activity is highly diverse, setting this to a higher value may increase throughput.

Note that this setting does not affect the maximum possible threads that can be created by the InterBase server but only the number that can be active in the engine at one time.

ibconfig Parameter: THREAD_STACK_SIZE_MB 2

This parameter controls the stack size of various threads in InterBase. The value is in multiple of MBs per thread. The valid range is 2MB to 32MB. If it is set beyond the range, the value defaults to 2MB.

You should not have to change this parameter for normal use of InterBase. In extremely rare cases of abnormal termination of the process, the reason might be thread stack space constraints due to high levels of recursive calls (of stored procedures and such). Feel free to increase this value then.

  • The default setting on 32-bit Editions is 2 (2 MB).
  • The default setting on 64-bit Editions is 4 (4 MB).

Advance To: