routines
Synopsis
[config] routines=n ; This is the format for single-value automatic allocation.
[config] routines=n1, n2, n3, n4, n5, n6 ; This is the format for multiple-value manual allocation.
The default for this parameter is routines=0. This allocates memory equal to 10% of the memory allocated to 8-kilobyte global buffers in the database cache by the globals parameter, with a minimum of 80 MB and a maximum of 1 GB.
Description
The routines parameter specifies the amount of memory to allocate for buffering routines. The total memory is shared across six pools of different buffer sizes, from 2-kilobyte to 64-kilobyte,
You can configure routine buffers pools in one of two ways — either specify a single value for automatic allocation, or multiple values to allocate buffers manually. For typical production instances, automatic allocation is sufficient; however, the ideal allocation for a given application depends on may factors, and adjustment may be necessary to optimize performance.
Automatic (Single-value) Buffer Allocation
You can specify a single value, n, as the total number of megabytes that InterSystems IRIS® data platform allocates for routine buffers. The minimum size is 80 MB; if a smaller value is specified, the instance adjusts up to 80 MB. A value of 0 (the default) allocates memory equal to 10% of the memory allocated to 8-kilobyte global buffers in the database cache by the globals parameter, with a minimum of 80 MB and a maximum of 1020 MB.
InterSystems IRIS divides the memory among the 4, 16, and 64-kilobyte buffer pools as follows:
-
12.5% in 4-kilobyte buffers
-
37.5% in 16-kilobyte buffers
-
50% in 64-kilobyte buffers
For example, if you specify routines=500, InterSystems IRIS creates:
-
16,000 4-kilobyte buffers (62.5 MB)
-
12,000 16-kilobyte buffers (187.5 MB)
-
4,000 64-kilobyte buffers (250 MB)
Manual (Multi-value) Buffer Allocation
You can specify the amount of memory to allocate for each routine buffer pool. If you do, you must specify all six values; if fewer than six are given, InterSystems IRIS reverts to the automatic format described above, using the first value provided. The six values represent the following:
-
n1 is the number of MB allocated for 2-kilobyte routine buffers.
-
n2 is the number of MB allocated for 4-kilobyte routine buffers.
-
n3 is the number of MB allocated for 8-kilobyte routine buffers.
-
n4 is the number of MB allocated for 16-kilobyte routine buffers.
-
n5 is the number of MB allocated for 32-kilobyte routine buffers.
-
n6 is the number of MB allocated for 64-kilobyte routine buffers. The instance always allocates at least 430 64 KB routine buffers, regardless of the value of n6.
For example, if you specify routines=0,128,128,0,0,800, InterSystems IRIS creates:
-
128 MB of 4-kilobyte buffers
-
128 MB of 8-kilobyte buffers
-
800 MB of 64-kilobyte buffers
While it is possible to allocate 0 buffers of a particular size (except for 64 KB), the next minimum value is 430; if a smaller number is specified, the instance allocates 430. The combined maximum number of buffers is 33,554,432. The format for InterSystems IRIS routines does not allow more than 32,768 characters for literal strings regardless of the setting for the maximum routine size.
Changing This Parameter
For more information about allocating memory to the routine cache, including using the Management Portal to do so, see Allocating Memory to the Database and Routine Caches.
You can also change routines using the Config.configOpens in a new tab class or by editing the CPF.