Introduction to Performance Engineering and Modeling

Similar documents
Introduction to Performance Engineering and Modeling

Introduction to Queuing Systems

Lecture 5: Performance Analysis I

Äriprotsesside modelleerimine ja automatiseerimine Loeng 9 Järjekorrateooria ja äriprotsessid. Enn Õunapuu

Queuing Systems. 1 Lecturer: Hawraa Sh. Modeling & Simulation- Lecture -4-21/10/2012

Äriprotsesside modelleerimine ja automatiseerimine Loeng 8 Järjekorrateooria ja äriprotsessid. Enn Õunapuu

GBA 334 Module 6 Lecture Notes Networks and Queues. These notes will cover network models and queuing theory.

Lecture 7 Quantitative Process Analysis II

UNIT 4: QUEUEING MODELS

Read Chapter 4 of Kurose-Ross

QUEUING SYSTEM. Yetunde Folajimi, PhD

TELCOM 2130 Queueing Theory. David Tipper Associate Professor Graduate Telecommunications and Networking Program. University of Pittsburgh

Fundamentals of Queueing Models

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Why is scheduling so difficult?

Advanced Internet Technologies

Stochastic Processing Networks: What, Why and How? Ruth J. Williams University of California, San Diego

BANK ATM QUEUEING MODEL: A CASE STUDY Ashish Upadhayay* 1

Queueing Models. System Capacity the number of customers who are allowed to be in the system at any given time.

Teletraffic theory I: Queuing theory

Modeling and Simulation (An Introduction)

Numerical approach estimate

Table 9.1 Types of Scheduling

Resource Allocation and Queuing Theory

Queuing Networks Modeling Virtual Laboratory

Using Queuing theory the performance measures of cloud with infinite servers

DDSS: Dynamic Dedicated Servers Scheduling for Multi Priority Level Classes in Cloud Computing

Queuing Networks. Renato Lo Cigno. Simulation and Performance Evaluation Queuing Networks - Renato Lo Cigno 1

A Study of the Performance Tradeoffs of a Tape Archive

MODELS FOR QUEUING SYSTEMS

ETSN01 Exam Solutions

An Efficient Queuing Model for Resource Sharing in Cloud Computing

M/G/c/K PERFORMANCE MODELS

Queueing Networks. Lund University /

Two-Heterogeneous Server Markovian Queueing Model with Discouraged Arrivals, Reneging and Retention of Reneged Customers

Calculating Call Blocking and Utilization for Communication Satellites that Use Dynamic Resource Allocation

Teletraffic theory (for beginners)

Week 7: Traffic Models and QoS

Markov Chains and Multiaccess Protocols: An. Introduction

Small verse Large. The Performance Tester Paradox. Copyright 1202Performance

Intermediate Production Storage Dimensioning Using Occupancy-dependent Key Performance Indicators

Unit 2 Packet Switching Networks - II

Quality of Service in Telecommunication Networks

Introduction to Real-Time Communications. Real-Time and Embedded Systems (M) Lecture 15

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

Cover sheet for Assignment 3

Introduction to the course

Performance Evaluation of Scheduling Mechanisms for Broadband Networks

ON NEW STRATEGY FOR PRIORITISING THE SELECTED FLOW IN QUEUING SYSTEM

Call Admission Control in IP networks with QoS support

Resource allocation in networks. Resource Allocation in Networks. Resource allocation

ROORKEE COLLEGE OF ENGINEERING

PARALLEL ALGORITHMS FOR IP SWITCHERS/ROUTERS

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Lecture 22: Buffering & Scheduling. CSE 123: Computer Networks Alex C. Snoeren

Simulation Studies of the Basic Packet Routing Problem

Resource Allocation Strategies for Multiple Job Classes

TDDD82 Secure Mobile Systems Lecture 6: Quality of Service

Mean Value Analysis and Related Techniques

Lecture 14: M/G/1 Queueing System with Priority

Analytic Performance Models for Bounded Queueing Systems

Simulation. Outline. Common Mistakes in Simulation (3 of 4) Common Mistakes in Simulation (2 of 4) Performance Modeling Lecture #8

