How to Reduce Mainframe Application Tuner (MAT) High CPU Usage and Monitor Size By DB2 Monitors?
Mainframe Application Tuner (MAT) takes samples of a task or job being monitored, and these samples are used when the monitor is Analyzed.
How many samples, and the information they contain, is largely determined by the Monitor Definition and by the values of various parameters in TUNSSP00.
When too many samples are taken, or the samples contain too much information, then the Analyze of the monitor can use a higher percentage of CPU cycles, and longer clock time, during the processing of the samples.
First, check the size of your DB2 monitor dataset. If it is "larger than normal", and this can mean greater than 100 megabytes or more, than there is a good chance that by following the recommendations below you will substantially cut down the size of the DB2 monitor.
Make sure that TUNSSPOO parameter DB2EXPL=NO:
DB2EXPL requests that information regarding DB2 access path selection be obtained from DB2 SQL statements by issuing the EXPLAIN command and externalizing the data. The call for Explain data is made while the address space is being measured. Specifying DB2EXPL=YES indicates that Explain data will be collected for each dynamic SQL statement and all SQL statements in a DBRM or package. DB2EXPL=NO indicates no DB2 Explain data is to be gathered. BATCH indicates DB2 Explain data is collected only for batch jobs and not for online systems, such as CICS. Explain will be performed for all static SQL found in the DBRM or package, as bound into the DB2 catalog. When DB2CTSQL=NO (do not access the DB2 catalog for SQL) is specified, the statement that is explained is derived from internal DB2 objects. Dynamic SQL is always explained from SQL derived from internal DB2 objects. The default is DB2EXPL=NO.
Recreate the DB2 monitor. If it is still not significantly reduced in size, with the Analyze taking much less CPU cycles and finishing markedly faster, then this might be caused by a bug.