Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose.

Similar presentations


Presentation on theme: "Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose."— Presentation transcript:

1 Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, lingu@acm.org Computer Networking: A Top Down Approach 6 th edition. Jim Kurose and Keith Ross,. Part of the slides are adapted from course companion materials.

2 Queueing theory  How long is the queue? How much time will I wait?  A branch of applied probability theory  Applications in  Telecommunications  Traffic control  Predicting computer performance  Health services (e.g. control of hospital bed assignments)  Airport traffic, airline ticket sales  Layout of manufacturing systems.  Communication networks  Why do we want to know the characteristics of queues?

3 Queues and queueing  Oct. 16, 2010: 1.03 million visitors in World Expo., Shanghai  If you are one of them, you wonder  How many people ahead of me?  How soon can I get into the pavilion? 8 hours? 12 hours?  Ultimately, organizer starts to persuade visitors to leave (drop packets)  Every second, millions of packets flow into a switch/router  Would you be able to tell  How long is the queue?  How much is the delay?  Would you like to drop packets?

4 Queuing theory for studying networks 4  View network as collections of queues  FIFO data-structures  Queuing theory provides probabilistic analysis of these queues  Examples:  Average length  Average waiting time  Probability queue is at a certain length  Probability a packet will be lost

5 Little’s Law 5  Little’s Law: Mean number tasks in system = mean arrival rate x mean response time  Observed before, Little was first to prove  Applies to any system in equilibrium, as long as nothing in black box is creating or destroying tasks ArrivalsDepartures System

6 Proving Little’s Law 6 J = Shaded area = 9 Same in all cases! 1 2 3 4 5 6 7 8 Packet # Time 1 2 3 1 2 3 4 5 6 7 8 # in System 1 2 3 Time 1 2 3 Time in System Packet # 1 2 3 Arrivals Departures

7 Definitions 7  J: “Area” from previous slide  N: Number of jobs (packets)  T: Total time  : Average arrival rate  N/T  W: Average time job is in the system  = J/N  L: Average number of jobs in the system  = J/T

8 The Little’s Law 8 1 2 3 4 5 6 7 8 # in System (L) 1 2 3 Time (T) 1 2 3 Time in System (W) Packet # (N) 1 2 3 =

9 Model Queuing System 9  Use Queuing models to  Describe the behavior of queuing systems  Evaluate system performance Server System Queuing System Queue Server Queuing System

10 Characteristics of a queueing model  Arrival process: the sequence of requests for service, often specified in terms of inter-arrival time  The distribution that determines how the tasks arrive in the system.  Service mechanism: # of servers and service time  The distribution that determines the task processing time  Queue discipline: disposition of blocked customers (customers who find all servers busy)

11 Kendall notation  A/B/m/N –S  A – distribution of inter-arrival time  B – distribution of service time  m – number of servers  N – max capacity ( ∞ if omitted)  S – queue discipline (FIFO if omitted)  Distributions  M: stands for "Markovian", implying exponential distribution for service times or inter-arrival times.  D: Deterministic (e.g. fixed constant)  E k : Erlang with parameter k  H k : Hyperexponential with parameter k  G: General (anything)

12 Kendall Notation Examples 12  M/M/1:  Poisson arrivals and exponential service, 1 server, infinite capacity (also assumed infinite population), FCFS (FIFO)  The simplest ‘realistic’ queue  M/M/m  Same, but m servers  G/G/3/20  General arrival and service distributions, 3 servers, 17 queue slots (20-3)

13 Poisson Process 13 For a Poisson process with average arrival rate, the probability of seeing n arrivals in time interval t

14 Poisson process & exponential distribution 14  Inter-arrival time t (time between arrivals) in a Poisson process follows exponential distribution with parameter

15 Analysis of M/M/1 queue 15  Given: : Arrival rate of jobs (e.g., packets on input link)  : Service rate of the server (e.g., packets on output link)  Solve:  L: average number of jobs in the queuing system  L q : average number of jobs in the queue  W: average waiting time in whole system  W q : average waiting time in the queue

16 M/M/1 queue model 16  WqWq W L LqLq

17 Solving queuing systems 17  4 unknowns: L, L q W, W q  Relationships:  L= W  L q = Wq (steady-state argument)  W = W q + (1/  )  If we know L or Lq, we can find the others  Finding L can be hard.  In general:  : the probability that the number of items in the system is n  Can we find a closed form expression of and, given only and  ?

18 Equilibrium conditions 18 n+1nn-1    Define to be the probability of having n items in the system at time t

19 Equilibrium conditions 19 n+1nn-1   

20 Solving for L 20

21 Solving W, W q and L q 21

22 Response Time vs. Utilization 22

23 Summary of M/M/1 23  The simplest ‘realistic’ queue: Poisson arrivals and exponential service, 1 server, infinite capacity (also assumed infinite population), FCFS (FIFO)  Variables: : Arrival rate of jobs (packets on input link)  : Service rate of the server (output link) L: average number of jobs in the queuing system L q : average number of jobs in the queue W: average waiting time in whole system W q : average waiting time in the queue

24 Example 24  On a network gateway, measurements show that the packets arrive at a mean rate of 125 packets per second (pps) and the gateway takes about 2 ms to forward a packet. Assuming an M/M/1 model, what is the probability of buffer overflow if the gateway had only 13 buffer units? How many buffer units are needed to keep packet loss below one packet per million?  mean arrival rate (): 125 packets/s  mean response time (1/): 2 ms  Assuming M/M/1:  What is the gateway’s utilization?  What is the probability of n packets queued in the gateway?  What is the mean number of packets queued in the gateway?  The number of buffers so P(overflow) is <10 -6 ?

25 Example 25  Service rate μ =  Gateway utilization ρ = λ / μ =  Prob. of n packets in system (gateway) =  Mean number of packets in system (gateway) = 1/0.002=500 0.25

26 Example 26  Probability of buffer overflow with 13 buffer units: = P(more than 13 packets in gateway) = ρ 14 = 0.25 14 = 3.73x10 -9 = 3.73 packets per billion packets  To limit the probability of loss to less than 10 -6 :

27 Policing Mechanisms Token Bucket: limit input to specified Burst Size and Average Rate.  Bucket can hold b tokens  Tokens generated at rate r token/sec unless bucket full  Over interval of length t: number of packets admitted less than or equal to (r t + b).  At most b packets can be transmitted in a burst (within a short period of time).

28 Policing Mechanisms (more)  token bucket, WFQ combine to provide guaranteed upper bound on delay, i.e., QoS guarantee! WFQ token rate, r bucket size, b per-flow rate, R D = b/R max arriving traffic

29 Appendix CS352 Fall,200529

30 Example application of queuing theory 30  Which one is better, multiple-line or single-queue?  We can prove using queuing theory that : throughput improves increases with one queue instead of separate lines


Download ppt "Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose."

Similar presentations


Ads by Google