Why do thread start and stop times not match the elapsed time for DISTSERV threads?

Document ID : KB000012429
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

Why do thread start and stop times not match the elapsed time for DISTSERV threads?

Environment:
DB2 Zparms have been set to enable account rollup for distributed (DISTSERV) threads.
Answer:

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). CA Sysview for DB2 then 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.