Little's law

12 min read Original article ↗

From Wikipedia, the free encyclopedia

Theorem in queueing theory

In mathematical queueing theory, Little's law[a] is a theorem by John Little which states that the long-term average number of customers (L) in a stationary system is equal to the long-term average effective arrival rate (λ) multiplied by the average time that a customer spends in the system (W). Expressed algebraically the law is

L = λ W . {\displaystyle L=\lambda W.}

In plain terms, the law says that the average number of items in a system depends on both the rate at which items enter the system and the average time each item remains there. If items arrive faster, or if each item stays longer, the average number present increases proportionally.

The relationship is not influenced by the arrival process distribution, the service distribution, or the service order. Queues often arise when demand approaches service capacity, and their size is affected by service-time variability, arrival variability, and the service discipline.[3]

The result applies to any system, and particularly to systems within systems.[4] For example, in a bank branch the customer line might be one subsystem and each of the tellers another subsystem, and Little's result can be applied to each one as well as to the whole. The law holds under broad stability conditions: in common queueing applications, the relevant long-run averages must exist, the system boundary must be consistent, and the effective arrival rate must match the population whose time in system is being measured.[5]

In some cases it is possible not only to mathematically relate the average number in the system to the average wait but even to relate the entire probability distribution (and moments) of the number in the system to the wait.[6]

In a 1954 paper, Little's law was assumed true and used without proof.[7][8] The form L = λW was first published by Philip M. Morse where he challenged readers to find a situation where the relationship did not hold.[7][9] Little published a general proof of the law in 1961 under broad stationarity assumptions.[10] Little's proof was followed by a simpler version by Jewell[11] and another by Eilon.[12] Shaler Stidham published a different and more intuitive proof in 1972.[13][14]

The following worked examples illustrate Little's law in computing and retail contexts. In each case, the average rate and the average time in the system are measured over the same stable period and refer to the same population of items.[15][5]

Finding response time

[edit]

Imagine an application that had no easy way to measure response time. If the mean number in the system and the throughput are known, the average response time can be found using Little's law:

mean response time = mean number in system / mean throughput

For example, a queue-depth meter shows an average of nine jobs waiting to be serviced. Adding one for the job currently being processed gives an average of ten jobs in the system. Another meter shows a mean throughput of 50 per second. The mean response time is then 0.2 seconds = 10 / 50 per second.[5][16]

Customers in the store

[edit]

Imagine a small store with a single counter and an area for browsing, where only one person can be at the counter at a time, and no one leaves without buying something. So the system is:

entrance → browsing → counter → exit

If the rate at which people enter the store (called the arrival rate) is the rate at which they exit (called the exit rate), the system is stable. By contrast, an arrival rate exceeding an exit rate would represent an unstable system, where the number of waiting customers in the store would gradually increase towards infinity.

Little's Law tells us that the average number of customers in the store L, is the effective arrival rate λ, times the average time that a customer spends in the store W, or simply:

L = λ W {\displaystyle L=\lambda W}

Assume customers arrive at the rate of 10 per hour and stay an average of 0.5 hour. This means we should find the average number of customers in the store at any time to be 5.

L = 10 × 0.5 = 5 {\displaystyle L=10\times 0.5=5}

Now suppose the store is considering doing more advertising to raise the arrival rate to 20 per hour. The store must either be prepared to host an average of 10 occupants or must reduce the time each customer spends in the store to 0.25 hour. The store might achieve the latter by ringing up the bill faster or by adding more counters.

We can apply Little's Law to systems within the store. For example, consider the counter and its queue. Assume we notice that there are on average 2 customers in the queue and at the counter. We know the arrival rate is 10 per hour, so customers must be spending 0.2 hours on average checking out.

W = L λ = 2 10 = 0.2 {\displaystyle W={\frac {L}{\lambda }}={\frac {2}{10}}=0.2}

We can even apply Little's Law to the counter itself. The average number of people at the counter would be in the range (0, 1) since no more than one person can be at the counter at a time. In that case, the average number of people at the counter is also known as the utilisation of the counter.

However, because a store in reality generally has a limited amount of space, it can eventually become unstable. If the arrival rate is much greater than the exit rate, the store will eventually start to overflow, and thus any new arriving customers will simply be rejected (and forced to go somewhere else or try again later) until there is once again free space available in the store. This is also the difference between the arrival rate and the effective arrival rate, where the arrival rate roughly corresponds to the rate at which customers arrive at the store, whereas the effective arrival rate corresponds to the rate at which customers enter the store. In a system with infinite capacity and no loss, the two are equal.[15]

Manufacturing and work in process

[edit]

