Set the size of the shared memory heap.
gmheap is the size in kilobytes of the shared memory heap (formerly known as the generic memory heap) for InterSystems IRIS® data platform. Shared memory is allocated from this total as needed for particular purposes (such as global mapping, database name and directory information, the security system, and so on). The shared memory in use by a given subsystem at a given time may be less than what is currently allocated.
Shared memory allocation is shown on the Shared Memory Heap Usage page (System Operation > System Usage, then click the Shared Memory Heap Usage button); see Shared Memory Heap Usage in the “Monitoring InterSystems IRIS Using the Management Portal” chapter in Monitoring Guide for more information. Although this page displays memory allocation and use in bytes, bear in mind that shared memory is allocated in pages.
By default gmheap is set to 0. This allows the system to select a reasonable value based on the overall system size. If 0 is selected, the system will configure the size of gmheap to be 3% of the total memory configured for global buffers. The minimum gmheap will be configured to is 307,200 KB (300 MB) and the maximum is 2,097,000 KB (2 GB), however you can still manually configure a larger or smaller amount of memory.
Under some circumstances it may be necessary to increase gmheap to make enough shared memory available, for example in the following situations:
Restoring journal files
To ensure optimal performance during a journal restore, InterSystems recommends that you increase the shared memory heap size; see System Requirements for Parallel Dejournaling for more information.
When parallel SQL query execution is in use
Parallel query execution uses additional shared memory from the shared memory heap, and an increase in gmheap may therefore be required to optimize parallel query performance. See Shared Memory Considerations in the “Optimizing Query Performance” chapter in SQL Optimization Guide for more information.
The locksiz setting configures the portion of total available shared memory that can be specifically allocated for managing locks (the lock table). locksiz is a subset of gmheap, and the remainder of gmheap is what is available for all other subsystems, so it is important that gmheap and locksiz be sized in consideration of this relationship, and that when locksiz is increased, gmheap is also increased proportionally.
Changing This Parameter
On the Advanced Memory page of the Management Portal (System Administration > Configuration > Additional Settings > Advanced Memory), in the gmheap row, select Edit. Enter a number of kilobytes.
Instead of using the Management Portal, you can change gmheap 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 the gmheap setting, you must restart InterSystems IRIS to apply the change.