Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University

Slides:



Advertisements
Similar presentations
Introduction to Queuing Theory
Advertisements

Chapter Queueing Notation
Lab Assignment 1 COP 4600: Operating Systems Principles Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University of.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
System Performance & Scalability i206 Fall 2010 John Chuang.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Queuing Systems Chapter 17.
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
1 Queuing Theory 2 Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or.
Queueing Theory: Part I
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.
1 Multiple class queueing networks Mean Value Analysis - Open queueing networks - Closed queueing networks.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/28/20151.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer Performance.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Queuing Theory. Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or queue)
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.

Queuing Theory (Waiting Line Models)
Introduction to Queuing Theory
Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Queuing models Basic definitions, assumptions, and identities Operational laws Little’s law Queuing networks and Jackson’s theorem The importance of think.
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Introduction to Operations Research
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Structure of a Waiting Line System Queuing theory is the study of waiting lines Four characteristics of a queuing system: –The manner in which customers.
Introduction to Queueing Theory
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
IE 429, Parisay, January 2010 What you need to know from Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete,
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.
Lecture 3: 1 Introduction to Queuing Theory More interested in long term, steady state than in startup => Arrivals = Departures Little’s Law: Mean number.
1 Systems Analysis Methods Dr. Jerrell T. Stracener, SAE Fellow SMU EMIS 5300/7300 NTU SY-521-N NTU SY-521-N SMU EMIS 5300/7300 Queuing Modeling and Analysis.
Waiting Lines and Queuing Models. Queuing Theory  The study of the behavior of waiting lines Importance to business There is a tradeoff between faster.
CS433 Modeling and Simulation Lecture 12 Queueing Theory Dr. Anis Koubâa 03 May 2008 Al-Imam Mohammad Ibn Saud University.
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
yahoo.com SUT-System Level Performance Models yahoo.com SUT-System Level Performance Models8-1 chapter11 Single Queue Systems.
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...
CSCI1600: Embedded and Real Time Software Lecture 19: Queuing Theory Steven Reiss, Fall 2015.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
Internet Applications: Performance Metrics and performance-related concepts E0397 – Lecture 2 10/8/2010.
Chapter 6 Queueing Models
(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.
Queueing Fundamentals for Network Design Application ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
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.
Queuing Models.
Simple Queueing Theory: Page 5.1 CPE Systems Modelling & Simulation Techniques Topic 5: Simple Queueing Theory  Queueing Models  Kendall notation.
QUEUING THEORY 1.  - means the number of arrivals per second   - service rate of a device  T - mean service time for each arrival   = ( ) Utilization,
Queuing Theory Simulation & Modeling.
Managerial Decision Making Chapter 13 Queuing Models.
OPERATING SYSTEMS CS 3502 Fall 2017
Al-Imam Mohammad Ibn Saud University
Queueing Theory What is a queue? Examples of queues:
Queuing Theory Queuing Theory.
B.Ramamurthy Appendix A
Queueing Theory Carey Williamson Department of Computer Science
Queuing models Basic definitions, assumptions, and identities
Queuing models Basic definitions, assumptions, and identities
COMP60611 Fundamentals of Parallel and Distributed Systems
COMP60621 Designing for Parallelism
Carey Williamson Department of Computer Science University of Calgary
Waiting Line Models Waiting takes place in virtually every productive process or service. Since the time spent by people and things waiting in line is.
Presentation transcript:

Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University

Planning for Performance When building Server apps, what can we do to insure acceptable performance? How do we answer questions like these: –What happens to response time when utilization goes up? –How many concurrent requests can be handled before response time is unacceptable? –What is the effect of adding (or removing) another server?

Planning for Performance A number of approaches are possible: 1.Do an after-the-fact analysis based on actual values. (“let’s build something and see how it works!”) 2.Make a simple projection by scaling up from existing experience to the expected future environment. (“We expect double the number of users. So let’s double the processor speed and memory!”) 3.Develop an analytic model based on queuing theory. (subject of this lecture) 4.Program and run a simulation model. (this effort could be as big as the entire development effort!)

The Problem with Approach 2 The problem with this approach is that the behavior of most systems under a changing load is not what you might expect!

Queuing Analysis: Basic Entities Customers (tasks, requests, etc) –individual requests for service (e.g. a request for I/O, or a request by a customer in a bank, etc.) Queues –waiting areas where requests for service wait for server(s) (e.g. the ready queue of processes waiting for CPU, or the waiting room at a doctor's office). Servers –entities or resources that are capable of satisfying the service requests (e.g. CPU, disk, bank teller, etc.)

Queuing Analysis: Characterization Dispatching Discipline –When a server is done serving a customer, it must pick the next customer out of some queue. Algorithm used to do so is called the dispatching discipline. Examples are FCFS, FIFO, SJF, EDF, etc. Distribution of Arrivals –When do customers arrive? We will restrict our analysis to a Poisson process for the arrival of customers to the system. Distribution of Service Time –How long does it take a server to service a customer's request? The service time may be the same for all customers or, more realistically, the service time is likely to be variable.

Simplifying Assumptions Population –Assume that Requests for service are generated from an infinite population. WHY? So that the arrival of a request to the system does not influence "future" arrivals. Queue Size –Assume that queues have infinite capacity (unrealistic for many applications, but assume this for now). Queue Service discipline is FCFS

Queuing System Structure: Single Server

Single Queue, Multiple Servers

Multiple Single-server Queues

Queuing System Variables If the average time it takes a server to service a request is T s, then it follows that the average rate of service (if the server has an infinite supply of requests to work on) would be:  T s The utilization of the system, which is the ratio between the rate of arrivals and the rate of service is  Obviously, in the steady state, the rate at which requests are queued cannot exceed the rate at which the server is able to serve them! Thus, we have:  

Little’s Formulas The following two relationships are true of any "steady state" queuing system (i.e. a queuing system in equilibrium). r =  T r w =  T w In a queuing system, a customer's time is spent either waiting for service or getting service. T r = T w + T s Multiplying the above equation by the arrival rate  and applying Little's formula, we get: r = w +  T s = w +  Remember,  =  so  r  w + 

Notation for queuing systems M for Markovian (exponential) distribution D for Deterministic distribution G for General (arbitrary) distribution :Where A and B can be omitted if infinite omitted if infinite

The M/M/1 System Poisson Process output queue Exponential server

Understanding System Behavior To characterize the behavior of the system, we have to understand: –The frequency distribution of requests. In any given time period, how many new request enter the system? –The distribution of service times Does every request take equal time to process? (probably not).

Understanding Arrival of Requests Time -----> | | | | | | | | | | | | | | | | | t0 t1 t2.... tn In any one time period ti, some number of requests can arrive. The number that arrive is a random variable.

Arrivals follow a Poisson process a(t) = # of arrivals in time interval [0,t] Pr(a(t) = n) = e - t ( t) n /n!

Model for Interarrivals and Service times  Customers arrive at times t 0 < t 1 < Poisson distributed  The differences between consecutive arrivals are the interarrival times :  n = t n - t n-1  n in Poisson process with mean arrival rate, are exponentially distributed, Pr(  n  t) = 1 - e - t Service times are exponentially distributed, with mean s ervice rate  : Pr(S n  s) = 1 - e -  s

M/M/1 Performance Average number of customers in a M/M/1 System r =  Average number of customers waiting for service in a M/M/1 system w =    Average Time waiting in a M/M/1 queue T w = 

M/M/1 Performance Probability that the number of customers in the system = N Pr[R=N] =   Probability that the number of customers in the system  N Pr[R  N] =   i i = 0 N

Example Given –Arrival rate of 50 requests/sec –Service rate of 60 requests/sec Find –Utilization –Probability of having 10 requests in the system –How big should we make the queue?  Pr[r=12] =      Pr[r=50] =      Pr[r=100] =       So, it looks like 100 buffers will suffice (50 will not)

Example Continued What is the average in-queue wait time? T w =  msec And finally, what is the average response time (Tr) ? T r = T w + T s T s = 1/  msec T r = = 100 msec What happens if we increase service rate to 75/sec?

Example Continued Service rate is now 75, so  T w =  msec And finally, what is the average response time (Tr) ? T s = 1/  msec T r = = 40 msec!! We increased service rate by only 25% yet response time dropped by 60%!

If you want to know more … Queuing Analysis paper by William Stallings (recommended). ftp://shell.shore.net/members/w/s/ws/Support/QueuingAnalysis.pdf Tom Slater’s Queuing Theory Tutor Myron Hlynka's Queueing Theory Page