n is an integer in the range 2048—1,073,741,760 (KB). The default is 37,568.
gmheap is the size in kilobytes of the generic memory heap (also known as the shared memory heap or SMH) 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 Generic (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.
The default size of gmheap is 37568 kb (53952 kb for IBM AIX®). (Note that in some cases, the actual maximum amount of shared memory available for allocation may be more than what is specified by gmheap. For example, more than the amount specified may be allocated to compensate for the needs of multiple CPUs.)
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 generic memory heap size; see Restore Journal Files in the “Journaling” chapter in Data Integrity Guide) for more information.
When parallel SQL query execution is in use
Parallel query execution uses additional shared memory from the generic 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.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 the gmheap setting, you must restart InterSystems IRIS to apply the change.