Littles Law

The average number of things in the system is the product of the average rate at which things leave the system and the average time each one spends in the system.


From JonBentley's ProgrammingPearls. The following is excerpted from http://www.programmingpearls.com/sec074.html

I teach this technique of performance analysis in my computer architecture classes at Ohio State University. But I try to emphasize that the result is a general law of systems theory, and can be applied to many other kinds of systems. For instance, if you're in line waiting to get into a popular nightspot, you might figure out how long you'll have to wait by standing there for a while and trying to estimate the rate at which people are entering. With Little's Law, though, you could reason,

This place holds about 60 people, and the average Joe will be in there about 3 hours, so we're entering at the rate of about 20 people an hour. The line has 20 people in it, so that means we'll wait about an hour. Let's go home and read Programming Pearls instead.

You get the picture.

Peter Denning succinctly phrases this rule as

The average number of objects in a queue is the product of the entry rate and the average holding time.

He applies it to his wine cellar: I have 150 cases of wine in my basement and I consume (and purchase) 25 cases per year. How long do I hold each case? Little's Law tells me to divide 150 cases by 25 cases/year, which gives 6 years per case.

He then turns to more serious applications. The response-time formula for a multi-user system can be proved using Little's Law and flow balance. Assume n users of average think time z are connected to an arbitrary system with response time r. Each user cycles between thinking and waiting-for-response, so the total number of jobs in the meta-system (consisting of users and the computer system) is fixed at n. If you cut the path from the system's output to the users, you see a meta-system with average load n, average response time z+r, and throughput x (measured in jobs per time unit). Little's Law says n = x*(z+r), and solving for r gives r = n/x - z.

Ref:

  http://en.wikipedia.org/wiki/Little%27s_law


See also: RuleOfThumb


EditText of this page (last edited December 1, 2005) or FindPage with title or text search