n is a set of bit flags. By default, the n is 0 (all flags are set to false).
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 shared 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:
Request large pages, if allowed. Large pages are automatically locked in physical memory at the operating system level.
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.
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:
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.
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.
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.
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.configOpens in a new tab 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.