2 % @brief Maximum response time
using Extreme Value Distribution approximation
4 % @author LINE Development Team
8 % @brief Maximum response time
using Extreme Value Distribution approximation
11 % Approximates the expected value of the maximum response time
for K
12 % parallel servers
using the Extreme Value Distribution (EVD).
14 % R_K^max(rho) = R(rho) + (sqrt(6)*ln(K)/pi) * sigma_R(rho)
16 % where R(rho)
is the mean response time and sigma_R(rho)
is the standard
17 % deviation of response time.
19 % This approximation
is based on fitting the response time distribution
20 % to a Gumbel (Type I extreme value) distribution with:
21 % - Location parameter: a = R - gamma*b
22 % - Scale parameter: b = sqrt(6)*sigma_R/pi
24 % where gamma ≈ 0.5772
is the Euler-Mascheroni constant.
26 % Note: Thomasian et al. [2007] found that dividing the correction term
27 % by 1.27 improves accuracy.
31 % Rmax = fj_rmax_evd(K, R, sigma_R)
32 % Rmax = fj_rmax_evd(K, R, sigma_R, calibrated)
37 % <tr><th>Name<th>Description
38 % <tr><td>K<td>Number of parallel servers (positive integer)
39 % <tr><td>R<td>Mean response time
40 % <tr><td>sigma_R<td>Standard deviation of response time
41 % <tr><td>calibrated<td>Optional: use calibrated formula (
default: false)
46 % <tr><th>Name<th>Description
47 % <tr><td>Rmax<td>Approximate maximum response time R_K^max
51 % A. Thomasian,
"Analysis of Fork/Join and Related Queueing Systems",
52 % ACM Computing Surveys, Vol. 47, No. 2, Article 17, July 2014.
53 % Eq. (43) on page 17:21.
55function Rmax = fj_rmax_evd(K, R, sigma_R, calibrated)
62 line_error(mfilename,
'K must be a positive integer. Got K=%d.', K);
66 line_error(mfilename,
'Mean response time R must be positive.');
70 line_error(mfilename,
'Standard deviation sigma_R must be non-negative.');
73% EVD approximation: R_K^max = R + (sqrt(6)*ln(K)/pi) * sigma_R
74correction_factor = sqrt(6) * log(K) / pi;
77 % Calibrated version from Thomasian et al. [2007]
78 % Divides the correction term by 1.27
for improved accuracy
79 correction_factor = correction_factor / 1.27;
82Rmax = R + correction_factor * sigma_R;