# Telling Stories About Little's Law

DevFeed: [Telling Stories About Little's Law](<https://devfeed.tech/articles/telling-stories-about-little-s-law-12483.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2018/06/20/littles-law.html>)

Author: Marc Brooker

Published: 2018-06-20T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog.md>), [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog-2.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [latency](<https://devfeed.tech/tags/latency.md>), [memory](<https://devfeed.tech/tags/memory.md>), [resources](<https://devfeed.tech/tags/resources.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [systems](<https://devfeed.tech/tags/systems.md>)

## AI overview

The article explains Little's Law as a way to reason about distributed-system capacity from concurrency, request arrival rate, and request time. It connects these measures to resource consumption and contention, then describes how feedback between latency, concurrency, and arrival rate can produce nonlinear performance degradation and sudden system failure points.

## Source excerpt

Telling Stories About Little's Law Building Up Intuition with Narrative Little's Law is widely used as a tool for understanding the behavior of distributed systems. The law says that the mean concurrency in the system (𝐿) is equal to the mean rate at which requests arrive (λ) multiplied by the mean time that each request spends in the system (𝑊): 𝐿 = λ𝑊 As I've written about before, Little's law is useful because it gives us a clear way to reason about the capacity of a system, which is often difficult to observe directly, based on quantities like arrival rate (requests per second) and latency which are easier to measure directly. Concurrency is a useful measure of capacity in real systems, because it directly measures consumption of resources like threads, memory, connections, file handles and anything else that's numerically limited. It also provides an indirect way to think about contention: if the concurrency in a system is high, then it's likely that contention is also high. I like Little's Law as a mathematical tool, but also as a narrative tool. It provides a powerful way to frame stories about system behavior. Feedback The way Little's Law is written, each of the terms are long-term averages, and λ and 𝑊 are independent. In the real world, distributed systems don't tend to actually behave this nicely. Request time (𝑊) tends to increase as concurrency (𝐿) increases. Amdahl's Law provides the simplest model of this: each request has some portion of work which is trivially parallelizable, and some portion of work that is forced to be serialized in some way. Amdahl's law is also wildly optimistic: most real-world systems don't see throughput level out under contention, but rather see throughput drop as contention rises beyond some limit. The universal scalability law captures one model of this behavior. The fundamental reason for this is that contention itself has a cost. Even in the naive, beautiful, Amdahl world, latency increases as load increases because thr