In manufacturing, Little's law connects work in process (WIP), throughput, and cycle time. If a production line completes 200 units per day and the average WIP is 100 units, then by the law each unit spends, on average,

W = L / λ = 100 / 200 = 0.5  days {\displaystyle W=L/\lambda =100/200=0.5{\text{ days}}}

in the line. Hopp and Spearman present this relation as one of the basic laws of factory operation, and use it both to estimate cycle time from observed inventory and to estimate WIP from observed throughput and lead time.[17]

Little's law requires that all three quantities describe the same system boundary and the same class of items.[15][5] A common error is to combine an arrival rate measured at one boundary with a waiting time measured at another.[5] A second error is to use the offered arrival rate rather than the effective throughput in systems where arrivals may be blocked, abandoned, rejected, or lost.[15][7] The law also describes long-run averages; finite-sample estimation requires statistical care because short transient periods and the treatment of customers present at the start or still in the system at the end of an observation interval can bias the estimate.[18]

Estimating parameters

[edit]

To use Little's law on data, formulas must be used to estimate the parameters, as the result does not necessarily directly apply over finite time intervals, due to problems like how to log customers already present at the start of the logging interval and those who have not yet departed when logging stops.[19]

Little's law is widely used in manufacturing to relate cycle time, throughput, and work in process. Hopp and Spearman's Factory Physics presents the law as one of the fundamental relations of operations management, used to compute lead time from observed production rate and inventory.[17]

Software-performance testers and capacity planners use Little's law to relate concurrency, throughput, and response time, and to detect when observed performance is constrained by the test harness rather than the system under test.[20][21]

Other applications include staffing emergency departments in hospitals.[15][22]

Lastly, an equivalent version of Little's law also applies in the fields of demography and population biology, although not referred to as "Little's Law".[23][24] For example, Cohen (2008)[25] explains that in a homogeneous stationary population without migration, P = B × e {\displaystyle P=B\times e} , where P {\displaystyle P} is the total population size, B {\displaystyle B} is the number of births per year, and e {\displaystyle e} is the life expectancy from birth. The formula P = B × e {\displaystyle P=B\times e} is thus directly equivalent to Little's law ( L = λ × W {\displaystyle L=\lambda \times W} ). However, biological populations tend to be dynamic and therefore more complicated to model accurately.[26]

Distributional form

[edit]

