NICTA Short Course Network Analysis Vijay Sivaraman Day 1 Queueing Systems and Markov Chains Network Analysis, 2008s2 1-1
Outline Why a short course on mathematical analysis? Limited current course offering (at UNSW EE/CSE) Students differ in exposure to analytical techniques Helps develop deeper insight into your problem / solution Often a must for major conferences / journals Greek in thesis always looks cooler! What this course is about: How to start building a model for your research problem Focus is on formulating the model What this course is not about: Not a rigorous theory of any particular topic(s) Not focus on how to solve a model Network Analysis, 2008s2 1-2
Analysis in Network Research Quantify: loss, delay, throughput/efficiency Wired network: Scheduling algorithms (priority, weighted fair, ) Congestion control algorithms Wireless (LAN, mesh, sensor) network: MAC protocol for time-varying channel Probabilistic routing algorithm Optical network: Evaluate architecture of new optical switch Map traffic to wavelengths (traffic grooming) Network Analysis, 2008s2 1-3
Some Analysis Techniques Queuing theory: loss/delay in packet networks Markov models: network traffic, protocols, Fluid models: Rate-control, congestion-control, traffic flow Graph theory: routing, resilience, network structure Combinatorial analysis: Randomized and approximation algorithms Optimization techniques: Network design, routing, power, efficiency Network Analysis, 2008s2 1-4
What is Your Research? What communication system are you studying? New architecture, algorithm, protocol? What metrics are you interested in? Loss, delay, efficiency, quality? What are the inputs to your system? Traffic pattern, channel conditions, error rates, Background in analysis: Familiar with some techniques? Tried any techniques for your research problem? Extent of success? Network Analysis, 2008s2 1-5
How to start Modeling? Building a Markov model: Define state of a system Chart out how the system changes state Solve to get probabilities of each state Compute metrics of interest (loss, delay, etc.) and we are done! If only life were so easy! Let s consider a very simple system Network Analysis, 2008s2 1-6
An M/M/1 Queueing System Single queue Single server (single transmission line) Customers (packets) arrive according to a Poisson process with rate λ per second The service time distribution is exponential with mean 1/μ seconds First-In-First-Out service Infinite buffer λ μ Network Analysis, 2008s2 1-7
What are Poisson and Exponential? f(x) Service time: Exponential pdf: cdf: μx f ( x) = μe, x 0 μx F( x) = 1 e pdf Has memory-less property P( x > s + t x > t) = P( x > s), s, t > 0 x Arrival process: Poisson It is a counting process for the number of randomly occurring pointevents observed in a given interval of time, e.g. Tasks arriving at a processor Messages arriving to a network Customers arriving at a supermarket checkout Radioactive particles from a source Inter-event time has an exponential distribution [homework: proof] Network Analysis, 2008s2 1-8
Poisson Process: definition Let the r.v. N(t,τ) denote number of events in (t,τ] Let o(h) denotes an expression f(h) such that lim 0 f ( h) / h = h 0 A Poisson process {N(0,t)}, t 0, with rate λ is such that: 1. P[N(t,t+h)=0] = 1 - λh + o(h) 2. P[N(t,t+h)=1] = λh + o(h) 3. P[N(t,t+h)=2] = o(h) 4. N(0,t) and N(t,t+h) are independent for all t, h > 0 Every small interval has equal likelihood of event occurrence Events are thus completely random in time Time-homogeneity property: for all τ: P[N(τ, τ+t)] = P[N(0,t)] = P[N(t)] Network Analysis, 2008s2 1-9
Poisson Process: properties Claim: The number of events N(t) in any interval of length t is a Poisson r.v. with parameter λt: λt k P[ N( t) = k] = e ( λt) k! Claim: Mean number of events in any interval of length t: E[ N( t)] = = k 0 kp[ N( t) = k] = λt Claim: Poisson is a limiting approximation of binomial (λt = np) : i n λ Claim: Inter-event time (i.e. time between successive events) is an exponential r.v. with parameter λ lim i n i p (1 p) = e i n Homework: prove that time to first arrival is exponential Homework: prove that time to next arrival is exponential λt ( t) i! Network Analysis, 2008s2 1-10
M/M/1 Markov Chain Representation Objective: system state should have Markov property P X j X = x ; u s) = P( X = j X = x ) History is summarized in the state State: number of customers N(t) in system at time t Should state include time customer has spent in server? Should state include time elapsed since last customer arrival? Markov chain representation of system state: ( s+ t = u u s+ t s s Arrows show possible state transitions and associated rate λ λ λ 0 1 2 n n+1 μ μ μ Network Analysis, 2008s2 1-11
Solving the Markov Chain Balance principle: For any set of states A, the flux out of set A equals the flux into set A Balance applied to A = {n}: λ p0 = μ p1, n = 0 ( λ + μ) p = λ p + μ p n 1 Balance applied to A = {0,1,..n-1}: n n+ 1, n = 1,2,K Can solve to obtain: where λ p n 1 = μ pn, n = ρ = λ / μ p n 1, 2,K n = ( 1 ρ) ρ, n = 0,1,2,... Network Analysis, 2008s2 1-12
Mean Performance Measures System utilisation: ρ = λ / μ = 1 p 0 Mean number of customers in system: ρ E[ n] = np = n = 0 n 1 ρ How long on average does a customer spend in the system? τ = n 1 E[ ] p n = n= 0 μ μ λ Can also deduce this using Little s law : Probability of loss? E [ n] = λe[ τ ] Network Analysis, 2008s2 1-13
M/M/1 Variations M/M/c: multiple servers operating in parallel Load-balancing on multiple links M/M/1/K: queue limited to K customers Finite queue capacity Bulk arrivals / service: Simultaneous arrivals or service Multiple classes of customers Priority scheduling Network Analysis, 2008s2 1-14
Problem You are designing an all-optical packet switch which has very small storage memory (say 10 KB) and carries TCP and UDP traffic. We want to evaluate the performance of this switch if it were installed in the Internet. Metrics: TCP throughput and UDP loss What traffic model to use? What are the arrival rates? Can we build a Markov model? What if TCP packets are on average 5 times larger than UDP packets? What if TCP and UDP are in separate queues and UDP gets priority service? Network Analysis, 2008s2 1-15
Non-Markovian Systems What if service times are not exponential? Several approaches can be used [see Kleinrock]: Semi-Markov model (studied next) Method of stages Lindley s equations Method of supplementary variables Embed Markov chain at customer departure instances: Why does that make the system Markovian? What is the state? What are the transition probabilities? How do you solve the Markov chain? Network Analysis, 2008s2 1-16
M/G/1 Queuing System Consider the problem again: You are designing an all-optical packet switch which has very small storage memory (say 10 KB) and carries TCP and UDP traffic. We want to evaluate the performance of this switch if it were installed in the Internet. Suppose TCP packet are fixed-size 1000 bytes and UDP packets are fixed-size 200 bytes? States? Transition probabilities? How to solve balance equations? Network Analysis, 2008s2 1-17