Tra C Concept, Measurements, Statistics: Lecturer: Dmitri A. Moltchanov E-Mail: Moltchan@cs - Tut.fi
Tra C Concept, Measurements, Statistics: Lecturer: Dmitri A. Moltchanov E-Mail: Moltchan@cs - Tut.fi
http://www.cs.tut.fi/˜moltchan/modsim/
http://www.cs.tut.fi/kurssit/TLT-2706/
Traffic modeling D.Moltchanov, TUT, 2005
OUTLINE:
• Traffic concept;
• Traffic measurements;
• Step-by-step traffic modeling procedure;
• Points of interest in traffic modeling;
• Observations from Internet traffic measurements;
• What statistics to capture;
• Estimation of the statistics;
• Choosing a candidate model;
• Fitting parameters of the model;
• Testing for accuracy of approximation;
• Example of the traffic modeling procedure.
• where n(t) denotes the number of occupied resources (servers) at the time t.
Definition: carried traffic AC is the traffic carried by the group of servers during interval T .
The total traffic carried in a period of time T is called a traffic volume (Erlang-hours).
A = λ × s. (2)
Lost (rejected, blocked) traffic: difference between offered traffic and carried traffic:
AL = A − AC . (3)
• the value of lost traffic is reduced by increasing the capacity of the system;
• when the capacity of the system tends to infinity AC → A.
A = 10 · 2 = 20(Erlangs). (4)
Figure 2: Average number of voice calls: 10 workdays averages, taken from V.B. Iversen.
Figure 3: Average service times for voice calls: taken from V.B. Iversen.
Deterministic nature: traffic patterns looks very similar for a different days:
• traffic patterns are similar during week-days;
• traffic patterns are similar during week-end days;
• traffic patterns are different during week-days and week-end days.
Natural question:
• when the peak number of calls occurs?
• is this peak the same for each day?
Figure 4: Average number of modem calls: single day, taken from V.B. Iversen, year 1999.
Figure 5: Average service times for modem calls: taken from V.B. Iversen.
0 4 8 12 16 20 24 time
calls/minute
0 4 8 12 16 20 24 time
to domestic concentrator
Exchange
customers
...
...
...
to international concentrator
Then the service time for a customer (so-called transmission time) is:
s
. (5)
φ
4. Traffic measurements
To provide quantitative analysis of telecommunication system we have to:
• provide adequate traffic model:
– determine important statistical parameters of input traffic:
∗ measure traffic patterns;
∗ compute statistical parameters of the patterns.
– match these parameters using appropriate traffic model.
• provide model of the service process;
• carry out analysis of the system under different conditions.
Any traffic measurement is characterized by the following three parameters:
• period of measurement;
• type of measurement;
• parameters under consideration.
time
points of measutements
1 1 2 1 2 1 1
time
18
Congestion window, MSSs
16
TCP Reno
4 TCP Tahoe
1
time
Figure 10: TCP traffic pattern: TCP Reno and TCP Tahoe.
voip voip
voip video
voip ftp
voip voip
access router
backbone router
access router
access router
fi,E(D) KY(i)
0.11 1
0.8
0.083
0.6
0.055
0.4
0.028
0.2
0 0
0 5 10 15 20 25 30 35 0 2 4 6 8 10
iD i, lag
(a) Empirical distribution (b) NACF
fX(x)
exponential, hyperexponential
normal
Pareto
fX(x)
variance
mean x
fX(x)
sk < 0 sk = 0 sk > 0
fX(x)
kurt 2
kurt 1
fX(x)
fX(x)
Figure 19: Fitting mean and variance results in a number of forms of a distribution.
• different skewness;
• different length on fX (x) axis.
fX(x)
Figure 20: Fitting mean, variance and skewness limits a number of forms of a distribution.
fX(x)
Figure 21: Fitting mean, variance, skewness and kurtosis may result in a desired distribution.
• if we fit kurtosis we are sure that the length on fX (x) axis is the same;
• 4 moments are fairly enough to get good fitting.
K(i)
short-range dependence
long-range dependence
K(i)
single exponential/geometric component
K(i)
k
mixture of exponential terms K (i ) = å j j l j i
j =1
Figure 24: Power decay can be approximated by sum of exponentials (to the some extent).
Y(i) Y(i)
15 15
10
10
5
5
0
5 0
0 25 50 75 100 0 25 50 75 100
KY(i) i, time KY(i) i, time
1 1
1 2
0 25 50 75 100 0 25 50 75 100
i, lag i, lag
Y(i) Y(i)
4 20
2 10
0 0
2 10
0 25 50 75 100 0 25 50 75 100
i, time i, time
KY(i) KY(i)
1 1
0.5 0.5
0 0
0.5 0.5
0 25 50 75 100 0 25 50 75 100
i, lag i, lag
9.8. Receipts
You may use the following when you are to capture:
• first two moments:
– Erlang, hyperexponential, exponential distributions;
– approximation by discrete distribution: p1 , p2 , . . . , pk such that i pi = 1.
• first m moments:
– special case of phase-type distribution;
– approximation by discrete distribution.
• first two moments and lag-1 of ACF:
– Markov modulated processes;
– autoregressive processes.
• first two moments and ACF:
– Markov modulated processes;
– autoregressive processes.
1
N
2
σ [X] = (Xi − m)2 . (8)
N − 1 i=1
– we may not care about 1/(N − 1) and just use 1/N when N is sufficiently large.
Examples:
• analytically tractable: renewal models, Markovian models;
• analytically intractable: most non-Markovian models.
d x
Conclusion:
• shifted exponential does not satisfy implicit requirement X ∈ [0, ∞)
• we choose Erlang distribution;
arrivals
Figure 33: Illustration of the 2D Cantor set and 1D Cantor set as ON/OFF traffic.
arrivals
Figure 34: Weighted Cantor set with weights 2/3 and 1/3 (we preserve the whole weight).
Figure 35: Coast of England is an example of fractals: length scales with a timescale.
40
20
0
0
20
40 50
0 2 4 6 8 10 0 2 4 6 8 10
t, time t, time
{X(n),n = 0,1,..}
t
{X(5)(n),n = 5,10,..}
t
{X(10)(n),n = 10,20,..}
Note: X (m) (n) is the sample mean of the sequence (Xnm−m+1 + · · · + Xnm ).
(m) σ2
γ (k) = lim [(k + 1)2H − 2k 2H + (k − 1)2H ], k = 1, 2, . . . . (12)
m→∞ 2
Process {Y (t), t ∈
} is self-similar with certain 0 < H < 1 if:
• it means: {Y (t), t ∈
} and {Y (at), t ∈
} normalized by a−H have the same distribution;
• we usually interpret {Y (t), t ∈
} as cumulative arrival function.
What is important:
• {Y (t), t ∈
} cannot be stationary du to normalization factor a−H !
• its increment process can be (does not mean it must) covariance stationary.
When α < 1, previous implies that the ACF decays so slowly that it is not summable:
∞
r(k) → ∞. (19)
k=−∞
KX(i) KX(i)
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0.2 0.2
0 20 40 60 80 100 0 20 40 60 80 100
empirical ACF i, time empirical ACF i, time
error: +2/sqrt(n) error: +2/sqrt(n)
error: -2/sqrt(n) error: -2/sqrt(n)
12.4. Values of H
We have the following possibilities:
• H = 0.5: process is completely uncorrelated, ∞
k=−∞ r(k) is finite;
∞
• 0 < H < 0.5: k=−∞ r(k) = 0 that is rarely observed in applications;
• H = 1 leads to r(k) = 1, k = 1, 2, . . . there is linear dependence in the series;
• H > 1: prohibited due to stationarity exposed on {X(t), t = 0, 1, . . . }.
fY(y) fY(y)
0.04 0.04
0.03 0.03
0.02 0.02
0.01 0.01
0 0
50 8.33 33.33 75 116.67 158.33 200 50 8.33 33.33 75 116.67 158.33 200
Normal distribution y Weibull distribution
Exponential distribution y
Practice:
• file sizes distribution has heavy-tail;
• generator: web site with downloading capabilities.
• where H = 1 − β/2.
You have to do the following:
• determine several m (it is better to use m = 1, 10, 100, 1000, . . . );
• compute log10 σ 2 [X (m) /m] and log10 m for each m;
• ignore small values of m;
• fit a least squares fit line through a rest of resulting points in the plane;
• estimate the Hurst parameters as:
β
H =1− (33)
2
– where β is the value of estimated asymptotic slope.
KX(i)
log10(s2[X(m)/m])
0
0.8
1
0.6
2
0.4
3
0.2
4
0
5 0.2
0 1 2 3 4 5 0 20 40 60 80 100
log10(m) empirical ACF i, time
error: +2/sqrt(n)
error: -2/sqrt(n)
Figure 42: Example of variance-time plot and ACF of self-similar process (H ≈ 0.82).
log10(s2[X(m)/m]) KX(i)
4
0.8
2.4
0.6
0.8
0.4
0.8
0.2
2.4
0
4 0.2
0 1 2 3 4 5 0 20 40 60 80 100
log10(m) empirical ACF i, time
error: +2/sqrt(n)
error: -2/sqrt(n)
Figure 43: Example of variance-time plot and ACF of a process without self-similarity (H ≈ 0.48).
How to compute R/S statistics: for each value d = 10, 20, 30, . . . do:
• compute K points of R/S statistics R(ti , d)/S(ti , d);
• starting points must satisfy (ti − 1) + d ≤ N ;
• estimate H as the slope of log-log graph of R/S statistics.
log(R/S)
logd
Figure 45: Estimating Hurst parameter using R/S statistics (H ≈ 0.9).
12.10. Caution!
Note the following:
• self-similar processes:
– cumulative process {Y (t), t = 0, 1, . . . } may not be stationary;
– increment process {X(t), t = 0, 1, . . . }, Xt = Yt+1 − Y (y) must be stationary;
– note: increment process is just fist difference process.
• some traffic seems to be non-stationary at all:
– deterministic variations: hourly, daily (recall PSTN traffic)!
Stationarity of the process:
• in real traffic depends of the timescale at which traffic is measured;
• recent hypothesis:
– short timescales: stationary behavior;
– long timescales: non-stationary behavior.
Another problem: distinguishing between self-similarity and non-stationarity.
0.8
1.8
0.6
0.6
0.4
0.6
0.2
1.8
0
3 0.2
0 1 2 3 4 5 0 20 40 60 80 100
log10(m) empirical ACF i, time
error: +2/sqrt(n)
error: -2/sqrt(n)
Figure 47: NACF and variance-time plot for non-stationary trace (H ≈ 0.76!!!).
General procedure:
• determine parameters of the model:
– these parameters must completely characterize a model;
– not only parameters you are going to capture.
• derive equation relating measuring statistics and parameters:
– note that some parameters can be free.
Tests:
• compare distribution and empirical data:
– χ2 test;
– Smirnov’s test.
• compare autocorrelations:
– just visually comparing;
– Q-Q graph.
15. Example
What we have to do:
• propose a model of the aggregated traffic;
• capture histogram and ACF as close as possible;
• model should be further used in simulation study.
network side
1
...
24 24
18 18
12 12
6 6
0 0
0 500 1000 1500 2000 0 500 1000 1500 2000
i i
(a) Experiment 1 (b) Experiment 2
fi,E(D) fi,E(D)
0.11 0.11
0.083 0.083
0.055 0.055
0.028 0.028
0 0
0 5 10 15 20 25 30 35 0 5 10 15 20 25 30 35
iD iD
(a) Experiment 1 (b) Experiment 2
KY(i) KY(i)
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 2 4 6 8 10 0 2 4 6 8 10
i, lag i, lag
(a) Experiment 1 (b) Experiment 2
Y (n) = φ0 + φ1 Y (n − 1) +
(n), n = 1, 2, . . . , (35)
φ0 , φ1 , σ 2 [
]. (36)
• φ0 , φ1 and σ 2 [
] are related to statistics of observations as:
φ1 = KX (1), φ0 = µX (1 − φ1 ), σ 2 [
] = σ 2 [X](1 − φ21 ), (39)
– KX (1), µX and σ 2 [X] are the lag-1 value of ACF, mean and variance of observations.
Test NACFs:
• you may carry out visual test by plotting NACFs of both samples;
• you may test for significant correlation using Box-Ljiung statistics.