The MT-diagnostic Counters

Every once in a while we get asked about the MT-diagnostic counters and the D5 R20 MRPRCMFM monitor record. Here is the collected wisdom on the topic.

Before diving into SMT topics it is suggested the reader review our SMT vocabulary article and our SMT utilization article.

The MT-diagnostic counters are described in the book The Load-Program-Parameter and CPU-Measurement Facilities, p. 2-11. In that counter set there are a couple of interesting counters. Ref: Figure 2-9:

  • C448, cycle count with one thread active
  • C449, cycle count with two threads active

These counters are per-core, but D5 R20 is a per-processor record, so for two processors that inhabit the same core you will see the same counter values.

In D5 R20, the counters start at the buffer located by PRCMFM_MTCSOFF and PRCMFM_MTCSLEN. Counter C448 is the first counter in the buffer. The counters are eight bytes wide.

Usually the questioner wants to calculate thread density or something akin to it. But D0 R2 MRSYTPRP already reports thread density, in fields SYTPRP_CAL_AVGTDBYCORE, which is per-core, and SYTPRP_CAL_AVGTDBYTYPE, which is per-core-type.

Our SMTMET tool displays a number of SMT metrics from D0 R2, among them thread density. See the columns labelled "Average Thread Den". There is a per-core column and there is also a per-core-type column.

Performance Toolkit with the PTF for APAR VM66215 displays a number of SMT metrics from D0 R2, among them thread density. Per-core, look in the FCX332 MTCORELG report. Per-core-type, look in the FCX331 MTCTYPLG report. For documentation, visit our library.

Our CPUMF tool displays a number of metrics calculated from the CPU-Measurement Facility counters. All the metrics are documented on the linked page.