ORF 401 - Electronic Commerce Spring 2009 April 15, 2009 Week 10 Capacity Analysis Deterministic Model –Assume: each HTTP request takes T r (request time)

Slides:



Advertisements
Similar presentations
Lecture 10 Queueing Theory. There are a few basic elements common to almost all queueing theory application. Customers arrive, they wait for service in.
Advertisements

Introduction to Queuing Theory
Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
E&CE 418: Tutorial-4 Instructor: Prof. Xuemin (Sherman) Shen
1 CNPA B Nasser S. Abouzakhar Queuing Disciplines Week 8 – Lecture 2 16 th November, 2009.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Chapter Queueing Notation
CS 241 Spring 2007 System Programming 1 Queuing Framework for Process Management Evaluation Lecture 20 Klara Nahrstedt.
1 Chapter 8 Queueing models. 2 Delay and Queueing Main source of delay Transmission (e.g., n/R) Propagation (e.g., d/c) Retransmission (e.g., in ARQ)
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
Chap. 20, page 1051 Queuing Theory Arrival process Service process Queue Discipline Method to join queue IE 417, Chap 20, Jan 99.
Mean Delay in M/G/1 Queues with Head-of-Line Priority Service and Embedded Markov Chains Wade Trappe.
Queueing Theory: Part I
Delay models in Data Networks
Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University
1 Queueing Theory H Plan: –Introduce basics of Queueing Theory –Define notation and terminology used –Discuss properties of queuing models –Show examples.
Queueing Network Model. Single Class Model Open - Infinite stream of arriving customers Closed - Finite population eg Intranet users Indistinguishable.
Little’s Theorem Examples Courtesy of: Dr. Abdul Waheed (previous instructor at COE)
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.
Internet Queuing Delay Introduction How many packets in the queue? How long a packet takes to go through?

