340 likes | 349 Views
Explore performance analysis, stochastic processes, and challenges in wireless networks. Learn about packet-based transport, basic concepts, and modeling methodologies.
E N D
Wireless Networks II: Performance & Cross-Layer Aspects by Hans Peter Schwefel • Mm1 Cellular Networks: GSM, GPRS, and UMTS • Mm2 Network Performance: Methodology • Mm3 Quality of Service, content & header compression • Mm4 Security aspects of wireless networks • Mm5 Reliability aspects www.kom.auc.dk/~hps/WN2_Sp04/
Content • Motivation & Background • Performance Analysis in Wireless Settings • Review of Basic Concepts: Random Variables, Exponential Distributions, Stochastic Processes • Simple Analytic Models • Birth-Death Processes • M/M/1 Queues • Circuit-Switched case: Erlang formula • Packet-based traffic models • Simulation Models • Basics: Discrete Event Simulation • Random Number Generation • Output Analysis • Summary
Intro: Packet-Based Transport • Advantages of Packet-Based Transport (as opposed to circuit switched) • Flexibility • Optimal Use of Link Capacities, Multiplex-Gain for bursty traffic • Drawbacks • Buffering/Queueing at routers can be necessary • Delay / Jitter / Packet Loss can occur • Overhead from Headers (20 Byte IPv4, 20 Byte TCP) ... and it makes performance modeling harder!! Main motivation for Performance Modeling: • Network Planning • Evaluation/optimization of protocols/architectures/etc. + queueing
HTTP TCP IP Link-Layer L5-7 L4 L3 L2 Challenges in Packet Switched Setting Challenges in IP networks: • Multiplexing of packets at nodes (L3) • Burstiness of IP traffic (L3-7) • Impact of Dynamic Routing (L3) • Performance impact of transport layer, in particular TCP (L4) • Wide range of applications different traffic & QoS requirements (L5-7) • Feedback: performance traffic model, e.g. for TCP traffic, adaptive applications Challenges in Wireless Networks: • Wireless link models (channel models) • MAC & LLC modeling • RRM procedures • Mobility models • Cross layer optimization Analysis frequently with ‚stochastic‘ models
Basic concepts • Probabilities • ’Random experiment’ with set of possible results • Axiomatic definition on event set () • 0Pr(A)1; Pr()=0; Pr(AB)=Pr(A)+Pr(B) if AB= [ A,B() ] • Conditional probabilities: Pr(A|B)=Pr(AB) / Pr(B) • Random Variables (RV) • Definition: X: ; Pr(X=x)=Pr(X-1(x)) • Probability density function f(x), cumulative distribution function F(x)=Pr(Xx), reliability function (complementary distr. Function) R(x)=1-F(x)=Pr(X>x) • Expected value, moments: E(Xn)= xn f(x) dx • Relevant Examples, e.g.: • number of packets that arrive at the access router in the next hour (discrete) • Buffer occupancy (#packets) in switch x at time y (discrete) • Number of downloads (’mouse clicks’) in the next web session (discrete) • Time until arrival of the next IP packet at a base station (continuous)
Basic concepts: Exponential Distributions Important Case: Exponentially distributed RV • Single parameter: rate • Density function f(x)= exp(- x), x>0 • Cdf: F(x)=1-exp(- x), Reliability function: R(x)=exp(- x) • Moments: E{X}=1/ ; Var{X}=1/ 2, C2 = Var{X} / [E{X}]2 = 1 Important properties: • Memory-less: Pr(X>x+y | X>x) = exp(- y) • Properties of two independent exponential RV: X with rate , Y with rate • Distribution of min(X,Y): exponential with rate (+) • Pr(X<Y)= /(+)
Basic concepts III: Stochastic Processes • Definition of process (Xi) (discrete) or (Nt) (continuous) • Simplest type: Xi independent and identically distributed (iid) • Relevant Examples: • Inter-arrival time process: Xi • Counting Process: N(t) = max{n | i=1 Xi t} , alternatively Ni() = N(i) – N([i-1]) Important Example: Poisson Process • Assume i.i.d. exponential packet inter-arrival times (rate ): Xi:=Ti-Ti-1 • Counting Process: Number of packets Nt until time t • Pr(Nt=n)= (t)n exp(- t) / n! • Properties: • Merging: arrivals from two independent Poisson processes with rate 1 and 2 Poisson process with rate (1+ 2) • Thinning: arrivals from a Poisson process of rate are discarded independently with probability p Poisson process with rate (1-p) • Central Limit Theorem: superposition of n independent processes results in the limit n in a Poisson process (under some conditions on the processes) n-1
Content • Motivation & Background • Performance Analysis in Wireless Settings • Review of Basic Concepts: Random Variables, Exponential Distributions, Stochastic Processes • Simple Analytic Models • Birth-Death Processes • M/M/1 Queues • Circuit-Switched case: Erlang formula • Packet-based traffic models • Simulation Models • Basics: Discrete Event Simulation • Random Number Generation • Output Analysis • Summary
Continuous Time Markov Processes • Defined by • State-Space: finite or countable infinite, w/o.l.g. E={0,1,2,...,K} (K= also allowed) • Transition rates: jk • Holding time in state j: exponential with rate kj jk • Transition probability from state j to k: jk / lj jl =:jk / j • Xt = RV indicating the current state at time t; i(t):=Pr(Xt=i) • ’Markov Property’: transitions do not depend on history but only on current statet0<t1<...<tn , i0,i1,...in ,j E • Computation of steady-state probabilities • Chapman Kolmogorov Equations: di(t)/dt = - i i(t) + ji ji j(t) • Flow-balance equations, steady-state: i i(t) = ji ji j(t) • Here: restriction to irreducible, homogeneous processes
Queueing Models: Kendall Notation X/Y/C[/B] Queues (example: M/M/1, GI/M/2/10, M/M/10/10, ...) • X: Specifies Arrival Process • M=Markovian Poisson • GI=General Independent iid • Y: Specifies Service Process (M,G(I),...) • C: Number of Servers • B: size of finite waiting room (buffer) [also counting the packet in service] • If not specified: B= • Often also specified: service discipline • FIFO: First-In-First-Out (default) • Processor Sharing: PS • Last-in-first-out LIFO (preemptive or non-preemptive) • Earliest Deadline First (EDF), etc. Finite buffer (size B) Scope here: Point-process models as opposed to fluid-flow queues
M/M/1 queue • Poisson arrival of packets (first ’M’ Markovian) with rate • Exponentially distributed service times of rate (second ’M’) • Single Server (1) • FIFO service discipline • Qt = Number of packets in system is continuous-time Markov Process ’Derived’ Parameter: • Utilization,= / : if 1, instable case (no steady-state q.l.d) Performance Parameters • Queue-length distribution: (t) , steady-state limit: =lim (t) (if <1) • Queue-length that an arriving customer sees • Waiting/System time distribution • Buffer-Overflow Probability for level B = Pr(arriving customers sees buffer occupancy B or higher) Infinite buffer
M/M/1 queue: Performance • Birth-Death Process • Probability of i packets in queue [using flow-balance equations] i := Pr(Q=i) = (1-)* i, where = / <1 • Probability of idle server: 0 = (1-) • Average Queue-length: E{Q}= /(1-) • Average Delay (System Time): E{S}= E{Q}/ = 1/(-) • Buffer Overflow Probabilities (PASTA principle) Pr(Q(a)B)= Pr(QB) = B
General Birth-Death Processes 1 2 0 • Steady-State Probabilities (from balance equations): i := Pr(Q=i) = 0 k=0i-1 k/ k=1i k • Models in this class, e.g. • M/M/1/B • M/M/C, M/M/C/C • Load-dependent services, discouraged arrivals 1 2 3
The circuit switched scenario • K channels • Users allocate one channel per call for certain call duration • If all channels are allocated additional starting calls are blocked • How many channels are necessary to achieve a call certain maximal blocking probability? Common Model Assumptions: • Calls are arriving according to a Poission Process (justified for large user population, limit theorems for stochastic processes) with rate • Call durations are exponentially distributed with mean T (okay for voice calls)
Computation of blocking probabilities:M/M/K/K model, Erlang-B formula • Finite Birth-Death Process: • Probability of i calls active i := Pr(n=i) = 0 (T)i/i!, i=1,…,K where 0 = 1/[(T)i/i!] (sum taken over i=0 to K) • Probability of blocked call: p(Blocking) = K = 0 (T)K/K! [also known as Erlang-B formula] K 1/T K/T 2/T 3/T
Packet-based link model: M/M/1/K queue • Assumptions • Poisson arrival of packets with rate • Exponentially distributed service times of rate • Single Server • Finite waiting room (buffer) for K packets • Suitable e.g. for modeling ’bottleneck’ link in packet-based wireless networks • [Full network models: see traffic analysis lecture] Finite buffer (size K)
M/M/1/K queue: Performance • From Birth-Death Process Theory: • Probability of i packets in queue i := Pr(Q=i) = (1-)/(1- K+1) * i, where = / 1, i=0,…,K • Probability of packet loss: p(loss) = K = (1-)/(1- K+1) * K • Average Delay: Ď = 1/[ (1-pK)] * /(1- K+1) * [(1- K)/ (1-) – K K ] K
Extension: Models for packet traffic • Poisson assumption for packet arrivals may be applicable for highly aggregated traffic (core networks), but otherwise traffic tends to be bursty • High data rates in ftp download but less activity between downloads • http: activities after mouse-clicks • Video streaming: high data rates in frame transmissions • Interactive Voice: talk and silent periods • Model Modifications: • Bulk Arrival processes • ON/OFF models • Hierarchical models
Bulk Arrival Models • Queue-length at arrival instances increases not only by 1, but by a Random Variable B, the bulk-size • Parameter set of model • Bulk arrival process, e.g. exponential with rate • Bulk-Size distribution: pi (e.g. geometric) • Service rate (single packet) • Steady-state solution for mean system time [Chaudhry & Templeton 83]:E{S} = [ E{B}+E{B2} ] / [2 E{B} (1-) ] • Example: M(B)/M/1 queue with geometrically distributed B
More realistic models: ON/OFF Models • Parameters: • N sources, each average rate • During ON periods: peak-rate p • Mean duration of ON and OFF times • = p ON/(ON+OFF) ’bursty’ traffic, when p >>
Traffic models: General hierarchical models • Frequently used: Several levels with increasing granularity • E.g. 3 levels: sessions, connections, packets • Or: 5-level model:
Example: HTTP traffic model • ‘Main’ objects contain zero or more embedded objects that the browser retrieves Correlated requests for embedded objects within retrieval of main object HTTP Session (User A) Session Level HTTP Session (User B) HTTP Session (User C) ... ’exit browser’ ’start browser’ ’click’ ’click’ ’click’ ... Download Phase 1 Idle timeRead time Download Phase 2 Dld. Phase 3 Dld. Phase K Connection/ Flow Level ... Get Main Object Get embedded Obj. 1 Get emb. Obj. 2 Get emb. Obj. N Packet Level, TCP dynamics (not shown here) • Statistics: • Session arrivals: Renewal process (Poisson) • Idle time: heavy-tail • # embedded objects: geometric (measurements e.g. mean 5) • Object size: heavy-tailed
Content • Motivation & Background • Performance Analysis in Wireless Settings • Review of Basic Concepts: Random Variables, Exponential Distributions, Stochastic Processes • Simple Analytic Models • Birth-Death Processes • M/M/1 Queues • Circuit-Switched case: Erlang formula • Packet-based traffic models • Simulation Models • Basics: Discrete Event Simulation • Random Number Generation • Output Analysis • Summary
Simulation Models (I) • Basic principles of discrete event simulation • Virtual simulation time t • System state S(t) • Events occur at certain times ti • Instantaneous changes of system state S(ti-1)S(ti) • Possibly scheduling of follow-up events • Events stored in ordered event list • System description: • Entities, attributes, and activities • Frequently object oriented implementation • Important aspects • Initial state S(0) • Termination Criterion • Fixed simulation time T • Fixed number of packets/connections • Occurrence of certain events (e.g. Loss of connectivity)
Simulation Models (II) • Application to wireless networks:Main components • Topology definition: nodes and connectivity • Link properties: e.g., Propagation models • Node functionalities: e.g., schedulers, buffer management, L2/L3 protocol implementation • Traffic models (and transport protocol implementation) • Mobility Models • probabilistic elements in several of these components stochastic simulation • ’alternative’: trace-driven simulations • Output parameters, statistics collection, e.g. Packet based • End-to-end packet delay • packet loss rate • energy per packet Connection based • File Transfer times • Fraction of blocked calls • throughput Node/Link Properties • Buffer occupancy • Link utilizations • throughput
Types and Examples of Simulation Tools • ’Libraries’ and programming languages with basic functionalities and data types: • Sim_lib [Watkins, Kevin: Discrete Event Simulation in C, 1993] • Simula [e.g. R. Pooley: An Introduction to Programming in SIMULA, 1987] • General Purpose Simulation Environments, e.g. • DEMOS/MAOS [Birtwistle, A system for discrete event modelling on SIMULA (DEMOS), 1979] • GPSS [http://www.minutemansoftware.com] • Network Simulation Tools, e.g. • NS2 [http://www.isi.edu/nsnam/ns/] • OPNET • WIPSIM [http://www.wipsim.net/] • Glomosim [http://pcl.cs.ucla.edu/projects/glomosim]
Random Number Generation • Uniform Random Number Generator (RNG) • Sequence U1,U2,... of i.i.d. ’random’ numbers, uniformly distributed in ]0,1[ • Pseudo-random: same seed X0 same sequence • example: linear congruential generator • Xi+1=(a Xi + b) mod c, Ui+1=Xi+1/c • E.g. a=75=16807, b=0, c=231-1 (prime) • Random Variables from general distributions • Y1,Y2,… with cumulative distribution function F(x)derived from uniform stream U1,U2,… by • Inversion: Yi=F-1(Ui ) • Other Techniques: Rejection, Convolution/Composition, etc.
Output Analysis (I): General • Goal: Obtain Estimator Ž of desired performance parameter • Note: Ž often multi-dimensional • Ž is a random variable with some distribution fŽ(x) • Considered case here: Ž is estimator of =E(Z) • Properties of estimator: Žt is called (t=simulation time) • Unbiased when E(Žt)= • Consistent when lim Žt= for t (stochastic convergence) • Types of Simulations • Terminating simulations ~ ’transient parameters’ • Non-terminating simulations ~ Steady-state parameters
Output Analysis II: Terminating Simulations • Terminating Simulations • Explicite stopping criterion, e.g. • Fixed simulation time • Fixed number of arrivals/connections • Specific event (e.g. Buffer overflow, component failure) • Approach: Independent Replications • Repeat Experiment R times, each time with different seeds independent outcomes Z1,Z2,...ZR • Estimator Ž=1/R Zi • Unbiased • Asymptotically normal distributed • Relevant examples: • Determine average buffer-occupancy during busy hours 9-17hrs (starting empty at 9hrs) • Determine probability that call will be dropped before its desired end (given initial conditions) • Determine probability of buffer-overflow within n packet arrivals (given empty buffer in beginning)
Output Analysis III: Confidence Intervals • Example: Estimate Probability =Pr(Overflow before simulation time t) • R replications with indep. outcomes Zi={1 when overflow occurred, 0 otherwise} • Estimator Ž=1/R Zi • R* Ž Binomially distributed: expected value R, variance R (1- ) • E(Ž)= (unbiased!), Var(Ž)=(1- )/R • Estimates Š2 of Var(Zi)=2 • Š2 = Ž(1-Ž) [for probabilities] • General case: Š2 = 1/(R-1) (Zi-Ž)2 • Š2 /R is estimate of Var(Ž) Approaches for Confidence Intervals, confidence level 1- (often 1- =95%): • Convergence to normal distribution • R (Ž- )/ in the limit standard normal distributed • Pr(Ž- /R n1-/2 < < Ž + /R n1-/2) = 1- • General variance estimate use of Student t distribution (but only exact when Zi normal!) • R (Ž- )/Š approx. Student-t distribured with (R-1) degrees of freedom • Other approaches, e.g. variance stabilization for probability estimates [see Heyman/Sobel]
Output Analysis IV: non-terminating case • Steady state parameters in theory infinite simulation needed • Finite simulation length causes biased estimator • Approaches: • Independent replications, impact of transient phase ’avoid’ transient phase • Single, long simulation run • Problem: correlated samples require adjustment of variance estimate • Alternatives • Batching • Regenerative Simulation
Summary • Motivation & Background • Performance Analysis in Wireless Settings • Review of Basic Concepts: Random Variables, Exponential Distributions, Stochastic Processes • Simple Analytic Models • Birth-Death Processes • M/M/1 Queues • Circuit-Switched case: Erlang formula • Packet-based traffic models • Simulation Models • Basics: Discrete Event Simulation • Random Number Generation • Output Analysis • Summary
Exercises: • Analytic Models: Traffic measurements in a GPRS radio cell result in the following traffic model: voice calls arrive at Poisson rate 1call/min and have an average duration of 1.5 min. GPRS data sessions start at rate 1session/5min, have an average duration of 20min, and generate traffic with an averate rate of 10kb/sec using IP packets of 1500 byte size and CS-II. a) How many time-slots would have to be reserved to GSM voice calls to keep the call blocking probability below 1e-6? b) Compute the average RLC frame delay, if 4 GPRS time-slots are used for the data traffic (as simplification: use an M/M/1 queue on RLC layer, neglecting header overhead as well as the overhead of TBF assignments). [c) (optional): Develop a Markov model for a queueing model for packet switched traffic under the assumption that 6 time-slots are available in total (shared by voice and date) when voice traffic has preemptive priority over packet traffic. Compute the average queue-length for the RLC layer queue. ] • Simulations: Use the simulation program from last week to obtain blocking probabilities for GPRS sessions. Compute the 95% confidence intervals for these blocking probabilities via • A single simulation run, using binomial distributions • Independent replications and the normal approximation for the average blocking probability.
References Analytic Models • Cassandras, Lafortune, ’Introduction to Discrete Event Systems’, Chapts. 7 and 8, Kluwer, 1999. + more details inlecture ’Traffic analysis I’ (H. Schiøler, 8th Sem DIRS/NPM) Simulation models • Cassandras, Lafortune, ’Introduction to Discrete Event Systems’, Chapt. 10, Kluwer, 1999. • Heyman, Sobel (ed.), ‘Stochastic Models’, Chapt. 6 and 7, North-Holland,1990 + more details inlecture ’Discrete Event simulation’ (9th Sem DIRS/NPM)