Airside Congestion. Airside Congestion

This formula shows that partitioning the network decreases the total traffic if 1 N R (1 + p) < N R p < 1, i.e., if not all the packets have to go

Network Support for Multimedia

Module 7:Application of stochastic processes in queueing theory Lecture 29:Application of stochastic processes in Queueing Theory

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

Scheduling Algorithms to Minimize Session Delays

Wireless Multicast: Theory and Approaches

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Building and evaluating network simulation systems

Performance Study of a QoS scheduling algorithm over wireless networks

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Scheduling

Volume 5, No. 2, May -June, 2013, ISSN

Review. EECS 252 Graduate Computer Architecture. Lec 18 Storage. Introduction to Queueing Theory. Deriving Little s Law

Web application performance

Data Network Protocol Analysis & Simulation

Program for Modelling Queuing Systems in Transport

Lecture 24: Scheduling and QoS

Multi-threaded, discrete event simulation of distributed computing systems

Process- Concept &Process Scheduling OPERATING SYSTEMS

A Rant on Queues. Van Jacobson. July 26, MIT Lincoln Labs Lexington, MA

Staffing and Scheduling in Multiskill and Blend Call Centers

Impact of Source Counter on Routing Performance in Resource Constrained DTNs

CS533 Modeling and Performance Evaluation of Network and Computer Systems

Lecture Little s Law Flux Queueing Theory Simulation Definition. CMPSCI 691ST Systems Fall 2011

User Based Call Admission Control Policies for Cellular Mobile Systems: A Survey

Time-Step Network Simulation

Modeling Improved Low Latency Queueing Scheduling Scheme for Mobile Ad Hoc Networks

Lecture 14: Congestion Control"

Router Design: Table Lookups and Packet Scheduling EECS 122: Lecture 13

Optimizing the Queueing System of a Fast Food Restaurant: A Case Study of Ostrich Bakery

Model suitable for virtual circuit networks

10. Network dimensioning

CS533 Modeling and Performance Evaluation of Network and Computer Systems

Congestion Control in Communication Networks

Digital Communication Networks

Network Performance Analysis

CNCL: Contents. Extra material (1)

Traffic theory for the Internet and the future Internet

Transcription:

Introduction to Performance Engineering and Modeling Dr. Michele Mazzucco Software Engineering Group Michele.Mazzucco@ut.ee http://math.ut.ee/~mazzucco

What is Performance Engineering? Whether you design, build, test, maintain, or manage applications, you need to manage performance Performance is a make or break quality for software If you don t know your performance objectives, you are unlikely to meet them Performance affects different roles in different ways, e.g. As an architect: balance performance and scalability As a developer: is the system optimized enough? As a tester: validate whether the system supports the expected workload As a system administrator: is the system meeting its performance goals? Performance engineering includes roles, skills, activities, practices and tools aiming at ensuring that performance objectives are met 2

Why to Model Performance? (1) Performance failures cost the software industry millions of dollars every year. They include 1. Increased operational costs 2. Increased development costs 3. Increased hardware costs 4. Canceled projects 5. Damaged customers relationships 6. Reduced competiveness, and 7. Lost income 3

Why to Model Performance? (2) Performance is about risk management You have to decide how important performance is to the success of your system or application Waiting times increase as the system gets more and more congested. Need to understand how congestion affects performance! Different frameworks exists to model performance I will focus on Queuing Theory 4

A queue A long queue A priority queue 5

A queue Queuing theory provides probabilistic analysis of these queues, e.g. Average length Average waiting time Probability that the queue is at a certain length Probability that a job will have to queue A long queue A priority queue 6

A queue Example of Priority Queue Queuing theory provides probabilistic analysis of these queues, e.g. An electrical utility company uses six customer service representatives (CSRs) at its call center to handle telephone calls and inquiries from its top 350 business customers. The next tier of 700 business customers is also handled by six CSRs. Based on the Average length customer s code, the call center routes business customers to different queues Average waiting time and CSRs. Probability that the queue is at a certain length A manager at the utility explains: We don t ignore anyone, but our biggest customers certainly get more attention than the rest. Probability that a job will have to queue A long queue A priority queue 7

Applications of Queuing Theory Telecommunications (e.g., public switched telephone network) Traffic control, transport, logistics Health services (e.g., control of hospital bed assignments) Airport traffic, airline ticket sales Customer service, call centers Layout of manufacturing systems and Modeling computer systems performance 8

Example Application of Queuing Theory Traffic Lights How do we have to regulate traffic lights such that the waiting times are acceptable? 9

Example Application of Queuing Theory The Food Store How long do customers have to wait at the checkouts? What happens with the waiting time during peak hours? Are there enough checkouts? 10

Example Application of Queuing Theory The Post Office In a post office there are counters specialized in e.g. stamps, packages, financial transactions, etc. Are there enough counters? Separate queues or one common queue in front of counters with the same specialization? 11

Example Application of Queuing Theory The Call Center Questions by phone, regarding insurance conditions, are handled by a call center. This call center has a team structure, where each team helps customers from a specific region only. How long do customers have to wait before an operator becomes available? Is the number of incoming telephone lines enough? Are there enough operators? Pooling teams? 12

Why is Queuing Analysis important? Capacity problems are very common in industry and one of the main drivers of process redesign Need to balance the cost of increased capacity against the gains of increased productivity and service Queuing and waiting time analysis is particularly important in service systems Large costs of waiting and of lost sales due to waiting Prototype Example Hospital s ER Patients arrive by ambulance or by their own One doctor is always on duty More and more patients seek help longer waiting times Question: Shall we add another doctor? 13

A Cost/Capacity Tradeoff Model Cost Total cost Cost of service Cost of waiting Process capacity 14

Components of a Queuing System (1) Input Source The Queuing System Calling Population Jobs Queue Service Mechanism Served Jobs leave the system Arrival Process Queue Configuration Queue Discipline Service Process 15

Components of a Queuing System (2) The calling population The population from which customers/jobs originate The size can be finite or infinite (the latter is most common) Can be homogeneous (i.e., only one type of customers/ jobs) or heterogeneous (i.e., several different kinds of customers/jobs) The Arrival Process Determines how, when and where customers (jobs) arrive to the system An important characteristic is the distribution of the inter arrival intervals Denote by λ the rate at which jobs enter the system (e.g., 1 job/6 secs.) 1/λ is the average interval between successive job arrivals (e.g., 6 secs.) 16

