Enable/disable locking shared memory or the text segment into memory.
At startup, Caché allows a shared memory segment to use for control structure, global buffers, routine buffers, and generic memory heap. the memlock parameter offers detailed control over how that allocation occurs.
This flag controls how Caché allocates shares memory. This parameter is a set of bit flags that control the shared memory setting.
When the value of this parameter is set to 0 (the default), Caché attempts to allocated shared memory from large pages on platforms that support large pages (Windows, Linux, and AIX). If large pages are not available, or are insufficient for the configured shared memory size, then shared memory is allocated in standard (small) pages. If memory can still not be allocated, startup repeatedly tries with standard pages, reducing the global buffer, routine buffers, and generic memory heap (sometimes referred to as shared memory heap), until it succeeds. When shared memory is allocated in standard pages, no attempt is made to lock those pages into physical memory. Large pages are automatically locked in physical memory at the operating system level.
The following bit flags modify behavior as described below:
7 (LockedSharedMemory) indicates shared memory to be locked in physical memory. (Applies to all operating systems, except for Microsoft Windows, Solaris, or macOS.) Bits 1, 2, and 4 are always set together by convention, but they are interchangeable.
For legacy reasons, this flag interacts with the use of large/huge pages in the following ways:
On Windows or AIX when this flag is on, it disables the use of large pages. This is true unless bit 64 (LargePagesRequired) is also turned on, which overrides it.
On Linux, when this flag is on and huge pages are set up at the operating system level, Caché will abort startup if the configured amount of memory cannot be allocated in huge pages.
It is NOT recommended to use this flag for those legacy purposes. Use this flag only when the intention is to get small pages locked in memory. When using large/huge pages, there is no need to use this flag because large/huge pages are automatically locked in physical memory. To control whether large/huge pages are disabled or required, use bits 32 (LargePagesDisabled) or 64 (LargePagesRequired)
8 (LockTextSegment) indicates the text segment (executable image) to be locked in physical memory (on some UNIX platforms.)
32 (LargePagesDisabled) indicates on platforms supporting large/huge pages, disable use of them for shared memory. Technically, this means that Caché adopts a neutral disposition towards page size, taking no action to request large pages. When this flag is off on platforms supporting large pages, Caché attempts to allocate memory in large pages and will back to standard pages if large pages cannot be allocated at the requested size..
64 (LargePagesRequired) indicates on platforms supporting large/huge pages (Windows, AIX, and Linux), require use of them for shared memory. 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. Caché 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) indicates on failure to allocate memory, do not retry with a reduced amount. If memory cannot be allocated at its configured size, startup is aborted.
© 1997-2019 InterSystems Corporation, Cambridge, MA