Calculating peak percentile
Peak Percentile is a statistical estimate (based on the Normal Distribution) that provides an upper limit value of when nn% of tasks completed processing. For example 90% of transactions had a response time of 1 second or less. Peak Percentile allows you to measure whether workload targets are being met.
The following query calculates the 90% peak percentile of response
time. The CASE statement shows the function required to calculate
peak percentile.
SELECT TRAN,
INT(SUM(TASKCNT)) AS TASK_COUNT,
DEC(SUM(RESPONSE_TIME),8,6) AS RESPONSE_TIME_TOT,
DEC(SUM(RESPONSE_TIME)/SUM(TASKCNT),8,6) AS RESPONSE_TIME_AVE,
CASE WHEN (SUM(TASKCNT) > 1) THEN
DEC((1.282*SQRT(((SUM(TASKCNT)*SUM(RESPONSE_TIME_SSQ))
-POWER(SUM(RESPONSE_TIME),2))
/(SUM(TASKCNT)*(SUM(TASKCNT)-1))))
+SUM(RESPONSE_TIME)/SUM(TASKCNT),10,8)
ELSE DEC(SUM(RESPONSE_TIME)/SUM(TASKCNT),10,8)
END AS "RESPONSE_PEAK_90%"
FROM CICSPA.CICSP1H
GROUP BY TRAN
ORDER BY TRAN
This query produces output like the following:
Figure 1. SQL query calculating 90% peak percentile
of response time
RESPONSE RESPONSE RESPONSE
TASK TIME TIME PEAK
TRAN COUNT TOT AVE 90%
---- ----------- ----------- ----------- -------------
ABAL 3 0.002592 0.000864 0.00095340
APOS 4 0.003392 0.000848 0.00094987
ASUM 4 0.003488 0.000872 0.00092082
AUTS 1 0.000752 0.000752 0.00075200
BALA 4 0.004016 0.001004 0.00163763
BDEP 1 0.000704 0.000704 0.00070400
CATA 2 0.006336 0.003168 0.00316800
CSMI 11 0.009120 0.000829 0.00138661
EORE 3 0.004272 0.001424 0.00215297
ERLE 2 0.002336 0.001168 0.00148709
MBOX 1 0.000816 0.000816 0.00081600
NEWS 2 0.001952 0.000976 0.00138211
Peak Percentiles are calculated using the formula:
Factor*Standard Deviation+Average
In
the example, the Factor for 90% is 1.282. The following table shows
the Factors for each 5 percentile above 50% (the average): 0.126 55%
0.253 60%
0.385 65%
0.524 70%
0.674 75%
0.842 80%
1.036 85%
1.282 90%
1.645 95%