1% This script provides an example use of the returnPercentiles.m function,
2% which implements the approximation method proposed in paper
3%
'Beyond the Mean in Fork-Join Queues: Efficient Approximation for
4% Response-Time Tails', which
is accepted in IFIP Performance 2015.
6% It returns the approximated values of the
RT percentiles
for a K-node FJ queue
7% according to Section 6 of the paper.
8% The
RT percentiles
for 1-node queue
is exact,
while the results
for a
9% 2-node FJ queue are based on the approximation proposed in Section 4,
11% % arrival
is a structure that must contain arrival.lambda, arrival.lambda0
12% and arrival.lambda1, where lambda
is the mean arrival rate, lambda0
is
13% the intensity-matrix
for state changes in the arrival process not
14% accompanied by arrivals and lambda1
is the intensity-matrix
for state
15% changes accompanied by arrivals.
17% % service
is a structure that must contain service.mu, service.ST,
18% service.tau_st, where mu
is the mean service rate, and tau_st and ST
19% corresponds to the PH representation (tau_st,ST)
for the service time
20% of each of the homogeneous K servers.
22% % pers are the targeted percentiles, e.g., 0.90 = 90-th, 0.95 = 95-th.
24% % K
is the number of
nodes in the FJ queue, e.g., K=16 represents a
27% % Cs: limits of the value C as introduced in Section 4.
28% The larger the C, the more accurate the results.
31% % Two methods are provided to solve the T matrix: (
default:
'NARE')
32%
'Sylves' : solves a Sylvester matrix equation at each step
33% using a Hessenberg algorithm
34%
'NARE ' : solves the Sylvester matrix equation by defining
35% a non-symmetric algebraic Riccati equation (NARE)
43% Four possibilities of arrival process are provided
44% 1=Exp; 2=HE2 (2-phase Hyper-exponential);
45% 3=ER2 (2-phase Erlang); 4 = MAP2 (2-phase MAP)
48arrival.lambda = 0.5; % mean arrival rate
49CX2 = 10; % squared coefficient of variation of the arrival process
50decay = 0.5; % decay rate of the
auto-correlation function, only applies to MAP arrivals
51[arrival.lambda0, arrival.lambda1] = get_distribution(arrival.lambda, ArrChoice, CX2, decay);
52arrival.ma = size(arrival.lambda0,2);
53arrival.Ia = eye(arrival.ma);
56% Three possibilities of arrival process are provided
57service.SerChoice = 1; % 1: Exp; 2: HE2; 3: ER2;
59service.mu = 1; % mean service rate
60service_CX2 = 10; % squared coefficient of variation of the services
61[service.ST, service.St, service.tau_st] = get_serviceDis(service.mu, service.SerChoice, service_CX2);
63%% Targeted percentiles
64% 0.95 = 95-th percentile of the response times
65pers = [ 0.90, 0.95, 0.99 ];
68K = [10, 512, 1024]; % the targeted K-node queues
69Cs = 100; % the limit of the difference
70T_Mode =
'NARE'; % the method to compute T
73percentileRT = mainFJ(arrival, service, pers, K, Cs, T_Mode);
75 disp([
'K: ', int2str(K(k))]);
76 for j = 1:length(percentileRT{k}.percentiles)
77 disp([
'RT(', num2str(percentileRT{k}.percentiles(j)),
'): ', num2str(percentileRT{k}.RTp(j))]);