Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Network Performance and Quality of Service 5. Queuing Analysis Introduction How to analyze changes in network workloads? (i.e., a helpful tool to use) Analysis of system (network) load and performance characteristics response time throughput Performance tradeoffs are often not intuitive Queuing theory, although mathematically complex, often makes analysis very straightforward RQ12 2 Queuing Theory Queuing theory provides a very general framework for modeling systems in which customers must line up (queue) for service (use of resource) RQ12 Banks (tellers) Restaurants (tables and seats) Computer systems (CPU, disk I/O) Networks (Web server, router, WLAN) 3 Queue-based Models Queuing model represents: Arrival of jobs (customers) into system Service time requirements of jobs Waiting of jobs for service Departures of jobs from the system Typical diagram: Customer Arrivals Departures Buffer RQ12 Server 4 Parameters for Single-Server Queuing System Assuming queue has infinite capacity: At = 1, server is working 100% of the time (saturated), so items are queued (delayed) until they can be served. Departure rate remains constant, no matter how great the arrival rate becomes. Thus, the theoretical maximum input rate that the system can handle is max = 1 / TS RQ12 5 The Fundamental Task of Queuing Analysis Given: • Arrival rate, • Service time, Ts • Number of servers, N RQ12 Determine: • Items waiting, w • Waiting time, Tw • Items queued, r • Residence time, Tr 6 Queuing Process - Example General Expression: TRn+1 = TSn+1 + MAX[0, Dn – An+1] RQ12 7 General Characteristics of Network Queuing Models Item population Queue size RQ12 generally assumed to be infinite therefore, arrival rate is persistent infinite, therefore no loss finite, more practical, but often immaterial Dispatching discipline FIFO, typical LIFO Relative/Preferential, based on QoS 8 Multiserver Queuing System Comments: Assuming N identical servers, and is the utilization of each server. Then, N is the utilization of the entire system (aka traffic intensity u ) and the maximum utilization is N x 100%. Therefore, the maximum supportable arrival rate that the system can handle is: max = N / TS RQ12 9 Multiple Single-Server Queuing Systems RQ12 10 Basic Queuing Relationships General Single Server Multiserver r = Tr Little’s Formula = Ts = Ts N w = Tw Little’s Formula r=w+ u = Ts = N Tr = Tw + Ts RQ12 r = w + N 11 Queue Notation Queues are concisely described using the Kendall notation, which specifies: Arrival process for jobs {M, D, G, …} Service time distribution {M, D, G, …} Number of servers {1, n} Storage capacity (buffers) {B, infinite} Service discipline {FIFO, PS, SRPT, …} Examples: M/M/1, M/G/1 etc Kendall’s notation Notation is X/Y/N, where: X is distribution of interarrival times Y is distribution of service times N is the number of servers M/M/1? M/D/1? Common distributions G = general distribution if interarrival times or service times GI = general distribution of interarrival time with the restriction that they are independent M = exponential distribution of interarrival times (Poisson arrivals) and service times D = deterministic arrivals or fixed length service RQ12 13 Important Formulas for SingleServer Queuing Systems Note Coefficient of variation: if Ts = Ts => exponential if Ts = 0 => constant RQ12 14 Mean Number of Items in System (r)Single-Server Queuing Ts/Ts = Coefficient of variation M/M/1 RQ12 15 Mean Residence Time – (Tr) Single-Server Queuing M/M/1 RQ12 16 Multiple Server Queuing Systems Multiserver Queuing System Multiple SingleServer Queuing System RQ12 17 Important Formulas for Multiserver Queuing Note: Useful only in M/M/N case, with equal service times at all N servers. RQ12 18 Multiple Server Queuing Example Single server M/M/1 (2nd Floor) Multiserver M/M/? (2nd Floor) Multiple Single server M/M/1 (1st Floor) M/M/1 (2nd Floor) M/M/1 (3rd Floor) RQ12 19 MultiServer vs Multiple Single-Server Queuing System Comparison Single server case (M/M/1): Single server utilization: = 10 engineers x 0.5 hours each / 8 hour work day = 5/8 = .625 Average time waiting: Tw = Ts / 1 - = 0.625 x 30 / .375 = 50 minutes Arrival rate: = 10 engineers per 8 hours = 10/480 = 0.021 engineers/minute 90th percentile waiting time: mTw(90) = Tw/ x ln(10) = 146.6 minutes Average number of engineers waiting: w = Tw = 0.021 x 50 = 1.0416 engineers RQ12 20 Example: Router Queuing Internet 9600 bps = 5 packets/sec L = 144 octets … From data provided: • Ts = L/R = (144x8)/9600 = .12sec • = Ts = 5 packets/sec x .12sec = .6 Determine: 1. Tr= Ts / (1-) = .12sec/.4 = .3 sec 2. r = / (1-) = .6/.4 = 1.5 packets ln(1-.90) - 1 = 3.5 packets ln (.6) ln(1-.95) 4. mr(95) = - 1 = 4.8 packets ln (.6) 3. mr(90) = RQ12 For 3 & 4, use: mr(y) = ln(1 – y/100) -1 ln 21 Priorities in Queues – Two priority classes r RQ12 22 Priorities in Queues – Example Tr Router queue services two packet sizes: • Long = 800 octets • Short = 80 octets • Lengths exponentially distributed • Arrival rates are equal, 8packets/sec • Link transmission rate is 64Kbps • Short packets are priority 1, • Longer packets are priority 2 From data above, calculate: Ts 1 = Lshort/R = (80 x 8) / 64000 = .01 sec Ts 2 = Llong/R = (800 x 8) / 64000 = .1 sec 1 = Ts 1 = 8 x 0.01 = 0.08 2 = Ts 2 = 8 x 0.1 = 0.8 = 1 + 2 = 0.88 RQ12 64Kbps Find the average Queuing Delay (Tr) through the router: 1 Ts 1 + 2 Ts 2 1 - 1 .08 x .01 + .8 x .1 = .01 + = 0.098 sec 1-.08 Tr1 = Ts1 + Tr2 = Ts2 + = .1 + Tr = Tr 1 - Ts 1 1- .098 - .01 1 - .88 = 0. 833 sec 1 2 T + r1 Tr2 = .5 x .098 + .5 x .833 = 0.4655 sec 23 Network of Queues RQ12 24 Elements of Queuing Networks RQ12 25 Queuing Networks RQ12 26 Jackson’s Theorem and Queuing Networks Assumptions: – – – the queuing network has m nodes, each providing exponential service items arriving from outside the system at any node arrive with a Poisson rate once served at a node, an item moves immediately to another with a fixed probability, or leaves the network Jackson’s Theorem states: – – – RQ12 each node is an independent queuing system with Poisson inputs determined by partitioning, merging and tandem queuing principles each node can be analyzed separately using the M/M/1 or M/M/N models mean delays at each node can be added to determine mean system (network) delays 27 Jackson’s Theorem - Application in Packet Switched Networks Internal load: L Packet Switched Network External load, offered to network: N N = jk j=1 k=2 where: = total workload in packets/sec jk = workload between source j and destination k N = total number of (external) sources and destinations RQ12 = i i=1 where: = total on all links in network i = load on link i L = total number of links Note: • Internal > offered load • Average length for all paths: E[number of links in path] = / • Average number of item waiting and being served in link i: ri = i Tri • Average delay of packets sent through the network is: 1 L Mi T= i=1 Ri - Mi where: M is average packet length and Ri is the data rate on link i 28 Estimating Model Parameters To enable queuing analysis using these models, we must estimate certain parameters: RQ12 Mean and standard deviation of arrival rate Mean and standard deviation of service time (or, packet size) Typically, these estimates use sample measurements taken from an existing system 29 Sample Means for Exponential Distribution Sampling: • The mean is generally the most important quantity to estimate: N 1 ( ) = N Xi i=1 • Sample mean is itself a random variable • Central Limit Theorem: the probability distribution tends to normal as sample size, N, increases for virtually all underlying distributions • The mean and variance of X can be calculated as: E[ ]= E[X] = Var[ ]= 2x/N RQ12 30