CS457 - System Performance Evaluation - Winter 2010
Public Service Announcement
- pdf available
- Another pdf available.
- Assignment 4
Lecture 33 - Queueing Networks: Operational Analysis
Very similar to what we did near the beginning of the course
- e.g., Little's law
- The important new idea is that where a request goes after receiving
service is no longer deterministic
Open Networks in Steady State
Jobs enter the network and depart from it
- Number of requests in a server is a random variable, N_i
- External arrivals can appear anywhere.
- Average rate of external arrivals at server i, \gamma_i, is
deterministic
- Actual arrivals are random
- Extra destination for departures:
- q_i(M+1) = P( service is complete for a request immediately after
service at i )
Definitions at server i
- external arrivals \gamma_i
- internal arrivals
- total arrivals \lambda_i = \gamma_i + internal arrivals
- throughput X_i = \lambda_i
- 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
- 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
- Write balance equations
- These are different balance equations.
- Solve balance equations
- 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
- X = \sum \gamma_i because the network is stable
- X = \sum \lambda_i q_i(M+1)
- Not too hard to prove that these are the same
- In fact, we did so just above
Closed Networks in Steady State
- No external arrivals.
- No departures
- Number of jobs in the system, N, is constant
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
- b - server with highest demand
- D_b = max{D_i} = D_max
- U_b = X D_b <= 1
- X <= 1/D_max
Therefore, X(N) <= min( 1/D_max, N / (D+Z) )
6. Lower bound on mean response time
- Treat entire system as one server. Then R(N) = N/X - Z
- R(N) >= D = sum_i D_i because X(N) <= N / (D+Z)
- X(N) <= 1 / D_max, so that R(N) <= ND_max - Z
Queueing Networks: Markov Analysis
Assumptions
- Service times (S_i = 1 / M_i) are exponentially distributed, with mean
s_i = 1 / m_i
- A product form solution exists: p(n_1, ..., n_M) = (1/G) {(r_1)^(n_1)
(r_2)^(n_2) (r_3)^(n_3)... (r_M)^(n_M) }
- (Open networks) Interarrival times (\Gamma_i) are exponentially
distributed with mean 1 / \gamma_i
- (Closed networks) Think times (\Gamma) are exponentially distributed
with mean 1 / \gamma
Solution Method
- Define states
- Usually (n_1, n_2, ..., n_M)
- Draw the state diagram
- Flow into p(n_1, ..., n_i, ..., n_M)
- external request to server i: p(n_1, ..., n_i - 1, ..., n_M)
\gamma_i
- Departure from system from server i: p(n_1, ..., n_i + 1, ...,
n_M) \mu_i * q_{i(M+1)}
- Departure from server j, arrival at server i: p(n_1, ..., n_i -
1, ..., n_j + 1, ..., n_M) * q_ji \mu_j
- Departure from server i, arrival at server i: p(n_1, ..., n_i,
..., n_M) * q_ii \mu_i
- Flow out of p(n_1, ..., n_i, ..., n_M)
- external request to server i: p(n_1, ..., n_i + 1, ..., n_M)
\gamma_i
- Departure from system from server i: p(n_1, ..., n_i - 1, ...,
n_M) \mu_i * q_{i(M+1)} \mu_i
- Departure from server i, arrival at server j: p(n_1, ..., n_i -
1, ..., n_j + 1, ..., n_M) * q_ij /mu_j
- Departure from server i, arrival at server i: p(n_1, ..., n_i,
..., n_M) * q_ii \mu_i
- Solve the balance equations
- Flow into p(n_1, ..., n_i, ..., n_M)
- \sum_i \gamma_i * p(p(n_1, ..., n_i - 1, ..., n_M)
- \sum_i \mu_i * q_{i(M+1) * p(n_1, ..., n_i + 1, ..., n_M)
- \sum_{i!=j} \mu_j * q_ji * p(n_1, ..., n_i - 1, ..., n_j + 1,
..., n_M)
- \mu_i * q_ii * p(n_1, ..., n_i, ..., n_M)
- Flow out of p(n_1, ..., n_i, ..., n_M)
- \sum_i { \gamma_i + \mu_i q_{i(M+1)} + \sum_{j!=i} /mu_j *
q_ij + \mu_i * q_ii } p(n_1, ..., n_i, ..., n_M)
= \sum_i { \gamma_i + \mu_i } p(n_1, ..., n_i, ..., n_M
- Verify product form solution
- p(n_1, ..., n_i + 1, ..., n_M) / p(n_1, ..., n_i, ..., n_M) =
r_i
- Therefore divide balance equations by p(n_1, ..., n_i, ...,
n_M)
- Flow in is
- \sum_i { \gamma_i /r_i + \mu_i * q_{i(M+1) r_i + \sum_{j!=i}
\mu_j * q_ji * {r_j / r_i} } + \mu_i q_ii
- Flow out is
- \sum_i { \gamma_i + \mu_i }
- Network is stable
- \sum_i \gamma_i = \sum_i \mu_i * q_i{M+1} r_i
- Evaluation of G
- \sum_{all n_i} (1/G) =
- Therefore, G = 1 / { (1-r_1)(1-r_2)...(1-r_M)
Return to: