Traffic Modeling Nelson L. S. da Fonseca Institute of Computing State University of Campinas...

172
Traffic Modeling Nelson L. S. da Fonseca Institute of Computing State University of Campinas Campinas, Brazil

Transcript of Traffic Modeling Nelson L. S. da Fonseca Institute of Computing State University of Campinas...

Traffic Modeling

Nelson L. S. da FonsecaInstitute of Computing

State University of CampinasCampinas, Brazil

Network Workload: “Traffic”

• Telecom networks built to transport traffic

• Flow of bytes or packets or messages

REDE

Multimedia Networks

Quality of Services

• “Perception of the quality of the transfer of information expressed by quantitative metrics”

Aplicações

Aplicações

AplicaçõesAplicações

QoS

QoS

QoSQoS

REDE

Quality of Service

1393 bytes (9) 793 bytes (6) 447 bytes (3) 227 bytes (1)

33011 bytes (33)

25239 bytes (30)

17179 bytes (27)

9265 bytes (24)

7042 bytes (21) 4819 bytes (18) 2617 bytes (15) 2006 bytes (12)

1393 bytes (9) 793 bytes (6) 447 bytes (3) 227 bytes (1)

Why Traffic Models Matter?Queuing in Multimedia

Networks

Telephone

Computer

Computer

Why is Traffic Modeling Important?

• Need for performance evaluation and capacity planning

• Understand the nature of traffic generated by applications and their transformation along the network

• Conception of effective traffic control mechanisms: congestion control, flow control, routing …

Why is Traffic Modeling Important?

• Accurate performance prediction requires realistic traffic models

• Can use in analysis or testing (“synthetic traffic”)

• Synthetic traffic matches real traces, is more efficient to use

An Example

• Traffic: 5 synchronous streams of 299,040 cells/sec

• Buffer size B, line rate 312,500 cells/sec

• An ATM cell 53 bytes

An Example

• G/D/1/B or nD/D/1r = 0.957– E(W) = 2.7 msec– W < Wmax = 4 x 3.2 = 12.8 msec– No losses for B=4 or bigger

• If Poisson: M/D/1, already big difference– E(W) = r m / 2(1- r) = r 3.2 /2(1- r) = 35.6

msec!– Need B = 249 for cell loss 10-9!

• Conclusion: Mean is not enough; smoothness or burstiness affects a lot

Our Goal

• To understand relevance of traffic characteristics with respect to network performance and QoS

• Identify and familiarize with common traffic models

Mean and Variance

X

X

XPXEXXVAR

XEXEXVAR

