# CS457 - System Performance Evaluation - Winter 2008

• Operational Models pdf.

# Lecture 9 - Applying Little's Law

But before we go on to talk about measuring we will show two simple applications of Little's little formula.

### Little's Law (or Formula)

1. Picture of arrival and departure generating system load diagram
2. Area under system load is total response time: nR
3. Average load, Q, times time interval, L is total response time: QL = nR
4. n/L = X = throughput = \lambda = interarrival time.
5. Therefore Q = XR = \lambda R

#### Stability

Little's formula holds only if the system is stable, which is defined by U < 0

1. Infinite population of clients
• Is this actually possible? No, only in the limit.
• Only one possible distribution for interarrival time.

For a proof see this pdf.

• Demonstration: binomial -> Poisson -> exponential
2. Finite population of clients - think-time model
• client works (called thinking), then server works, then client works (called thinking), etc.
• I would call this workload model a blocking model.

### Applying Little's Formula in the Think-time Model

#### 1a. Goal

1. To understand Figure 3.3 in the textbook. (p. 38)
• Solid curve real, dashed curve idealized

Top figure

1. How throughput varies with load
2. Linear region
3. Saturation region
4. Fall-off region: not in idealization

Bottom figure

1. How response time varies with load
2. Constant region
3. Linear region
4. Goes to infinity at the end of the linear region: system is becoming unstable, only hand-waving in idealization

#### 1b. System Description

1. Finite population of clients in the think-time (blocking) model.

#### 3. Metrics

1. X - Throughput
2. R - average response time

#### 4/5. Parameters/Factors

1. Interarrival time

#### The Model Equations

As usual,

1. Interval of time, L
2. Number of arrivals, n

New

1. Number of users, N
2. Each user thinks before submitting the next request: average think time, Z.
3. Number of users thinking, nt <= N; number of users waiting on systems, ns <= N. Because both are bounded the system is stable
4. Average number of users in thinking, Nt. Average number of users waiting, Ns. Ns + Nt = N.

Apply Little's formula

1. Little's formula on the system: XR = Ns
2. Little's formula on the users: XZ = Nt
3. Therefore, X(R + Z) = N, which gives R = N/X - Z

Utilization

1. Divide response time, ri, into queueing time, wi, and service time si: ri = wi + si.
2. S is average serice time. S = (1/n) \sum si.
3. S <= R
4. The, by definition, utilization, U, is U = (1/L) \sum si = (nS) / L = XS = X \lambda.

Observations

Response Time

1. R >= S, equality when U < 1.
2. R = N/X - Z = (NS)/U - Z >= NS - Z, equality when U = 1

Throughput

1. U = XS <= 1, which implies X = U/S <= 1/S.
2. X(R + Z) = N, which implies X = N / (R + Z) >= N / (S + Z).

Now draw some pictures to see what's actually going on.