31
1 Exponential distribution: main limitation So far, we have considered Birth and death process and its direct application To single server queues With the 2 following assumptions Inter-arrival time is exponential Service time is exponential Problem with exponential distribution It has the memoryless property (not very good) Since, the longer you get served, => the more likely your service will complete

1 Exponential distribution: main limitation So far, we have considered Birth and death process and its direct application To single server queues With

Embed Size (px)

Citation preview

1

Exponential distribution: main limitation So far, we have considered

Birth and death process and its direct application To single server queues

With the 2 following assumptions Inter-arrival time is exponential

Service time is exponential

Problem with exponential distribution It has the memoryless property (not very good)

Since, the longer you get served,

=> the more likely your service will complete

2

Exponential assumption: example Let us consider

Queue in one of the output ports of a router Is it ok to model this queue as an M/M/1 queue?

A lot of people do, but is it correct?

The implication of such a model Transmission delay of a packet is exponential?

If you are doing file transfer all packets are 1500 bytes long

The latest statistics from SANs (Storage Area Networks)

1500 bytes P1

500 bytes P2

64 bytes P3

3

Inter-arrival time: is it exponential? Back in the 80s

When the link speeds were very small It was OK to consider packet arrival to be Poisson

But as speeds picked up with the advent of SONET Because of the tremendous speed, the utilization of links

No longer regular (spaced out with exponential inter-arrival)

Instead, traffic is bursty (packets are grouped together) You go thru an ON period with back to back packets

Followed by an off period

It is better to use Interrupted Poisson distribution

4

Erlang model: mixture of exponentials Erlang

Realized the exponential distribution

was not an adequate modeling technique

But it is important to keep it as it leads to easy mathematics

Came up with another idea Mixture of exponentials represented by the letter E

Combine several exponentials to make up a service

μ Break it up into r exponentials in tandem

rμ rμ … rμ

5

Erlang model: main concept

The arriving customer Takes a sequence of exponential services

Instead of a single service time

Breaking service time into r service times Is called Er Erlang distribution with r stages

However, the r servers are equivalent to one server Only one customer is accommodated in service at a time

Example: E2

Why is it important? Arbitrary pdf can be represented by the Erlang model

1/2μ 1/2μ

6

Coxian model: main idea

Idea Instead of forcing the customer

to get r exponential distributions in an Er model

The customer will have the choice to get 1, 2, …, r services

Example C2 : when customer completes the first phase

He will move on to 2nd phase with probability a Or he will depart with probability b (where a+b=1)

a

b

7

Laplace transform

X is a continuous random variable fX (x) is the probability density function of X

Laplace transform of X

Since,

0