XXPXE

}{])[(][

]])[[(][

}{][

2

2

Mean and Variance

Mean amount of work arrived at each slot = 4

Variance =

16.0 0.5 x 4.0 0.5 x 4.0 22

Mean and Variance

Mean amount of work arrived= 4.0Variance of the amount of work

arrived =

16.0 0.5 x 4.0 0.5 x 4.0 22

Mean and Variance

• Both processes have the same mean and variance. But what is their impact on queuing?

Mean and Variance

• Consider a queue with a server, service rate of two cells per time unit and buffer space of two cells.

2/1

Mean and Variance

When the first stream

Feeds the queue

No loss!

Service = 2/1

Mean and Variance

But when the second flow

feeds the queue

then 1/5 pkts are lost!

2/1

Correlation

Low Correlation

High Correlation

Autocovariance

-5.0 -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 5.0

Variance

v=Autocovariance Integral

LRD versus SRD

SRD

LRD

lag

autocorrelation

Origins of Correlations…

• Superposition of weakly correlated sources

• Size of files• User behavior• Protocol dynamics• etc ….

Video

• MPEG

Video

• 500x500 pixels por frame = 250.000 pixels por frame, generating 2 Mbits/frame for an 8-bit gray scale at a rate of 30 frames/sec 60 Mbits/seg. If three colors are used, the transmission rate is 180 Mbits/sec Compression

Variable Bit Rate

Video

F ram e s e q ue nc e

bit r

ate

s c e ne c hang e s1 0 0 -1 5 0 f ram e s

b it rate M b it/s

videophone

videoconference

tv scene

20

15

10

5

5 10 15 302520

probalility (1E-3)

Variable Bit Rate

SCR

BTPCR

Burstiness• Variable with time scales

Traffic Bursts and Scales

• Hierarchical view– Call– Burst– Packet

• How to characterize: Mean? Peak? Variance? Autocorrelation?

Burstiness

• Most traffic types in high-speed networks are bursty

• Burstiness is mainly due to autocorrelation

• Renewal models assume autocorrelation away for tractability

• Performance prediction non-realistic without burstiness

Taxonomy of Models

• Renewal and IID: no dependence• Short Range Dependent (SRD)

– Markov modulated, Interrupted Poisson Process etc.

– Semi Markov– MAP– Fluid: useful for analysis and also for simulation– Regression models – classical statistics

• Long range Dependent (LRD)– Monofractal (self-similar)– Multifractal

SRD Models

Voice Source

• Human voice bursts of 0.4 a 1.2 sec durations and periods of silence of 0.6 a 1.8 sec (exponentially distributed);

• Sampling at 125 mseg intervals with 8 bits coding 170 cells (53 bytes) ATM/sec

ON OFF

Superposition of Voice Sources

Superposition of Voice Sources

iNi

i i

N

021

110

...

...

i

ii

Superposition of Voice Sources

010 N

02])1([ 210 NN

0)1(])1([)1( 11 iii iNiiN

01 NN N

...

...

Superposition of Voice Sources

]...,[ 10 n

0M

............

...3α00

...2α2)λ(N2α0...1)λ(N1)λ(N[αα

...0NλNλ

M

Fluid-Flow Equations

• x – buffer occupancy;• Each voice source generates V cells/sec

during talk spurt with duration of 1/ sec;• A channel with capacity VC cells/sec has

C units of information per second;• N sources;

• Fi(t,x) – system state, at time t there are i sources in state on and the buffer occupancy is x;

Fluid-Flow Equations

)()()(

)(

)(3)(]2)2[()()1()(

)2(

)(2)(])1[()()(

)1(

)()()(

1

3212

2101

100

xFNxFdx

xdFCN

xFxFNxFNdx

xdFC

xFxFNxFNdx

xdFC

xFxFNdx

xdFC

NNN

Fluid-Flow Equations

NjeN

i

xziji

i

00

• Fj(x) = Prob. [j sources on, buffer occupancy≤x]

Markov Modulated Process

• Arrival rate depends on understanding Markov chain

1 2 n

1 2 n

Superposition of Voice Sources

1 2

1 2

Superposition of Voice Sources

Superposition of Voice Sources

Superposition of Voice Source

2-states MMPP

2221

1211

2

1

0

0__/\

qq

qq

Markov Modulated Process

• M/G/1 – type• Efficient algorithms

xP

A

AA

AAA

AAB

AB

P

....

....

....

000

00

0

0

00

2

12

012

011

00

M/M/1

....

....

....

100

10

01

001

P

Markov Modulated Process

xPx

0

0v

vvBxx

01

vvvkk Axx

0

1k

Tkex

Markov Modulated Process

singleArrivals

batchdiscrete

Timecontinuous

Markov Modulated Process

• Markov Modulated Poisson Process – MMPP (continuous time, single arrival)

• Batch Markovian arrival process – BMAP (continuous time, batch arrival)

Markov Modulated Process

• Discrete Time Batch Markovian Arrival Process – D-BMAP (discrete time, batch arrivals)

• Discrete Time Markovian Arrival Process (D-MAP)

Regression Models• Autoregressive models

• TES: Transform-Expand-Sample– Uses modulo-1 operations– Correlated numbers with

desired PDF– Marginal by inverse

transform– Numerical fitting of

correlation

• DAR(p), for example p=1:

LRD Models

LRD Models

• Monoscaling – Monofractal – self-similar

• Multiscaling - Multifractal

LRD versus SRD

SRD

LRD

lag

autocorrelation

The Hurst Parameter

Long Range Dependence

• Hyperbolic decay of autocorrelation

kHkHHkr 22)12()(

121 Hif

kkr )(

The Parameter H• The Hurst parameter, H, quanitifes the degree

of self-similarity in a time-series

• 0.5 < H < 1 : non-summable LRD

• H = 0.5 : summable SRD

• 0 < H < 0.5 : not common

0)(

kkr

kkr )(

kkr )(

Tail distribution and LRD

ceZZ

1}Pr{}Pr{

tZZ

11

1}Pr{}Pr{

Examples

Video Application

Hust Parameter Peak/Mean (GOP)

Student siting at workstation

0.53 0.18

Simpsons 0.88 0.43

Terminator 2 0.80 0.35

Mr. Bean 0.95 4.1

Impact of Long-Range Dependence

• Implications to network design and control may be crucial

• Self similar models: burstiness across time-scales• loss probability:

New Era: Self Similarity and LRD

• Observations in early nineties:– Scaling in Ethernet traffic– Persistence of video traffic– Similarly for WAN

• Traffic did not scale or become smoother as expected

• Poisson assumption questioned• Birth of “self similar” era

Scaling

• The absence of a characteristic scale in a time series.

• The whole and its parts cannot be statistically distinguished from each other

Self-Similar Traffic (Ethernet)

1 Second Intervals 10 Second Intervals 60 Second Intervals

100 Second Intervals Half Hour Intervals 1 Hour Intervals

Poisson ProcessInterval = 1

303540455055606570

0 20 40 60 80 100

Interval = 10

300350400450500550600650700

0 20 40 60 80 100

Interval = 100

300035004000450050005500600065007000

0 20 40 60 80 100

Interval = 1000

300003500040000450005000055000600006500070000

0 20 40 60 80 100

Self-Similar Process

• The sample path of a process X(t) and those of a re-scaled version cH X(t/c) by dilatting the time axis by a factor of c>0 and the amplitude axis by a factor of H cannot be statistically distinguished from each other

Self-Similarity

• By analyzing the number of packets or number of bytes, we observe an invariance of the traffic behavior in differente time-scales, from milliseconds to minutes to even hours:

Self-Similar

• Aggregate Process

im

imt

m tXm

iX1)1(

)( )(1

)(

Self-Similar

• X(t) is exactly second-order self-similar with parameter H (1/2 < H < 1)

• X(t) is asymptotically second-order self-similar if

))1(2)1((2

)( 2222

HHH kkkk

))1(2)1((2

)(lim 2222

)( HHHm

mkkkk

Self-Similar

• Self-similar with stationary increments

• The increment process satisfies

)(2

)( 2222

HHH ssttk

)(1 mHd XmX

mX m 2)( )var(

Self-Similar

• The Fractal Brownian Motion is a self similar with Gaussian stationary increments and the increment process is called Fractal Gaussian Noise

Self-Similar

• An aggregate of a large number of on-off sources with Pareto distribution produces an FBM

The Logscale Diagram

= 2H + 1

• Confidence intervals• Linear behavior

The Logscale Diagram

Wavelet Transform

• Projecting a signal onto locally oscillating waveforms

Wavelets from a length-8 Daubechies filterbank. From top to bottom: 0,0(t), 1,3(t), 3,22(t)

Scaling (dilating and compressing) and shifting

)2(2)( 2/, ktt jjkj

Wavelet Transforms

CX(j0,k) – coarse-resolution

dX(j,k) – wavelet coefficients – finer scales

0

0)(),(),()( ,,0

jj kkjX

kkjX tkjdkjCtX

Logscale Diagram

• Wavelet coefficients and variance of data related

• Logscale diagram log(Yj) x Yj

jn

kXjj kjd

nY

1

2),(

1log)log(

Multifractal

• At small time scales burstiness does not follow the same pattern at higher scales

• h(t), Hoelder exponents, highly rearying as a function of t

Multifractal• When Gaussian, local self-similar• Non-stationary increments

Multiplicative Cascades

• Initial mass is iteratively divided into parts which size is defined by

• Multipliers random variable define the weight of each part

Binomial Cascade

1

1

11

))0()1((

)2/2()2/)12((n

i

ik

dnn

XXM

kXkX

i

1112

12

n

knk MM

Multiscaling Trees

• Binomial cascades – each level of the tree corresponds to a different level of aggregation

Multifractal Brownian Motion

• Generalization of Fractal Brownian Motion

• Gaussian process• In the neighborhood of t an mBm can

be approximated by an fBmfBm

mBm

Multiscaling Diagram

• Fractal

• Multifractal

k

q

Xjq

j Rqkjdn ,),(/1)(

qH

q

qCtXE )(

)()(

q

q

qCtXE

Multiscale Diagram

• A lack of alignment in the diagram strongly suggests multifractality

Linear Multiscale Diagram

• Fractal – horizontal line21 qh qq

Is it possible to observe both mono and multi scaling in a

trace?

• Yes, but at different time scale due to aggregation

• Large scale – monoscaling• Small scale – multiscaling• Boundary between scaling patterns –

cutoff scaling

Scaling – time domain

Detecting the cut-off time scale

Congestion Window of TCP

Simple Model for the Throughput of TCP

throughput = w * MSS

RTT Bytes/sec

The Inverse-square Root Law

The Inverse-square Root Law

• At a loss of a packet which occurs with probability p the window size is reduced from W to W/2

• Number of packets transmitted between two losses – area of trapezoidal

• T – duration of inter loss period

WW

RTT

T

22

1

The Inverse-square Root Law

• Number of packet transmitted = 1/p

• Rate of increase of window size – one packet per round trip time (RTT)

• T = RTT x W/2

pW

WW 1

24

pW

3

8

The Inverse-square Root Law

• Average sending rate

2

1)(

WRTT

ppX

pRTT 2

31

A TCP Model

• Window grows 1/W at every ack reception• “round” period in which there is a back-to-

back transmission of W packets. It ends at the reception of the first ack for this w packets

• Duration of a round – one RTT• An ack is sent at every b packets received,

W/b acks received in a round => next round W’ = W +1/b

A TCP Model

• Packet loss is round independent• If a packet is lost all subsequent

packets in the round are lost• Triple duplicate (TD), timeout (TO)

and receiver window limitation

A TCP ModelTriple Duplicate

41

2

3

5

1 2 3 4 iX

2

W 1i

b b b

iTDP

i

i

Pac

ote

s en

viad

os

No de RTT

Último RTT

Ocorre 3 ACK's idênticosTD termina

LEGENDA

Pacote perdido

Pacote reconhecido

1TDP

W1W 2W

3W

1A 2A 3A

2TDP3TDP

t

i -1

A TCP Model

• B(p) – throughput as a function of the loss rate

• TDP – period between two TD losses

][

][

AE

YEB

A TCP Model

• After the first loss, i, occurs Wi – 1 packets are sent in the round. Thus Yi = +Wi – 1 packets are sent

1][][][ WEEYE

1

1 1)1(][

k

kk

pppE

A TCP Model

• X – round in which loss occurred

][1

][ WEp

pYE

RTTXEAE )1][(][

A TCP Model

b

XWW ii

i

21

][2

][ XEb

WE

A TCP Model

i

bX

k

ii bk

WY

i

1/

0

1

2

iiiii

b

XXWX 122

1

iiii W

WX

1

221

A TCP Model

][1][2

][

2

][][

1 EWEWEXE

WEp

p

2

3

2

3

)1(8

3

2][

b

b

bp

p

b

bWE

pbpWE 1

3

8][

bpWE

3

8][

A TCP Model

2

6

2

3

)1(2

6

2][

b

p

pbbXE

16

2

3

)1(2

6

2][

2b

p

pbbRTTAE

A TCP Model

p

1o

bp2

3

RTT

1pB

A TCP ModelTimeout

A TCP ModelTimeout

W

TD TO 2TO 4TO t

A TCP ModelTimeout

• Mi – number of packets sent during Si

• Si – interval including TDi and TOi periods• Zi

TO – duration of sequence of time-outs• Zi

TD – time interval between two consecutive time-out sequences

TOi

TDii ZZS

][

][

SE

MEB

A TCP ModelTimeout

• Yij – the number of packets sent in the jth TD period in the interval Zi

TD

• Aij – the duration of each TD period• Ri – number of packets sent during timeout period • ni – number of TD periods in Zi

TD

][][][1

in

jiij REYEME

in

j

TOij ZEAESE

1

][][][

A TCP ModelTimeout

][][

][][TOZEQAE

REQYEB

][)3,1min( WEwQ

pRE

1][

p

ppppppTZE TO

1

32168421][

65432

0

A TCP ModelTimeout

• Q – probability that a loss ending a TDP is a TO

• w – number of packets in a round• Number of TOs in a TO sequence –

geometric distribution• Timeout increases duration

according to 2i-1 T0 up to i =6

A TCP ModelTime Out

20 p321p

8

bp33,1minT

3

bp2RTT

1pB

A TCP ModelWindow Limitation

W

TD TO 2TO 4TO t

A TCP ModelWindow Limitation

• Window grows for U periods and stay with its maximum value during V periods

maxmaxmax )2

(2

WVWWU

Y ii

i

b

UWW i

2max

max

A TCP Model

2

0

max

3218

33 ,1min

32

1,min

ppbp

Tbp

RTTRTT

WpB

A TCP Rate Expression with General Loss Distribution

• X – sending rate• R – correlation between intervals with (multiple)

packet loss• v– multiplicative increase factor of TCP window

1

)()0(211

k

k kRvRpRTT

X

TCP + RED

tRtptRtR

tRtW

2

tW

tR

1tW

0q,tWtR

tNC,0max

0q,tWtR

tNC

tq

pTC

tqtR

Link Dimensioning with TCP

IS – TCP connections

PS - bottleneck

Envelope Processes

• Needed for admission control, link dimensioning etc

• Exact solution typically impossible• Classical queuing: approximate fit

and numerical solutions• More modern approaches:

– Effective or equivalent bandwidth– Envelope processes

Envelope Processes

Upper bounds to the amount of

traffic arrived

Envelope Process

• Deterministic EP absolute upper bound deterministic guarantees

• Probabilistic EP allows violation defined by violation probability statistical guarantees

QoS Guarantees

• Deterministic guarantees

• Statistical guarantees

1}Pr{ ddelay

}Pr{ ddelay

Deterministic Envelope Process

• If EP is increasing and sub-additive , the long term rate average rate exists (the envelope rate)

• EP is not unique - Minimum Envelope Process (MEP) – the tigthest bounding function

• subadditive

211221 )(ˆ),( ttttAttA

t

tAt

)(ˆlimˆ

))()()(( 2121 tAtAttA

Deterministic Envelope Process

Cruz’s Envelope Processes (,)

t

tA

ttA

t

),0(lim

),0(

unregulated traffic *≤

token buffer tokens/sec

tokens Example of a leaky bucket regulator

VBR Video

The EP

• Concave, piecewise linear function• n (, r) pairs• In a time interval t, the traffic is

restricted to

• Enforcement by a cascade of Leaky buckets

• T-Spec in Intserv adopts a dual leaky bucket

)ˆ,ˆ(

}{min)(ˆ1 ttA iini

The EP)ˆ,ˆ(

The D-BIND EP

• Multi rate-interval process {(Rk, Ik), k = 1,2..K} piecewise linear function

kkkkkkk

kkkk ItIIRItII

IRIRtA

1

1

1 ,)(1

)(ˆ

How many EP’s?

Queuing with EP’s

• The Lindley’s equation

})()(,0max{)1( ctatqtq

Queuing with EP’s

Queuing with EP’s

Queuing with EP’s

Convolutionmin-plus Calculus

• Replaces integral with infimum operation and the multiplication with summation

)}()({inf

tBABAR

Convolutionmin-plus Calculus

Convolutionmin-plus Calculus

Service Curve

• Minimum Service Curve

)()( tSAtB

Service Curve

Network Calculus

Tandem Network

Probabilistic EP’s

• Allow a certain amount of violating traffic to the EP bound

• Leads to higher utilization of resources

Bounded Burstiness Processes

• The cumulative traffic is allowed to exceed its EP but a probability decaying with the degree the EP is exceeded

• Stochastically bounded burstiness with upper rate and bounding function f ():

ntimes

nduuf

))((

)(})(),(Pr{ fsttsA

Bounded Burstiness Processes

• Superposition Ai(t) = {i, fi()} i=1,2

A1(t) + A2(t) = {1 +2, f1(p)+f2((1-p))}, where 0<p<1, is also SBB

• For working conserving service and A(t) SBB, the output process is SBB with {, f()+(1/c –) } and the queue is bounded

• Exponential Bounded Bourstiness f() = e- where and are source specific (also sum of exponential)

Chang’s EP

• Deterministic bound to the moment generating function of A(t), i.e., the Fourier transform of A(t)

2112),( ),,(ˆlog

121 ttttAEe ttA

Kurose’s Bound

• The traffic flow is characterized by a family of random variables {B(t1),B(t2),…} that stochastically bounds the source over respective intervals with length tk

• In working conserving server the output is bounded by the same bounding family of the input

• Delay bounded

Rate Variance EP

• Rather than bounding the cumulative traffic, the rate variance EP bounds the variance over intervals of length t

• The accumulated process

can be bounded by a Gaussian process

k

kk t

tssAVARtRV

),()(

i ki tssA ),(

i kik tRVt )(2

Fractal Envelope Process

RutH

Ru

tHuB

tWutW)(

)()(lim )()(0

Htatt )(

log2

Multifractal Envelope Process

fBm

Multifractal Envelope Process

t H(x) dxκσH(x)xatÂ0

1)(

Htatt )(

Multifractal Envelope Process

Multifractal Envelope Process

Multifractal LB

A Comparison

Queue fed by an EP

Queue fed by an EP

Statistical Multiplexing

Envelope Process of an Aggregate of Multifractal Flows

T N

i

xHi

N

i

N

i

xHiii dxxxxHat ii

0

2

1

1

)(22

1 1

1)(22 )()(

Envelope Process of an Aggregate of Multifractal Flows

Equivalent Bandwidth

The Bandwidth needed to provide the required Quality of Service to a Flow

C

ABW(t) = C - (t)

-1

0

1

2

0.5 1 1.5 2 2.5 3

-1

0

1

2

0.5 1 1.5 2 2.5 3

0

1( )

ts ds

t

1( , ) ( )

t

tABW t t C s ds

-1

0

1

2

0.5 1 1.5 2 2.5 3

(t)

-1

0

1

2

0.5 1 1.5 2 2.5 3

0

1( )

tC s ds

t

Effective (Equivalent) Bandwidth

2112),( ),,(ˆlog

121 ttttAEe ttA

Effective (Equivalent) Bandwidth

• Deterministic bound to the moment generating function of A(t), i.e., the Fourier transform of A(t)

• Replace z in the z-transform by e

Effective (Equivalent) Bandwidth

),(ˆ),( 1221 ][ ttAttA kk eeE

),(ˆ][ln 12),( 21 ttAeE k

ttAk

)(ˆ))((ˆ),(ˆ1212 kkk ttattA

Effective (Equivalent) Bandwidth

})()(,0max{)1( ctatqtq

t

s

sCtstAtq eEeE ][][ )),(()(

K

kkk tatatA

1

)(ˆ)(ˆ)(ˆ)(ˆ),(ˆ

K

kkaa

1

)(ˆ)(ˆ

K

kk

1

)(ˆ)(ˆ

Effective (Equivalent) Bandwidth

t

s

Castq eeeE0

])(ˆ[)(ˆ)( ][

Cat )(ˆ

Effective (Equivalent) Bandwidth

• Chernoff Bound

• Space Parameter

][][ qx eEexqP

)1

ln(1

LPx

Effective (Equivalent) Bandwidth

]ln[11

lim )(tAk

tEe

t

Effective (Equivalent) Bandwidth

Poisson Source)1()( ][

ettA kk eeE

1

eC kk

xPL /5.1110 5

xPL /7.2010 9

Equivalent Bandwidth of Multifractal Flows

N

ii

N

i

tHi

N

i

tHii aCtttH ii

1

2

1

1

)(22

1

1)(22 )(

C

ABW(t) = C - (t)

-1

0

1

2

0.5 1 1.5 2 2.5 3

-1

0

1

2

0.5 1 1.5 2 2.5 3

0

1( )

ts ds

t

1( , ) ( )

t

tABW t t C s ds

-1

0

1

2

0.5 1 1.5 2 2.5 3

(t)

-1

0

1

2

0.5 1 1.5 2 2.5 3

0

1( )

tC s ds

t