The onstat -g mgm option prints Memory Grant Manager (MGM) resource information. You can use the onstat -g mgm option to monitor how MGM coordinates memory use and scan threads. This onstat option reads shared-memory structures and provides statistics that are accurate at the instant that the command executes.
The onstat -g mgm output displays a unit of memory called a quantum. The memory quantum represents a unit of memory, as follows:
memory quantum = DS_TOTAL_MEMORY / DS_MAX_QUERIES
The following calculation shows the memory quantum for the values that Figure 68 displays:
memory quantum = 4000 kilobytes / 31 = 129 kilobytes
The scan thread quantum is always equal to 1.
IBM Informix Dynamic Server Version 10.00.UC1 -- On-Line -- Up 00:00:51 -- 21504 Kbytes Memory Grant Manager (MGM) -------------------------- MAX_PDQPRIORITY: 100 DS_MAX_QUERIES: 31 DS_MAX_SCANS: 1048576 DS_NONPDQ_QUERY_MEM: 128 KB DS_TOTAL_MEMORY: 4000 KB Queries: Active Ready Maximum 0 0 31 Memory: Total Free Quantum (KB) 4000 4000 128 Scans: Total Free Quantum 1048576 1048576 1 Load Control: (Memory) (Scans) (Priority) (Max Queries) (Reinit) Gate 1 Gate 2 Gate 3 Gate 4 Gate 5 (Queue Length) 0 0 0 0 0 Active Queries: None Ready Queries: None Free Resource Average # Minimum # -------------- --------------- --------- Memory 0.0 +- 0.0 500 Scans 0.0 +- 0.0 1048576 Queries Average # Maximum # Total # -------------- --------------- --------- ------- Active 0.0 +- 0.0 0 0 Ready 0.0 +- 0.0 0 0 Resource/Lock Cycle Prevention count: 0
The first portion of the output shows the values of the PDQ configuration parameters.
The second portion of the output describes MGM internal control information. It includes four groups of information. The first group is Queries:
The next group is Memory:
The next group is Scans:
The last group in this portion of the output describes MGM Load Control:
The next portion of the output, Active Queries, describes the MGM active and ready queues. This portion of the output shows the number of queries waiting at each gate:
The next portion of the output, Free Resource, provides statistics for MGM free resources. The numbers in this portion and in the final portion reflect statistics since system initialization or the last onmode -Q, -M, or -S command. This portion of the output contains the following information:
The last portion of the output, Queries, provides statistics concerning MGM queries: