# CS457 - System Performance Evaluation - Winter 2010

## Public Service Announcement

1. pdf available
2. Another pdf available.
3. Assignment 4

# General Markov Processes

### Solution method

1. Draw state transition diagram
2. Obtain balance condition equations: rate in equals rate out
• for every state of the system
• This defines steady state' as The probability of the system being in state i does not depend on time.'
3. Solve balance equations with normalizing equation
• \sum pn = 1
4. Determine performance metrics from pn

Simple in principle. May be complex in practice.

# Analytic Queueing Theory - Queueing Networks

Collection of interacting service providers.

One new concept:

• q_ij = P( job just finished at i will get immediate further processing at j ) 1 <= i,j <= M

## Operational Analysis

Very similar to what we did near the beginning of the course

• e.g., Little's law

### Open Networks in Steady State

Jobs enter the network and depart from it

1. Number of requests in a server is a random variable, N_i
2. External arrivals can appear anywhere.
• Average rate of external arrivals at server i, \gamma_i, is deterministic
• Actual arrivals are random
3. Extra destination for departures:
• q_i(M+1) = P( service is complete for a request immediately after service at i )

Definitions at server i

1. external arrivals \gamma_i
2. internal arrivals
3. total arrivals \lambda_i = \gamma_i + internal arrivals
4. throughput X_i = \lambda_i
• because of stability
5. total arrivals \lambda_i = \gamma_i + \sum_j X_j q_ji
• The second term is the internal arrivals
• Remember: job can come back to where it just finished.
• Therefore, X_i = \gamma_i + \sum_j X_j q_ji
6. conservation of requests
• \sum_i^M \lambda_i = \sum_i^M \gamma_i + \sum_i^M \sum_j^M \lambda_j q_ji
• \sum_i^M \lambda_i = external input + \sum_j^M \lambda_j (1 - q_j(M+1))
• \sum_i^M \lambda_i = external input + \sum_j^M \lambda_j - sum_j^M \lambda_j q_j(M+1))
• \sum_i^M \lambda_i = external input + \sum_j^M \lambda_j - external output
• \sum_i^M \gamma_i = sum_j^M \lambda_j q_j(M+1))

#### Solution procedure

1. Write balance equations
• These are different balance equations.
2. Solve balance equations
3. Derive performance metrics

#### Utilization

U_i = \lambda_i s_i

• s_i, the mean service time, is a parameter assumed to be known
• s_i = 1 / \mu_i

#### Throughput

X - rate of jobs departing from the network

1. X = \sum \gamma_i because the network is stable
2. X = \sum \lambda_i q_i(M+1)
3. Not too hard to prove that these are the same

# Closed Networks in Steady State

1. No external arrivals.
• \gamma_i = 0
2. No departures
3. Number of jobs in the system, N, is constant
• stability is assured

## A. Single server per service centre

1. Total arrival rate

• \lambda_i = sum_j \lambda_j q_ji
• \sum_i q_ji = 1
• \sum_i \lambda_i = \aum_i sum_j \lambda_j q_ji = \sum_j \lambda_j
• Balance equations give M equations, which are not linearly independent
• Can only solve for ratios of \lambda_i
• Because the system is closed the number of requests is conserved

Example: pdf

2. Utilization

• Can only solve for ratios of U_i
• U_i / U_j = (\lanbda_i / \lambda_j) * s_i/s_j: the factor in parenthesis is known

3. Throughput

Arbitrary decision

• Cut the system somewhere, e.g. at the arrival of server i
• Then X is the rate of jobs passing across the cut

## B. Interactive System in Steady State

1. Call the set of terminals server 0

2. Throughput

Cut at entrance to terminals: X = \lambda_0

• If we cut the network into two disjoint pieces the average flow across the cut is zero.

Define visit ratio: number of visits to server i per request

• V_i = \lambda_i / X = \lambda_i / \lambda_0
• This is what we solve for.

3. Utilization

U_i = \lambda_i s_i = X V_i s_i = X D_i

• D_i = X s_i is the demand per request at server i
• demand measured in seconds
• units of D_i is seconds per request
• units of X is requests per second
• U is unitless
• U_i / U_j = D_i / D_j

4. Upper bound on throughput

D = \sum D_i

X(n): throughput with N users

• X(1) = 1 / (D + Z)
• X(N) <= N/(Z + D) : equality when there is no contention

5. Bottleneck analysis

1. b - server with highest demand
2. D_b = max{D_i} = D_max
3. U_b = X D_b <= 1
4. X <= 1/D_max

Therefore, X(N) <= min( 1/D_max, N / (D+Z) )

6. Lower bound on mean response time

1. Treat entire system as one server. Then R(N) = N/X - Z
2. R(N) >= D = sum_i D_i because X(N) <= N / (D+Z)
3. X(N) <= 1 / D_max, so that R(N) <= ND_max - Z

.