Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 38 ยท Basics and Little's Law

Performance Measures: L, Lq, W, Wq and Utilization

Define the standard queueing measures: number in system and queue, time in system and queue, utilization and throughput. Compute each from a simulated log.

When we analyze a queue we want a few numbers that summarize how well the system works. Customers care about how long they wait. Managers care about how busy the servers are and how long the line gets. This lesson names the standard measures so every later formula has a clear meaning.

The standard measures

Symbol Name Meaning
L Number in system Long-run average number of customers present (waiting plus in service)
Lq Number in queue Long-run average number waiting, not counting those in service
W Time in system Average time from arrival to departure, also called sojourn time
Wq Time in queue Average time spent waiting before service starts
ฯ Utilization Fraction of time a server is busy
ฮป Arrival rate Customers arriving per unit time
ฮผ Service rate Customers one busy server completes per unit time

Two simple identities hold in every stable system with FIFO or any non-anticipating discipline:

  • W = Wq + 1/ฮผ, because time in system is waiting time plus service time.
  • L = Lq + (average number in service). For one server the average number in service equals the busy fraction, so L = Lq + ฯ.

"Long-run average" means two kinds of average that agree in stable systems: the average over many customers, and the time-average of the count over a long period. Be careful which one a formula uses.

Computing the measures from a log

A real system produces a log: for each customer, an arrival time, a service start time and a departure time. From such a log you can compute every measure above. The helper below simulates a single server and returns that log. The simulation is just a stand-in for real data.

Python Measures from a customer log

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The throughput printed at the end is the departure rate. In a stable system with unlimited room it equals the arrival rate ฮป, because every arriving customer is eventually served.

Time averages of the counts

L and Lq are averages over time of the counts N(t) and Nq(t). To find them from a log, turn the log into events: +1 at each arrival, -1 at each departure. Between events the count is constant, so we add count ร— duration and divide by the total time.

Python Time-average counts

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The difference L - Lq is the average number in service, which for a single server equals the busy fraction ฯ. In the next lesson we link the count measures to the time measures with one beautifully general law.

Which measure answers which question?

  • "How long will I wait before someone helps me?" is Wq.
  • "How long until I am done?" is W.
  • "How big a waiting room do I need?" depends on Lq.
  • "Am I paying for idle servers?" is 1 - ฯ.
  • "What fraction of customers wait more than 5 minutes?" is not an average at all. It needs the distribution of the wait, which we study later.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A customer waits 6 minutes and is then served for 4 minutes. What is the time in system?

    Time in system is waiting time plus service time: 6 + 4 = 10.
  2. 2. For a single-server queue, which is true?

    The average number in service equals the busy fraction rho, so L = Lq + rho.
  3. 3. Which measure counts only customers who are waiting, not those being served?

    Lq is the average number in the queue; L includes those in service.
  4. 4. In a stable system with unlimited room, long-run throughput equals which quantity?

    Every arrival is eventually served, so the departure rate equals the arrival rate.

Summary

  • L, Lq count customers; W, Wq measure time; ฯ is the busy fraction.
  • W = Wq + 1/ฮผ and L = Lq + (mean number in service).
  • All of them can be computed from an event log, as time averages or customer averages.
  • Averages are not the whole story: tail probabilities need distributions.

Next: Little's Law