Skip to main content
Previous sectionNext section

memlock

Specify locking shared memory or the text segment into memory.

Synopsis

[config]    memlock=n

n is a set of bit flags. By default, the n is 0 (all flags are set to false).

Description

memlock is a set of bit flags that controls how InterSystems IRIS® data platform allocates shared memory. At startup, InterSystems IRIS allows a shared memory segment for use by control structures, global buffers, routine buffers, and generic memory heap. The memlock parameter offers detailed control over how that allocation occurs.

By default (n = 0), InterSystems IRIS attempts to allocated shared memory from large pages on platforms that support large pages (Windows, Linux, and AIX) as follows:

  1. Request large pages, if allowed. Large pages are automatically locked in physical memory at the operating system level.

  2. If unable to allocate the full amount of configured memory in large pages, request standard (small) pages. InterSystems IRIS does not attempt to lock standard pages into physical memory.

  3. If unable to allocate the full amount of configured memory in small pages, reduce the allocation by one eighth (1/8) and begin again with step 1.

The following bit flags modify this process as described below:

1 (LockSharedMemory)

This memlock flag indicates whether shared memory is locked in physical memory when large pages are not being used. By default, it is not. This applies to all operating systems except for Microsoft Windows and macOS.

8 (LockTextSegment)

This memlock flag indicates whether the text segment (the InterSystems IRIS executable code space) is locked in physical memory (on some UNIX platforms). By default, it is not.

32 (LargePagesDisabled)

This memlock flag indicates whether to disable large/huge pages for shared memory on platforms that support them. By default, large/huge pages are used.

When this flag is off on platforms supporting large pages, InterSystems IRIS attempts to allocate memory in large pages and switches back to standard pages if large pages cannot be allocated at the requested size. Technically, this means that InterSystems IRIS adopts a neutral disposition towards page size, taking no action to request large pages.

64 (LargePagesRequired)

This memlock flag indicates whether to require use of large/huge pages for shared memory on platforms that support them (Windows, AIX, and Linux). By default, it is not required. This flag is ignored on other platforms, or if large pages are disabled by the LargePageDisabled flag.

When LargePagesRequired is True (and not ignored), if memory cannot be allocated in large/huge pages, startup is aborted rather than falling back to small pages. InterSystems IRIS retries with a small reduction in memory size, but not as much of a reduction as could occur in absence of this flag.

128 (BackoffDisabled)

This memlock flag indicates, on failure to allocate memory, whether to retry with a reduced amount. By default, it does retry. If this flag is True and memory cannot be allocated at its configured size, startup is aborted.

Changing This Parameter

On the Advanced Memory page of the Management Portal (System Administration > Configuration > Additional Settings > Advanced Memory), choose true or false for BackoffDisabled, LargePagesDisabled, LargePagesRequired, LockSharedMemory, and LockTextSegment.

Instead of using the Management Portal, you can change memlock 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).

If you edit this setting, you must restart InterSystems IRIS to apply the change.