CICS® collects the following statistics that relate to JVMs and Java™ programs:
has information about tuning your JVMs.
The JVM pool statistics show how many requests CICS received in a given interval to run Java programs in a JVM. The statistics show how many of the requests were for worker JVMs that use the shared class cache.
CICS attempts to run a Java program in a currently unoccupied JVM that has previously run a Java program with the same JVM profile as the new request. If such a JVM is not found, then a mismatch is counted in the statistics field Number of JVM program requests - JVM mismatched. (Note that this particular statistics field includes both steals and mismatches.) So you can expect that the first request made for any given JVM profile will produce a mismatch, because no suitable JVM will be available. If the number of mismatches given in the statistics is the same as the number of JVM initializations (in the statistics field Number of JVM program requests - JVM initialised), then you do not need to be concerned about them. If the number of mismatches is significantly higher, you should examine the more detailed statistics that are available for mismatches and steals, and consider whether you need to take steps to reduce this number. Dealing with excessive mismatches and steals has more information about this.
For more information on JVM pool statistics, see the CICS statistics tables in topic JVM Pool statistics.
JVM profile statistics are collected for each JVM profile in each execution key (CICS key and user key), because the same profile can be used to create JVMs in either execution key.
When applications make a request to run a Java program in a JVM with a particular profile, CICS might take any one of the following actions:
has more information about the circumstances in which CICS takes each of these actions.
The JVM profile statistics show, among other things, how often each of these actions were taken for each JVM profile. You cannot directly control the number of JVMs with each profile that CICS keeps in the JVM pool. However, you can control the number of different JVM profiles that are used in your system. For example, if you find that several JVM profiles are used infrequently and so are often the victims of stealing, it might be possible to consolidate them into a single JVM profile, so long as their attributes do not conflict with each other. This action increases the chance that JVMs with that profile will be reused by a matching request, rather than being destroyed and re-initialized to fulfil a mismatching request. Dealing with excessive mismatches and steals has more information about this.
The JVM profile statistics can also be used to help you tune the storage heap settings for your JVMs. They include information on the high water mark for storage used in the nonsystem heap by JVMs with that profile, and on the high water mark for Language Environment® enclave heap storage used by JVMs with that profile. Java applications using a Java virtual machine (JVM): improving performance tells you how to use these statistics in tuning your JVMs. Note that the LEHEAPSTATS=YES option must be set in the JVM profile to collect Language Environment enclave statistics. If you want to use these statistics for JVM tuning, you should purge your JVMs using the CEMT SET JVMPOOL PHASEOUT command (or the equivalent EXEC CICS command), around the time of a statistics reset (either before or immediately afterwards). This ensures that the statistics collected in the next statistics interval are a more accurate reflection of the storage usage for your JVMs.
For more information on JVM profile statistics, see the CICS statistics tables in topic JVM profile statistics.
Statistics for programs that run in a JVM are collected separately from statistics for other programs, because the JVM programs are not loaded by CICS. CICS does not collect statistics for JVM programs when an EXEC CICS COLLECT STATISTICS PROGRAM or CEMT PERFORM STATISTICS PROGRAM command is issued. To see them, you need to use the EXEC CICS COLLECT STATISTICS JVMPROGRAM or CEMT PERFORM STATISTICS JVMPROGRAM command instead.
However, when you browse program names using the EXEC CICS INQUIRE PROGRAM command, JVM programs are found. An application that collects statistics for programs by browsing with the EXEC CICS INQUIRE PROGRAM command, and then issuing the EXEC CICS COLLECT STATISTICS PROGRAM command for the program names that it finds, would receive a "not found" response when it attempted to collect statistics for any JVM programs.
To avoid receiving this response, make the application check the RUNTIME value for each program name that it finds. If the RUNTIME value is JVM, the application should not issue the EXEC CICS COLLECT STATISTICS PROGRAM command for that program name. If you want to see the statistics for programs with a RUNTIME value of JVM, you can make the application issue the EXEC CICS COLLECT STATISTICS JVMPROGRAM command for those programs. Note that the statistics information that is collected for JVM programs is not the same as that collected for other programs.
Java programs that run in a JVM have their own DFH0STAT report, the JVM Programs report. The DFH0STAT report for Program Totals also includes a figure for the number of Java programs, but this figure is obtained using the JVMPROGRAM keyword.
For more information on JVM program statistics, see the CICS statistics tables in topic JVM program statistics.