Skip to main content

routines

Allocate shared memory for caching routine buffers.

Synopsis

[config]    routines=n                       ; This is the format for single-value allocation.
[config]    routines=n1, n2, n3, n4, n5, n6  ; This is the format for multi-value allocation.

The default for this parameter is routines=0. This resolves to 80 MB, the minimum for single-value allocation.

Description

routines specifies the amount of memory to allocate for caching routine buffers. The total memory is shared between six pools of different block sizes (such as “the 16K buffer pool”).

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. InterSystems IRIS always allocates a minimum of 80 MB; if a smaller number is specified, the instance adjusts up to 80 MB.

InterSystems IRIS divides the memory among the buffer pools as follows:

  • 12.5% in 4 KB buffers

  • 37.5% in 16 KB buffers

  • 50% in 64 KB buffers

For example, if you specify routines=500, InterSystems IRIS creates:

  • 16,000 4 KB buffers (62.5 MB)

  • 12,000 16 KB buffers (187.5 MB)

  • 4,000 64 KB 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 n1 as the value for n. The six values represent the following:

  • n1 is the number of MB allocated for 2 KB routine buffers.

  • n2 is the number of MB allocated for 4 KB routine buffers.

  • n3 is the number of MB allocated for 8 KB routine buffers.

  • n4 is the number of MB allocated for 16 KB routine buffers.

  • n5 is the number of MB allocated for 32 KB routine buffers.

  • n6 is the number of MB allocated for 64 KB 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,0,128,0,800, InterSystems IRIS creates:

  • 128 MB of 4 KB buffers

  • 128 MB of 16 KB buffers

  • 800 MB of 64 KB buffers

It is possible to have 0 buffers of a certain kind (except for 64 KB), but 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

On the Memory and Startup page of the Management Portal (System Administration > Configuration > System Configuration > Memory and Startup), select the option to Configure Memory Settings Manually. In the Memory Allocated for Routine Cache (MB) field, enter a number of megabytes.

Instead of using the Management Portal, you can change routines in the Config.config class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).

See Also

Feedback