In some cases, it is possible not only to relate averages but to relate the entire probability distribution of the number in the system to the time in the system under a first come, first served discipline. A distributional relation for many FIFO/Poisson-class systems was derived by Keilson and Servi (1988)[27] and further developed in related work, including links to the Fuhrmann–Cooper decomposition[28]; later, Bertsimas and Nakazato (1995) provided a new proof and surveyed applications.[29]

  1. ^ Also written as Little's result, theorem, lemma, or formula in different sources.[1][2]
  1. ^ Alberto Leon-Garcia (2008). Probability, statistics, and random processes for electrical engineering (3rd ed.). Prentice Hall. ISBN 978-0-13-147122-1.
  2. ^ Allen, Arnold A. (1990). Probability, Statistics, and Queueing Theory: With Computer Science Applications. Gulf Professional Publishing. p. 259. ISBN 0120510510.
  3. ^ Simchi-Levi, D.; Trick, M. A. (2013). "Introduction to "Little's Law as Viewed on Its 50th Anniversary"". Operations Research. 59 (3): 535. doi:10.1287/opre.1110.0941.
  4. ^ Serfozo, R. (1999). "Little Laws". Introduction to Stochastic Networks. pp. 135–154. doi:10.1007/978-1-4612-1482-3_5. ISBN 978-1-4612-7160-4.
  5. ^ a b c d e Harchol-Balter, Mor (2013). "Chapter 6: Little's Law and Other Operational Laws". Performance Modeling and Design of Computer Systems: Queueing Theory in Action. Cambridge University Press. pp. 97–104. ISBN 978-1-107-02750-3.
  6. ^ Keilson, J.; Servi, L. D. (1988). "A distributional form of Little's Law" (PDF). Operations Research Letters. 7 (5): 223. doi:10.1016/0167-6377(88)90035-1. hdl:1721.1/5305.
  7. ^ a b c Little, J. D. C.; Graves, S. C. (2008). "Little's Law" (PDF). Building Intuition. International Series in Operations Research & Management Science. Vol. 115. p. 81. doi:10.1007/978-0-387-73699-0_5. ISBN 978-0-387-73698-3.
  8. ^ Cobham, Alan (1954). "Priority Assignment in Waiting Line Problems". Operations Research. 2 (1): 70–76. doi:10.1287/opre.2.1.70. JSTOR 166539.
  9. ^ Morse, Philip M. (1958). Queues, inventories, and maintenance: the analysis of operational system with variable demand and supply. Wiley. Those readers who would like to experience for themselves the slipperiness of fundamental concepts in this field and the intractability of really general theorems, might try their hand at showing under what circumstances this simple relationship between L and W does not hold.
  10. ^ Little, J. D. C. (1961). "A Proof for the Queuing Formula: L = λW". Operations Research. 9 (3): 383–387. doi:10.1287/opre.9.3.383. JSTOR 167570.
  11. ^ Jewell, William S. (1967). "A Simple Proof of: L = λW". Operations Research. 15 (6): 1109–1116. doi:10.1287/opre.15.6.1109. JSTOR 168616.
  12. ^ Eilon, Samuel (1969). "A Simpler Proof of L = λW". Operations Research. 17 (5): 915–917. doi:10.1287/opre.17.5.915. JSTOR 168368.
  13. ^ Stidham Jr., Shaler (1974). "A Last Word on L = λW". Operations Research. 22 (2): 417–421. doi:10.1287/opre.22.2.417. JSTOR 169601.
  14. ^ Stidham Jr., Shaler (1972). "L = λW: A Discounted Analogue and a New Proof". Operations Research. 20 (6): 1115–1120. doi:10.1287/opre.20.6.1115. JSTOR 169301.
  15. ^ a b c d e Little, J. D. C. (2011). "Little's Law as Viewed on Its 50th Anniversary" (PDF). Operations Research. 59 (3): 536–549. doi:10.1287/opre.1110.0940. JSTOR 23013126.
  16. ^ Bolch, Gunter; Greiner, Stefan; de Meer, Hermann; Trivedi, Kishor S. (2006). Queueing Networks and Markov Chains: Modeling and Performance Evaluation with Computer Science Applications (2nd ed.). Wiley. doi:10.1002/0471791571. ISBN 978-0-471-79156-0.
  17. ^ a b Hopp, Wallace J.; Spearman, Mark L. (2011). Factory Physics (3rd ed.). Waveland Press. ISBN 978-1-57766-739-1.
  18. ^ Kim, S. H.; Whitt, W. (2013). "Statistical Analysis with Little's Law" (PDF). Operations Research. 61 (4): 1030. doi:10.1287/opre.2013.1193.
  19. ^ Kim, S. H.; Whitt, W. (2013). "Statistical Analysis with Little's Law" (PDF). Operations Research. 61 (4): 1030. doi:10.1287/opre.2013.1193.
  20. ^ Jain, Raj (1991). The Art of Computer Systems Performance Analysis: Techniques for Experimental Design, Measurement, Simulation, and Modeling. Wiley. ISBN 978-0-471-50336-1.
  21. ^ Gregg, Brendan (2020). Systems Performance: Enterprise and the Cloud (2nd ed.). Addison-Wesley. ISBN 978-0-13-682015-4.
  22. ^ Harris, Mark (February 22, 2010). "Little's Law: The Science Behind Proper Staffing". Emergency Physicians Monthly. Archived from the original on September 5, 2012. Retrieved September 4, 2012.
  23. ^ Liang, Haili; Guo, Zhen; Tuljapurkar, Shripad (2023). "Why life expectancy over-predicts crude death rate". Genus. 79 (1): 9. doi:10.1186/s41118-023-00188-8. ISSN 2035-5556.
  24. ^ Murray, Bertram G. (2003). "A new equation relating population size and demographic parameters: some ecological implications". Annales Zoologici Fennici. 40 (6): 465–472. ISSN 0003-455X. JSTOR 23736503.
  25. ^ Cohen, Joel E. (2008). "Constant global population with demographic heterogeneity". Demographic Research. 18: 409–436. doi:10.4054/DemRes.2008.18.14. ISSN 1435-9871.
  26. ^ Caswell, Hal (2006). Matrix population models: construction, analysis, and interpretation (Second ed.). Sunderland, Massachusetts: Sinauer Associates, Inc. Publishers. ISBN 978-0-87893-121-7.
  27. ^ Keilson, Julian; Servi, Leslie D. (1988). "A distributional form of Little's law". Operations Research Letters. 7 (5): 223–227. doi:10.1016/0167-6377(88)90035-1. hdl:1721.1/47244.
  28. ^ Keilson, Julian; Servi, Leslie D. (1990). "The distributional form of Little's law and the Fuhrmann-Cooper decomposition". Operations Research Letters. 9 (4): 239–247. doi:10.1016/0167-6377(90)90068-G. hdl:1721.1/47195.
  29. ^ Bertsimas, D.; Nakazato, D. (1995). "The Distributional Little's Law and Its Applications" (PDF). Operations Research. 43 (2): 298. doi:10.1287/opre.43.2.298. JSTOR 171838.