Components of a Queuing System (3) The queue configuration Specifies the number of queues Single or multiple lines to a number of service stations Their effect on customer behavior Balking, reneging and jockeying Their maximum size (# of jobs the queue can hold) 17

Example of Possible Configurations Multiple Queues Single Queue Servers Servers 18

Example of Possible Configurations Multiple Queues 1. The provided service can be Servers differentiated 2. Labor specialization possible 3. Customers have more flexibility 4. Balking behavior may be deterred Single Queue 1. Guarantees fairness Servers FIFO applied to all arrivals 2. No customer anxiety regarding choice of queue 3. The most efficient set up for minimizing time in the queue 4. Jockeying (line switching) is avoided 19

Components of a Queuing System (4) The Service Mechanism Can involve one or more servers The size of the job is its service requirement The average service rate (e.g., 1 / job size) is denoted as μ The queue discipline Specifies the order in which jobs will be served Most commonly used principle is FIFO Other rules are, for example, PS, LIFO, SJF, Can entail prioritization based on customer type 20

Kendal Notation Six parameters in shorthand First three typically used, unless specified 1. Arrival Distribution Probability of a new job arrives in time t 2. Service Distribution Probability distribution job is serviced in time t 3. Number of servers 4. Total Capacity (infinite if not specified) 5. Population Size (infinite) 6. Service Discipline (FCFS/FIFO) 21

Kendal Notation Examples M/M/1 Exponential arrivals and service, 1 server, infinite capacity and population, FCFS (FIFO) M/M/n Same as before, but n servers G/G/3/20/1500/SJF General arrival and service distributions, 3 servers, 17 queue slots (20 3), 1500 total jobs, Shortest Job First 22

Little s Law The average number of customers in a stable system is equal to the average arrival rate multiplied by the average time a customer spends in the system, L = λ W, where L: average number of jobs in the system λ: arrival rate W: average response time (time in the system) Examples: 1. On rainy days, streets and highways are more crowded 2. Fast food restaurants need a smaller dining room than regular restaurants with the same customer arrival rate 23

Example using Little s Law (1) Amusement park People arrive, spend time at various sites, and leave They pay $1 per unit time in the park The rate at which the park earns is $L per unit time The rate at which people pay is $λw per unit time Over a long horizon Rate of park earnings = Rate of people s payment, or L = λ W 24

Example using Little s law (2) There are 120 cars in front of the Lincoln Tunnel 32 cars/minute depart over a period where there are no cars at the start or end of the tunnel (e.g. security checks) What is average time required to go through the tunnel? W = L / λ = 120/32 = 3.75 minutes 25

Load, Stability and Steady State A queueing system is stable if arrival rate < system capacity For a single queue, the ratio arrival rate / system capacity is called utilization (or load ), and is denoted as ρ (ρ=λ/μ) It describes the fraction of time the facility is used As λ increases, the waiting time increases As μ increases, the waiting time decreases If there is 1 server, we require λ μ (we assume λ < μ, i.e. ρ < 1) What happens if λ > μ? The system is unstable, and either the queue size grows unbound, or jobs get dropped! Stable systems with time stationary arrival traffic approach a steady state (statistical equilibrium) 26

Utilization Factor Consider an M/M/1 queue with arrival rate λ and service rate μ λ = expected demand per unit time μ = expected capacity per unit time Similarly, if there are n servers in parallel, i.e., an M/M/n queue, the expected capacity is nμ! = Capacity Demand Available Capacity = " n! µ 27

Steady State Steady State condition Enough time has passed for the system state to be independent of the initial state as well as the elapsed time The probability distribution of the state of the system remains the same over time (i.e., it is stationary) Transient condition Prevalent when a queuing system has recently begun operations The state of the system is greatly affected by the initial state and by the time elapsed since operations started The probability distribution of the state of the system changes with time Queuing Theory analyzes steady state behavior 28

Transient VS Steady State 29

Delay is Caused by Job Interference Arrival Times 1 2 3 4 Arrival Times 1 2 3 4 Departure Times 1 2 3 4 Time Deterministic traffic 1 2 3 4 Departure Times Variable but spaced apart traffic If arrivals are regular or sufficiently spaced apart, no queuing delay occurs 30 Time

Burstiness Causes Interference Queuing results from variability in service times and/or interarrival intervals 1 2 3 4 1 2 3 4 Time Bursty Traffic Queuing Delays Note that departures are less bursty than arrivals 31

Burstiness Example Different Burstiness Levels at Same Arrival Rate Source: Fei Xue and S. J. Ben Yoo, UCDavis, On the Generation and Shaping Self-similar Traffic in Optical Packet-switched Networks, OPNETWORK 32 2002

Job Size Variation Causes Interference Time Queuing Delays Deterministic arrivals, variable job sizes 33

High Utilization Exacerbates Interference Time Queuing Delays The queuing probability increases as the load increases 34

The Poisson Process The standard assumption in many queuing models is that the arrival process is Poisson Poisson Process: the times between arrivals are independent, identically distributed and exponential P (arrival < t) = 1 e λt Key property Memoryless: the past state does not help to predict the future The fact that a certain event has not happened yet tells us nothing about how much longer it will take before it does happen e.g., P(X > 40 X >= 30) = P (X > 10) 35

Birth and Death Processes (1) The foundation of many of the most commonly used queuing models Birth equivalent to the arrival of a customer or job Death equivalent to the departure of a served customer or job Assumptions 1. Given N(t)=n, The time until the next birth (T B ) is exponentially distributed with parameter λ n (customers arrive according to a Po process) The remaining service time (T D ) is exponentially distributed with parameter µ n 2. T B & T D are mutually independent stochastic variables and state transitions occur through exactly one Birth (n n+1), or one Death (n n 1) 36

Birth and Death Processes (2) Rate diagram Excellent tool for describing the mechanics of a Birthand Death process λ 0 λ 1 λ n 1 λ n 0 1 2 n 1 n n+1 µ 1 µ 2 µ n µ n+1 n = State n, i.e., the case of n customers/jobs in the system 37

Steady State Analysis of B D Processes (1) In steady state the following balance equation must hold for every state n (proved via differential equations) Rate In = Rate Out, i.e., Average entrance rate = Average departure rate Also, the probability of being in one of the states must equal to 1 (normalizing equation)! " i=0 p i =1 38

Steady State Analysis of B D Processes (2) State Balance Equation 0 1 n '! Normalization : p i = p 0 1+! 0 +! 0! 1 +! 0! 1! 2 $ ( # +! & =1 " µ 1 µ 1 µ 2 µ 1 µ 2 µ 3 % i=0 C 0 C 2 39

The M/M/1 Queue (1) Single server serving jobs in a FIFO manner M stands for Markovian M/M/1 stands for Poisson arrival process M/M/1 stands for exponentially distributed service times Each job must wait for all jobs found in the system to complete, before being served Departure Time = Arrival Time + Workload Found in the System + Service time 40

The M/M/1 Queue (2) By solving the balance equations we obtain the steady state probability of the number of jobs in the system p j = ρ j (1 ρ) Other performance measures L = ρ / (1 ρ) W = 1 / (μ λ) Avg. no. of jobs in the system 41 100 90 80 70 60 50 40 30 20 10 0 Number of jobs in the system 0 0.2 0.4 0.6 0.8 1 Load, ρ

Example 1: How Delay Scales with Occupancy and delay formulas System capacity ρ = λ/µ L = ρ/(1 ρ) W = 1/(µ λ) Suppose that we increase both λ and µ by a factor of k What happens to L? And to W? 1. λ =0.8 and µ = 1 sec. => ρ = 0.8 L = 0.8/0.2 = 4, W = 1 / 0.2 = 5 sec. λ =1.6 and µ = 2 => ρ = 0.8 L = 0.8/0.2 = 4, W = 1 / 0.4 = 2.5 sec. K = 2 Why? Because by speeding up arrivals by factor of k and speeding up service times by a factor of k, we re basically just speeding up our clock speed by a factor of k 42

Example 2 Guaranteeing QoS via Question What is the maximum allowable λ, given that 1/μ=4 minutes and the average waiting time must be less than 8 minutes? W = service time + waiting time < 4 + 8 = 12 minutes W = 1/(µ λ) = 1 / (μ λ) < 12 (μ λ) > 1/12 λ < μ 1/12 = (3 1) / 12 λ < 2/12 = 1/6 jobs/minute Proof Traffic Shaping W = 1/ (1/4 1/6) = 1 / (0.25 0.16667) = 12 minutes, or ρ = 1/6 4 = 2/3 0.67 => L = 0.67/0.33 2 => W = 2 6 = 12 min. 43

Multi Servers Queues Multiple jobs are served simultaneously on multiple servers Head of the line service: jobs wait in a FIFO queue, and when a server becomes free, the first job goes into service "! " Queue Service... 44 "

The M/M/n queue Generalization of the M/M/1 queue λ λ λ λ λ 0 1 2 n 2 n 1 n n+1 µ 2µ (n 2)µ (n 1)µ nµ nµ The solution of the balance equations and the associated formulae for computing the performance measures are more complicated than in the M/M/1 case 45

Example 1 Patients arrive according to a Poisson process with rate λ = 2 patients per hour The service time (e.g., the time it takes a doctor to visit/ treat a patient) is exponentially distributed with mean 1/ μ = 20 minutes The ER can be modeled as an M/M/n queue where n=no. of doctors Questions Currently only 1 doctor is on duty. Shall we add another one? How is the system s performance affected by an increase in service capacity (e.g., more doctors)? 46

Example 1 Summary of results Interpretation To be in the queue = to be in the waiting room To be in the system = to be in the ER (waiting or under treatment) Characteristic One doctor (n=1) Two doctors (n=2) ρ 2/3 1/3 p 0 1/3 1/2 (1-p 0 ) 2/3 1/2 p 1 2/9 1/3 Lq 4/3 patients 1/12 patients L 2 patients 3/4 patients w 2/3 h = 40 minutes 1/24 h = 2.5 minutes W 1 h 3/8 h = 22.5 minutes 47

The arrival rate is λ Example 2 (1) The total service rate is 2μ => stability condition ρ = λ/μ < 2 (a) M/M/1 Queue (b) M/M/2 Queue (c) Two M/M/1 Queues! 2"! " "!/2 "!/2 " Which configuration is better? The metric of interest if L (avg. no. of jobs) 48

Example 2 (2) a) M/M/1 queue with offered load = ρ/2 L a = ρ/(2 ρ) b) M/M/2 queue L b = 4ρ / [(2 ρ) (2 + ρ)] c) 2 independent M/M/1 queues The offered load at each queue is ρ/2 L c = 2 [ρ / (2 ρ)] Which configuration is better? 49

