Presentation is loading. Please wait.

Presentation is loading. Please wait.

Methods of Stochastic Performance Analysis Perry Lea Hewlett Packard - Core Technology Laboratory.

Similar presentations

Presentation on theme: "Methods of Stochastic Performance Analysis Perry Lea Hewlett Packard - Core Technology Laboratory."— Presentation transcript:

1 Methods of Stochastic Performance Analysis Perry Lea Hewlett Packard - Core Technology Laboratory

2 Why Am I Talking About This Currently Im an ES working on future architectures and use these techniques with frequency to aid my design decisions Used these techniques to discover good designs Used these techniques to stop bad designs

3 Who Uses This Stuff System Architects / Engineers / Scientists Transportation systems Industrial and production analysis Behavorialists Communication systems and of course the general engineering community.

4 Typical Problems Addressed How fast will it print or copy? How do we distribute various tasks to various processors? What is the bus contention? Will we meet the real-time requirements?

5 What Is Performance Analysis (Jain Book Definition) Specifying performance requirements Comparing 2 or more systems Determining optimal/achievable parameters Finding bottlenecks Capacity planning Workload planning This talk is about: Stochastic Analysis Operational Analysis Discrete Event Simulation

6 The Stochastic Process Anything that is observed as a random process in time is a stochastic process. A stochastic process can be discrete (good for CS folks) or continuous (good for signals folks) If a future state of your system is not dependent on a previous state, the process can be called a Markov process. This is good because Markov processes are easy to model. Memoryless property If the arrival times of data to the different states are independent of each other – AND – the arrival times have the same distribution (hopefully exponentially distributed), then you can describe the process as a Poisson process. IID: Independent and identically distributed

7 Queue Rules the interarrival rate, time between 2 successive arrivals (Random Variable) the arrival rate s the service time the mean service rate per server, or 1/E[s] n the number of jobs in the system r the response time (includes time waiting in queue and actual cpu time) w the waiting time

8 Some Math = arrival rate (going in) = service rate (going out) is the traffic intensity or density The probability that there are n tasks waiting in the queue is:

9 Birth Death Process The Birth – Death Process Each state represents the queue depth 012j-1jj+1

10 Queues Kendall Notation A/B/C/D/E A = arrival process B = service process C = number of servers D = maximum number of jobs for which the queue has room. E = maximum number of jobs being simulated Types of processes M = (Memoryless) Poisson arrival process or exponentially distributed service time D = deterministic arrival process (each job has the same service time) Aha! Heres the deterministic part of all this. G = general distribution arrival process E = Erlang distribution Hyperexponential

11 Typical Queues M/M/1 Jobs arrive according to a Poisson process Service time of each job is exponentially distributed. There is one server There is infinite waiting room and no limit to the number of jobs M/G/1 Jobs arrive according to a Poisson process Service time is generally distributed (no restriction of the form the distribution may take) There is one server There is infinite waiting room and no limit to the number of jobs Others M/D/1 (D denotes each jobs take the same amount of time to be service) M/G/ (Infinite amount of servers available) G/M/1 G/G/m

12 M/M/1 Model Analysis Traffic Intensity (Utilization): Condition of Stability: Probability queue empty: p 0 = 1 – Probability queue = n: p n = (1- ) n * Mean queue depth: E[n]= - Mean waiting time: E[w]= Mean response time (E[n] = /E[r]) * E[r] = Other models have similar equations (See Jain Book)

13 M/M/1 Example A printer processes 125 packets per second and takes 2 ms to process them. When will the printer overflow with 13 buffers? How many buffers are needed to keep packet loss below one in a million? Arrival rate = 125 pps Service rate = 1/.002 = 500 pps Utilization = 0.25 or 25% Probability of n packets in gateway = n = 0.75(0.25) n Mean number of packets in gateway = = 0.33 Probability of buffer overflow -> P(more than 13 packets) = 15 packets in 1 billion To limit the probability loss to n <= n > log(10 -6 ) / log(0.25) = 9.96 buffers

14 Operational Laws (Denning and Buzen) (Simple formulas for finite observable time) If you observe a system for a finite amount of time, you can skip the distributions of service and interarrival times. You can use a set of simple (directly measurable) equations to predict performance Arrival Rate : # arrivals / time : A i /T Throughput : # completions / time : C i /T Busy Time : B i Mean Service Time : total time served / # served : B i / C i Utilization Law : U = B i /T (T is the observed time) Forced Flow Law : system throughput : X = C 0 /T Littles Law : mean # in device = arrival rate * mean time Q i = i *R i Bottleneck Identification : The device with the largest D i

15 Queuing Networks Open Network Jackson product-form solution Closed Network Buzen convolution algorithms

16 Large Queuing Networks Large systems can be modeled as a collection of queues. Bounding algorithms Find upper and lower bounds only. Mean value analysis (MVA) Iterative method to find response times for each device in the system. This will sum to the system response time and overall queue lengths. Convolution algorithms Array convolutions Can answer more detailed questions than MVA, i.e. are 2 IO devices busy at the same time? For large networks, we use software simulators

17 Discrete Event Simulations Why use a simulator? Hard to build analytic models for: Virtual memory Resource sharing (CPU and IO) Mutual exclusion to resources Bulk packet arrivals (self similarity) Non-exponential service times Can run many variants and perturbations of a system Can build stochastic and deterministic models and intermix them. To automate the mathematical process Allows you to study the problem from many angles with ease compared to analytical models

18 Modeling Tips Understand the architecture in detail first Decide on how detailed your model should be The more detailed the more time, and possibly the more bugs you will introduce you dont want to build the final product. Do you need to model the whole system, or just a part? Get the abstraction defined before you start!! Chose the right tool and language Verify and test the models State what the goal of the model is, know when to stop Dont let mysterious results pass – understand them. Review the model design – like any other piece of code.

19 Good Simulation Tools Good site with links to many modeling tools C++SIM C Libraries Do it yourself standalone, no GUI, good for academics Opnet Modeler MIL3, mainly for network and data flow CSIM Lockheed Martin – good for computer and electronic systems Discrete and continuous models NT and Unix flavors SES Workbench A generic modeling tool GUI, object orientated, NT and Unix

20 Recommended Reading The Art of Computer Systems Performance Analysis, Raj Jain, Wiley & Sons 1991 Performance Modeling for Computer Architects, C. Krishna, IEEE Computer Society Press 1996 Telecommunication Networks, Mischa Shwartz, Addison Wesley 1987

Download ppt "Methods of Stochastic Performance Analysis Perry Lea Hewlett Packard - Core Technology Laboratory."

Similar presentations

Ads by Google