* ][)()( sxX

sxX eEdxxfesf

x X dxxfxgXgEYEXgY )().()]([][)(

8

Main property of Laplace transform Main property

Proof: first and second moment

][)1()(0

* nn

s

X

n

XEsfds

d

][)()0(

)(.)(..)()(

][).(.)0(

)(..))(()()(

22*2

2

2**2

2

*

*

XEdxxfxfds

d

dxxfexdxxfexds

dsf

ds

d

ds

dsf

ds

d

XEdxxfxfds

d

dxxfexdxxfeds

ddxxfe

ds

dsf

ds

d

XX

Xsx

Xsx

XX

XX

Xsx

Xsx

Xsx

X

9

Moment generating functions

Laplace transform is a special case of Moment generating function ø(t)

It is called as such because of all of the moments of X Can be obtained by successively differentiating it

Laplace transform is obtained t = -s

x

Xtx

x

tx

continuousXdxxfe

discreteXxXPe

_;)(

_];[.

]E[eø(t) tX

10

Laplace transform of an exponential distribution

Let X be a continuous random variable That follows the exponential distribution

The Laplace transform of X is given by

xX exf .)(

se

s

xsdes

dxe

dxeedxeedxxfesf

xs

xsxs

xsxxsx

x

Xsx

X

0

)(

0

)(

0

)(

00

*

.

)(

.)(.)(

11

Convolution of 2 discrete random variables

Let X1 and X2 be discrete random variables

Whose probability distributions are known P[X1 = x1] and P[X2 = x2]

Y be the sum of X1 and X2

What is the probability distribution of Y = X1 + X2?

P[Y = y]

1

][].[][ 1211x

xyXPxXPyYP

12

Convolution of 2 continuous random variables

Let X1 and X2 be 2 continuous random variables fX1 (x1) and fX2 (x2) are known

=> fX1 *(s) and fX2

*(s) are known

Let Y = X1 + X2

What is the pdf of Y?

)().()(

)()()(

)().()(

***

21

0

111

21

21

21

sfsfsf

xfxfyf

dxxyfxfyf

XXY

XXY

y

XXY

13

Application to Erlang model

X1 and X2

are exponentially distributed and independent

with mean 1/2μ each

1/2μ 1/2μ

X1 X2

Y=X1+X2

2

*

**

22

21

2

2)(

.2

.2)()(

..2)(;..2)(

21

2

2

1

1

ssf

ssfsf

exfexf

Y

XX

xX

xX

14

Erlang service time: first and second moment

The mean of Y?

The variance of Y?

Exercise at home Obtain the mean and variance of E2 from

its Laplace transform

1

][][][][ 2121 XEXEXXEYE

222

2121

2

1

4

1

4

1

][][][][

XVarXVarXXVarYVar

15

Squared coefficient of variation

The squared coefficient of variation Gives you an insight to the dynamics of a r.v. X

Tells you how bursty your source is C2 get larger as the traffic becomes more bursty

For voice traffic for example, C2 =18

Poisson arrivals C2 =1 (not bursty)

22

][

][

XE

XVarC

1/1

/1

][

][2

2

22

XE

XVarC

16

Poisson arrivals vs. bursty arrivals

Why do we care If arrival is bursty or Poisson

Bursty traffic will place havoc into your buffer

Example: router design

% loss

C2

17

Erlang, Hyper-exponential, and Coxian distributions

Mixture of exponentials Combines a different # of exponential distributions

Erlang

Hyper-exponential

Coxian

μ μ μ μ E4

Service mechanism

H3

μ1

μ2

μ3

P1

P2

P3

μ μ μ μC4

18

Erlang distribution: analysis

Mean service time E[Y] = E[X1] + E[X2] =1/2μ + 1/2μ = 1/μ

Variance Var[Y] = Var[X1] + Var[X2] = 1/4μ2 v + 1/4μ2 = 1/2μ2

1/2μ 1/2μ

E2

2

*

**

22

21

2

2)(

.2

.2)()(

..2)(;..2)(

21

2

2

1

1

ssf

ssfsf

exfexf

Y

XX

xX

xX

19

Squared coefficient of variation: analysis

X is a constant X = d => E[X] = d, Var[X] = 0 => C2 =0

X is an exponential r.v. E[X]=1/μ; Var[X] = 1/μ2 => C2 = 1

X has an Erlang r distribution E[X] = 1/μ, Var[X] = 1/rμ2 => C2 = 1/r

fX *(s) = [rμ/(s+rμ)]r

C2

0

constant

1

exponential

Hypo-exponential

Erlang

20

Probability density function of Erlang r

Let Y have an Erlang r distribution

r = 1 Y is an exponential random variable

r is very large The larger the r => the closer the C2 to 0

Er tends to infintiy => Y behaves like a constant

E5 is a good enough approximation

)!1(

.)...()(

..1

r

eyrryf

yrr

Y

21

Generalized Erlang Er

Classical Erlang r E[Y] = r/μ

Var[Y] = r/μ2

Generalized Erlang r Phases don’t have same μ

rμ rμ … rμ

Y

μ1 μ2… μr

Y

))...()((

...

.....)(

21

21

2

2

1

1*

r

r

r

rY

sss

ssssf

22

Generalized Erlang Er: analysis

If the Laplace transform of a r.v. Y Has this particular structure

Y can be exactly represented by An Erlang Er

Where the service rates of the r phase Are minus the root of the polynomials

))...()((

...)(

21

21*

r

rY ssssf

23

Hyper-exponential distribution

P1 + P2 + P3 +…+ Pk =1

Pdf of X?

μ1

μ2

P1

P2

Pk μk

.

.

X

k

i

xii

XkXX

i

k

eP

xfPxfPxf

1

.

1

..

)(....)(.)(1

24

Hyper-exponential distribution:1st and 2nd moments

22

12

2

1

1

*

][][][

2.][

][

.)(

XEXEXVar

PXE

PXE

sPsf

k

i i

i

k

i i

i

k

i i

iiX

Example: H2

2

2

2

1

122

221

1

22

221

12

2

2

1

1

2.

2.][

2.

2.][

][

PPPPXVar

PPXE

PPXE

25

Hyper-exponential: squared coefficient of variation

C2 = Var[X]/E[X]2

C2 is greater than 1

Example: H2 , C2 > 1 ?

0)11

(211

0.

..2)1()1(

0.

..2

11)//(

/2/2

2

212122

21

21

2122

2221

11

21

2121

22

21

21

22

221

1

22211

222

2112

PPPPPP

PPPPPP

PP

PPC

26

Coxian model: main idea

Idea Instead of forcing the customer

to get r exponential distributions in an Er model

The customer will have the choice to get 1, 2, …, r services

Example C2 : when customer completes the first phase

He will move on to 2nd phase with probability a Or he will depart with probability b (where a+b=1)

a

b

27

Coxian model

μ1 μ2 μ3 μ4a1

b1 b2 b3

a2 a3

μ1

μ1

b1

a1 b2 μ2

μ1 μ2 μ3

a1 a2 b3

μ1 μ2 μ3 μ4

a1 a2 a3

28

Coxian distribution: Laplace transform

Laplace transform of Ck

Is a fraction of 2 polynomials The denominator of order k and the other of order < k

Implication A Laplace transform that has this structure

Can be represented by a Coxian distribution Where the order k = # phases, Roots of denominator = service rate at each phase

korderPolynomial

korderPolynomial

_

_

k

i

i

l l

lii sbaaaaasf

1 112100

* ....)(

29

Coxian model: conclusion

Most Laplace transforms Are rational polynomials

=> Any distribution can be represented Exactly or approximately

By a Coxian distribution

30

Coxian model: dimensionality problem

A Coxian model can grow too big And may have as such a large # of phases

To cope with such a limitation Any Laplace transform can be approximated by a c

To obtain the unknowns (a, μ1, μ2) Calculate the first 3 moments based on Laplace transform

And match these against those of the C2

a

b=1-a

μ1 μ2

31

C2 : first three moments

32

31

3212121

31

3

22

21

22121

21

2

21

)(6)(126][

)(22.2][

1][

aabXE

aabXE

aXE