Example 2 (3) a. M/M/1: L a = ρ/(2 ρ), b. M/M/2: L b = 4p / [(2 ρ) (2 + ρ)], or c. 2 M/M/1: L c = 2 [ρ / (2 ρ)]? Set ρ=1, hence we obtain 1 < 4/3 < 2, i.e. L a < L b < L c Why? Because the processing power of an n sever system is fully utilized ONLY when all servers are busy, which requires at least n jobs in the M/M/n queue, and at least n non empty queues in system (c) 50

The M/M/n/n Queue (1) A M/M/n system with no queue If all servers are busy, jobs are lost! Examples A waiting room with limited capacity (e.g., the hospital s ER) A telephone system which can handle at most n calls simultaneously The M/M/n/n queue is always stable, no matter what the offered load is! 51

The M/M/n/n Queue (2) The state diagram has exactly n states λ λ λ λ λ 0 1 2 n 1 n µ 2µ 3µ (n 1)µ nµ The general expressions for the steady state probabilities, waiting times, queue lengths etc. are obtained through the balance equations as before (Rate In = Rate Out; for every state) The key question for M/M/n/n queues is what is the blocking probability?, e.g., what is the fraction of jobs that are lost? 52

The M/M/n/n Queue (3) Is the blocking probability affected by n? 0.5 n=1 Blocking probability, p n 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Load, ρ 53