Location Models For Airline Hubs Behaving as M/D/C Queues By: Shuxing Cheng Yi-Chieh Han Emile White.
Queuing Networks. Input source Queue Service mechanism arriving customers exiting customers Structure of Single Queuing Systems Note: 1.Customers need.
Introduction to Queuing Theory
Simulation Output Analysis
Copyright warning. COMP5348 Lecture 6: Predicting Performance Adapted with permission from presentations by Alan Fekete.
Queueing Theory I. Summary Little’s Law Queueing System Notation Stationary Analysis of Elementary Queueing Systems  M/M/1  M/M/m  M/M/1/K  …
The Poisson Process. A stochastic process { N ( t ), t ≥ 0} is said to be a counting process if N ( t ) represents the total number of “events” that occur.
Introduction to Queuing Theory
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Chapter 2 Machine Interference Model Long Run Analysis Deterministic Model Markov Model.
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
1 Queuing Analysis Overview What is queuing analysis? - to study how people behave in waiting in line so that we could provide a solution with minimizing.
Introduction to Queueing Theory
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
Entities and Objects The major components in a model are entities, entity types are implemented as Java classes The active entities have a life of their.
Flows and Networks Plan for today (lecture 4): Last time / Questions? Output simple queue Tandem network Jackson network: definition Jackson network: equilibrium.
Queueing Theory What is a queue? Examples of queues: Grocery store checkout Fast food (McDonalds – vs- Wendy’s) Hospital Emergency rooms Machines waiting.
TexPoint fonts used in EMF.
Modeling and Analysis of Computer Networks
yahoo.com SUT-System Level Performance Models yahoo.com SUT-System Level Performance Models8-1 chapter11 Single Queue Systems.
Queuing Theory and Traffic Analysis Based on Slides by Richard Martin.
7 sum of RVs. 7-1: variance of Z Find the variance of Z = X+Y by using Var(X), Var(Y), and Cov(X,Y)
Expectation. Let X denote a discrete random variable with probability function p(x) (probability density function f(x) if X is continuous) then the expected.
Chapter 20 Queuing Theory to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
M/M/1 Queues Customers arrive according to a Poisson process with rate. There is only one server. Service time is exponential with rate  j-1 jj+1...
Chapter 2 Probability, Statistics and Traffic Theories
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
(C) J. M. Garrido1 Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Queuing Theory.  Queuing Theory deals with systems of the following type:  Typically we are interested in how much queuing occurs or in the delays at.
Chapter 5 Elementary Stochastic Analysis Prof. Ali Movaghar.
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
Queuing Theory Simulation & Modeling.
OPERATING SYSTEMS CS 3502 Fall 2017
Queueing Theory What is a queue? Examples of queues:
Internet Queuing Delay Introduction
Demo on Queuing Concepts
Lecture on Markov Chain
Capacity Analysis, cont. Realistic Server Performance
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
Internet Queuing Delay Introduction
Queuing Systems Don Sutton.
Our favorite simple stochastic process.
TexPoint fonts used in EMF.
Chapter 2 Machine Interference Model
Presentation transcript:

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Capacity Analysis Deterministic Model –Assume: each HTTP request takes T r (request time) –and requests arrive at a know known time sequence: A s –What is service time per request, T s No conflicts: N(t) t First request 2nd request T r = 1/2 As: 0, 1, 2, 3, … (no conflicts) T s = 1/2

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Sequenced with conflict: Round Robin: –Reqest 1 arrives at 0, works ‘till 0.25., waits ‘till.5 works ‘till.75 then ends –Reqest 2 arrives at.25, works ‘till 0.5., waits ‘till.75 works ‘till 1.0 then ends T s = ( )/2 = 6/8 First-come-first-serve T r = 1/2 A s : 0,.25, 1., 1.25,… (same # requests, sequenced differently) T s = ( )/2 = 5/8 First request starts N(t) t 2nd request starts Round Robin

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Observations If server is handling a single page, then deterministic service times is reasonable, otherwise NOT The long term behavior depends on the arrival sequence, A s, AND the service rate, T s F-C-F-S is a lower bound on the round robin

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Probabilistic Model (F-C-F-S) Let inter arrival time and the service times be : –independent, identically distributed (iid) random variables having an exponential distribution (denoted by M ) –a r.v. X has an exponential density iff: f(x) =  e -  x x > 0 = 0 x < 0 So P rob { X 0 P rob { X > x } = e -  x x > 0 E(X) = 1/  var(X) = 1/  

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Assume server has been running for a while and reached steady state In steady state (prob. of being in state j, (j waiting to be served)) : P j j = P j+1  j+1 or P j+1 = P j ( j /  j+1 ) (recursion relationship) Specifically: P 1 = ( 0 /  1 ) P 0 P 2 = ( 1 /  2 ) P 1 = ( 1 /  2 ) ( 0 /  1 ) P 0 … P n+1 = ( n /  n+1 ) P n = (( n n )/ (  n+1  n...  1 )) P 0 Let’s let: C n = ( n-1 n )/ (  n  n-1...  1 ), n = 1, 2, … Then the Steady State Probabilities are P n = C n P 0, n = 1, 2, … Arrival Rates Service rates States 12nn n 1  22 11  n+1

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 What about P 0 ? –Since  n   P n = 1, then  n   C n P 0 = 1 P 0 +  n   C n P 0 = 1 P 0 [1+  n   C n ] = 1  P 0 = 1 / [1+  n   C n ] Now, the number of requests in the system, L L = 1 P 1 +2 P 2 +3 P =  n   (n P n ) Then the expected waiting time (likely time to be served),W = L /  average arrival time

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Simple case: M/M/1/FCFS/  /  Now suppose n =  n =  n = 1,2, 3, … then C n = ( n /  n ) = (  ) n  n = 1,2, 3, … let  thenP 0 = 1 / (1 +  n   n ) = 1 /  n   n ) Now recall  n  x n = (1- x n+1 ) / (1- x ) for any x and if |x| < 1  n  x n = 1/ (1- x ) We need to have  or the system will blow up! So  Thus P 0 = 1 / (1 / ( 1  and P n =  n P 0 =  n ( 1  n = 1,2, 3, …

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 What about L (expected # of requests in queuing system) ? L =  n   n P n =  n   n (1  )  n = (1  )  n   n  n Now a little trick: Observe that n  n = n   n-1 So L = (1  )   n   n  n-1 Why bother? Because n  n-1 should be familiar. In particular d/d  (  n ) = n  n-1 Thus L = (1  )   n   d/d  (  n ) = (1  )  d/d  (  n   (  n ) ) = (1  )  d/d  (  n   (  n ) ) but d/d  (  n  inf (  n ) is a geometric series = (1  )  d/d  (1  ) -1, but d/d  (1  ) -1 = -1(1  ) -2 ( -1 ) SoL =   (1   ) -1 and we can show L =  (  ) -1 and expected time in system W = L /  =  (  ) = (  ) -1

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 More of M/M/1/FCFS/  /  Queues L q = expected number of customers in line = 0 P 0 +  n  ( n  1) P n =  n  ( n P n ) -  n  ( P n ) = L  P 0 ) = L  = 2  (  )) L s = expected number of customers in service = 0 P 0 +  n  1 P n = 1 - P 0 = 1  ) =  =  W q = expected time of customer spends in line = L q /  =  (  )) W s = expected time of customer spends in service = L s /  = 

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 What about multiple processors: C n = ( n -1 n )/ (  n  n-1...  1 ), n = 1, 2, … We again let n =  for every n Now assume that there are s processors. So when n < s we have  n = n  and when n < s we have  n = s  So C n = n  / (  n  n-1...  1 ) we has s terms of n  and n-s terms of s  Hence C n = n  / (n!  n ) n < s = n  / (s!)(s n-s )  n ) n > s If < s  as before we can show : P n = 1/ (  n  0, s -1 {(1 / n! ) ( /  ) n + (1 / s! ) ( /  ) s )(1 - ( / (s  )))}

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Finally: P n = P 0 (  n  (n!) n < s = P 0 (  n  ( (s!) s n-s ) n > s L = P 0 (  s (  s  )  ( s! ((1-  s  ) 2 )) +  W = P 0 (  s (  s  )  (s!) (1- (  s  ) 2  + ( 1 +  )  Where L= s = # processors  = arrival rates  = processing rates

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Realistic Server Performance Consider one server connected to the internet Arrivals Departures Initial processing “Server” BrowserInternet Model each as a single server queue

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 Realistic Server Performance, cont. Assume: –File sizes are exponentially distributed –Service rate of browser and Internet are exponentially distributed Parameters: –Arrival rate –Mean file size (5275 bytes) –Initialization time (independent of size) Server (T 1 = 1.5 Mbit/s, T 3 = 6Mbit/s ) Client (700Kbit/s) Arrivals Departures Initial processing “Server” BrowserInternet p 1-p Response Time Arrival Rate 35/sec

ORF Electronic Commerce Spring 2009 April 15, 2009 Week 10 More Complicated Model Load balancing strategies (above not very smart) Arrivals Departures Initial processing “Server” BrowserInternet p 1-p “Server” q 1-q