Well, it doesn't tell you something important, and it used to bug me a lot until I could pinpoint it - so let's explore.
What Little's Law says
Quoting Wikipedia: "In mathematical queueing theory, Little's law is a theorem by John Little which states that the long-term average number L of customers in a stationary system is equal to the long-term average effective arrival rate λ multiplied by the average time W that a customer spends in the system."
For example, if we take a restaurant - the average number of guests present (L) is equal to the average arrival rate of guests (λ) multiplied by the average time a guest spends in the restaurant (W).
Let's say, if the average arrival rate is 10 guests per hour (λ = 10 customers/hour) and the average time a guest spends in the restaurant is 30 minutes hour (W = 0.5 hour), then according to Little's Law, the average number of guests in the restaurant (L) would be 5 guests.
Sounds all good - so: what is missing?
When Little's Law doesn't work
A few years ago, I had a hunch that Little's Law was missing something:
Imagine that our restaurant has 5 tables and one waiter who can serve 12 guests an hour. Guests take half an hour between getting seated and paying their tab.
Does Little's Restaurant follow the tradtional formula of L = λW, ie., W = L/λ?
Would a reduction of seats lead to guests dining faster?
Would a reduction of maximum dining time generate more guests, or would people dine longer if there were more guests?
Probably not.
Is Little's Law broken?
No. But it's missing something - it doesn't account for system capacity!
Fixing Little's Law?
This modified version of Little's Law accounts for capacity: L = λW / (1 - ρ)
Now, that alone doesn't make sense, so I need to explain this variable ρ:
ρ represents the utilization of the system, calculated as λ / μ, where λ denotes the average arrival rate into the system, μ is the service rate capacity of our system, i.e. the reciprocal of the average service time (1/μ = Ts), where Ts is the average time required to serve a single customer (note the difference between "service time (net time)" and "time spent in the system (gross time)" - it's critical!)
The "hidden factor" that Little's Law hid in plain sight was the relationship between the average number of customers (L) and the arrival rate (λ) needs to consider the impact of utilization and system capacity on the system performance! In underutilized systems, an increase in arrival rates has no impact on queues - whereas in overutilized systems, a reduction in system load won't have a visible effect until we get close to the actual capacity limits.
Returning to our restaurant example: Our restaurant's capacity is currently constrained by our amount of tables. As long as we have empty tables, a reduction in customers will not speed up anything. As long as all tables are full, adding more tables to the restaurant won't slow anything down. This view is complete counter-intuitive with the original Little's Law - but it makes sense, even in real life. Oh yeah - at some point, the waiter will be overburdened. At this point, the system capacity is no longer defined by tables, but by the waiter. So it's still all about system capacity.
Some examples
μ | λ | W | ρ | L = λW / (1 - ρ) |
---|---|---|---|---|
5 | 1 | 0.5 | 0.2 | 1 |
5 | 2 | 0.5 | 0.4 | 2 |
5 | 3 | 0.5 | 0.6 | 4 |
5 | 4 | 0.5 | 0.8 | 10 --> bigger than capacity! |
10 | 1 | 0.5 | 0.1 | 1 |
10 | 2 | 0.5 | 0.2 | 1 |
10 | 6 | 0.5 | 0.6 | 8 |
10 | 7 | 0.5 | 0.7 | 12 --> bigger than capacity! |
3 | 1 | 0.5 | 0.3 | 1 |
3 | 2 | 0.5 | 0.7 | 3 |
3 | 4 | 0.5 | 1.3 | -6 --> negative! |
- When arrival rates start to approximate the restaurant's capacity, the number of guests present gets bigger than the capacity, which in fact can't be - these invalid numbers indicate that variability could cause a backlog (queue) to form at peak times which can only be serviced when peaks are over.
- Customers arriving to a full restaurant can't get serviced and might leave - i.e., the negative number hints at unserviceable demand, i.e. lost opportunity.
Conclusion
While Little's Law has its merit, and we've been using it for years in order to explain the relationship between throughput, cycle time and Work in Process - we can't use Little's Law to optimize our systems properly if we don't account for System Capacity.Taking System Capacity into account allows us to predetermine whether increasing or decreasing WIP will have a significant effect - operating significantly below capacity is capacity waste, whereas operating above system capacity causes overload waste.
Thus, the "hidden variable" is more than just important to apply Little's Law - it's crucial!
We must know where the constraint in the work process is located because that determines the limit to the throughout. The constraint should always be operating at 100% capacity, otherwise we are limiting the throughout. Once we know where the constraint is located, we need only apply Little’s Law to that part of the work process. Steve Tendon’s book titled The Book of TameFlow, is the best resource for how to apply The Theory of Constraints to knowledge work.
ReplyDelete[[..Pingback..]]
ReplyDeleteThis article was curated as a part of #89th Issue of Software Testing Notes Newsletter.
https://softwaretestingnotes.substack.com/p/issue-89-software-testing-notes
Web: https://softwaretestingnotes.com