The M/M/n/n Queue (3) Is the blocking probability affected by n? Blocking probability, p n 0.5 0.4 0.3 0.2 0.1 n=1 n=10 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 54 Load, ρ

The M/M/n/n Queue (3) Is the blocking probability affected by n? Blocking probability, p n 0.5 0.4 0.3 0.2 0.1 n=1 n=10 n=100 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 55 Load, ρ

The M/M/n/n Queue (3) Is the blocking probability affected by n? Blocking probability, p n 0.5 0.4 0.3 0.2 0.1 n=1 n=10 n=100 n=1,000 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 56 Load, ρ

The M/M/n/n Queue (3) Is the blocking probability affected by n? Blocking probability, p n 0.5 0.4 0.3 0.2 0.1 n=1 n=10 n=100 n=1,000 n=10,000 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 57 Load, ρ

Queuing Modeling and System Design (1) Design of queuing systems usually involve some kind of capacity decision The number of service stations The number of servers per station The service time for individual servers The corresponding decision variables are λ, n and µ Examples: The number of doctors in a hospital, The number of exits and cashiers in a supermarket, The choice of machine type at a new investment decision, The localization of toilets in a new building, etc 58

Queuing Modeling and System Design (2) Two fundamental questions when designing (queuing) systems Which service level should we aim for? How much capacity should we acquire? The cost of increased capacity must be balanced against the cost reduction due to shorter waiting time Specify a waiting cost or a shortage cost accruing when customers have to wait for service or Specify an acceptable service level and minimize the capacity under this condition The shortage or waiting cost rate is situation dependent and often difficult to quantify Should reflect the monetary impact a delay has on the 59 organization where the queuing system resides

