Why do thread start and stop times not match the elapsed time for DISTSERV threads within Sysview for Db2
search cancel

Why do thread start and stop times not match the elapsed time for DISTSERV threads within Sysview for Db2

book

Article ID: 12429

calendar_today

Updated On:

Products

SYSVIEW Performance Management Option for DB2 for z/OS

Issue/Introduction

Why do thread start and stop times not match the elapsed time for DISTSERV threads within
Sysview Performance Management Option for Db2 for z/OS (IDB2)?

Cause

Db2 ZPARMS have been set to enable account rollup for distributed (DISTSERV) threads.

Resolution

The content of thread start and thread end times is different for non-ROLLUP and ROLLUP threads.
For example, for ROLLUP threads Db2 stored the total elapsed time value for all threads rolled into the record in
the end time field (QWACESC). Sysview for Db2 moves that value to the THD-ELAPSED field.

Here is how the information is recorded for ROLLUP versus non-ROLLUP records:

1. Normal threads: 

THD-START = QWACBSC ? time the thread started 

THD-END = QWACESC ? time the thread ended 

THD-ELAPSED = QWACESC – QWACBSC ? our internal calculation 

EVENT-TIME = QWHSSTCK ? time of when the IFCID record got produced 


2. DDF/RRSAF rollup threads: 

THD-START = QWACBSC ? start time of first thread that was included into ROLLUP 

THD-END = EVENT-TIME ? time of when the IFCID record got produced 

THD-ELAPSED = QWACESC ? accumulated elapsed time (for all threads included into ROLLUP) 

EVENT-TIME = QWHSSTCK ? time of when the IFCID record got produced 


3. Child summary rollup threads: 

THD-START = QWACBSC ? end time of last thread that was included into ROLLUP

THD-END = EVENT-TIME ? time of when the IFCID record got produced 

THD-ELAPSED = QWACESC ? accumulated elapsed time (for all threads included into ROLLUP) 

EVENT-TIME = QWHSSTCK ? time of when the IFCID record got produced 

 

So in the case of DISTSERV records that are also ROLLUP records, you have to accept the value for THD-ELAPSED at face value.
You will not be able to derive it by simply calculating the difference between the THD-END and THD-START fields in the record.