Computer Procurement (1) A university is about to lease a super computer Two alternatives are available The M computer which is more expensive to lease but also faster The C computer which is cheaper but slower Processing times and times between job arrivals are exponential M/M/1 model λ = 20 jobs per day µm = 30 jobs per day, µc = 25 jobs per day The leasing and waiting costs: Leasing price: CM = $500 per day, CC = $350 per day The waiting cost per job and time unit job is estimated to $50 per job and day Question: Which computer should the university choose in order to minimize the expected total cost? 60

Computer Procurement (2) Settings λ= 20 jobs/day μ M = 30 jobs/day, μ C = 25 jobs/day C M = 500 $/day, C C = 350 $/day, WC = 50 $/job per day Results ρ= λ/μ => ρ M = 0.667, ρ C = 0.8 L = ρ / (1 ρ) => L M = 2, L C = 4 WC M = 100 $/day, WC C = 200 $/day Cost option 1 = 600 $/day, option 2 = 550 $/day 61

62

1800 1600 Large Small Holding cost = 40 $/day Total Cost ($/day) 1400 1200 1000 800 600 400 0 5 10 15 20 25 63 λ (jobs/day)

1800 1600 Large Small Holding cost = 50 $/day Total Cost ($/day) 1400 1200 1000 800 600 400 0 5 10 15 20 25 64 λ (jobs/day)

1800 1600 Large Small Holding cost = 60 $/day Total Cost ($/day) 1400 1200 1000 800 600 400 0 5 10 15 20 25 65 λ (jobs/day)

Resource Allocation for Power and Performance S servers n are running (S n) are switched off Users pay a charge proportional to the job size (unknown a priori) Each user pays c$ per unit time per server Running servers consume electricity, which costs r$/kwh If all servers are busy, further jobs are lost How to choose the best n? 66

QoS Provisioning via Resource Allocation + Admission Control Suppose we have a collection of servers providing a certain number of services How do we allocate the available resources in the most efficient way? Shall we accept the next incoming request? 1. For each accepted and completed job of type i, a user shall pay a charge of c i 2. The response time W i (or waiting time w i ) of an accepted job shall not exceed q i 3. For each job of type i whose response time (waiting time) 67 exceeds q i, the provider shall pay a penalty of r i

References (1) 1. Analytical Performance Modeling for Computer Systems, http://www.morganclaypool.com/doi/abs/10.2200/ S00282ED1V01Y201005CSL002 2. Call Center Mathematics, http://www.cs.vu.nl/~koole/ccmath/book.pdf 3. Introduction to Queueing Theory and Stochastic Teletraffic Models, http://www.ee.cityu.edu.hk/~zukerman/classnotes.pdf 4. Introduction to Queueing Theory and Mathematical Modelling, http://www.cs.auckland.ac.nz/courses/ compsci742s2c/lectures/handout n q.pdf 68

References (2) 5. M/M/n/K Queueing System, http://ingforum.haninge.kth.se/armin/ ALLA_KURSER/KOTEORI/EXER/repet5.pdf 6. Queueing Theory, http://www.win.tue.nl/~iadan/queueing.pdf 7. Teletraffic Engineering and Network Planning, http://oldwww.com.dtu.dk/teletraffic/handbook/ telenook.pdf 8. Grinstead and Snell s Introduction to Probability, http://www.math.dartmouth.edu/~prob/prob/ prob.pdf 69

Free Tools PDQ: Pretty Damn Quick, http://www.perfdynamics.com/tools/pdq.html The R Project for Statistical Computing, http://www.r project.org/ qnetworks a Queueing Networks analysis package for GNU Octave, http://www.moreno.marzolla.name/software/qnetworks/ Queueing simulation, http://www.stat.auckland.ac.nz/~stats255/qsim/qsim.html Java Modelling Tools, http://jmt.sourceforge.net/ A more complete list of the available tools can be found at http://web2.uwindsor.ca/math/hlynka/qsoft.html 70

Michele.Mazzucco@ut.ee http://math.ut.ee/~mazzucco 71