Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Little Theorem

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Computer Networks

A gentle introduction to queuing theory


Saad Mneimneh
Computer Science
Hunter College of CUNY
New York

So how little is Little’s theorem?

1 Introduction
Before we address other aspects of TCP or start discussing the network layer, we
consider some theoretical treatment of the network as a system that provides service
to customers. In this system, customers arrive at random times to obtain service.

customers
system

Figure 1: Customers arrive to the system for service

In the context of computer networks, customers represent packets (or frames, and
we shall not make the distinction here), and service represents the assignment of
packets to communication links. For instance, if a link (server) has a bandwidth of B
bps (service rate), then the service time for a packet (customer) assigned to that link
will be L/B, where L is the size of the packet in bits (including headers if frame).
Because the number of servers is usually finite, customers of this system are often
modeled to be waiting for service in queues. Queuing theory is the field responsible
for the study of such systems. The theory will help us gain some insight about buffer
space, packet delays, and network utilization. This in turn could help us in the design
of switching strategies (network layer) and congestion control mechanisms (e.g. TCP).

1
We are interested in answering questions like:
• What is the average number of customers in the system? (i.e. the “typical”
number waiting in queue or undergoing service)
• What is the average delay per customer? (i.e. the “typical” time a customer
waits in queue plus the service time)
These quantities are often obtained in terms of known information such as:
• The customer arrival rate (i.e. the “typical” number of customers entering the
system per unit time)
• The customer service rate (i.e. the “typical” number of customers the system
serves per unit time when it is constantly busy)

2 Preliminaries
Let us work out what we mean by average or “typical”. We start with few definitions:

N (t) = Number of customers in the system at time t

A(t) = Number of customers who arrive in the interval [0, t]


Ti = Time spent in the system by the ith arriving customer
A notion of “typical” number of customers observed up to time t is the time average
Z t
1
Nt = N (τ )dτ
t 0

In many systems of interest, Nt converges to a steady state

N = lim Nt
t→∞

Similarly, we define λt = A(t)t


, and the time average arrival rate λ = limt→∞ λt
(assuming the limit exists). We also define
PA(t)
i=1
Ti
Tt =
A(t)

and the time average customer delay (assuming the limit exists)

T = lim Tt
t→∞

It turns out that the quantities N , λ, and T above are related by a simple formula
that makes it possible to determine one given the others. This result was proved by
John Little at MIT in 1961, and is known as Little’s theorem. Before that, the result
was a “folk theorem” in operations research for many years.
3 Little’s theorem
Little’s theorem expresses the natural idea that crowded systems are associated with
long delays. It has the following form:

N = λT
What is remarkable about this theorem is that it applies to any system, regardless
of the arrivals and what the system looks like inside. For instance, on a rainy day,
traffic on a rush hour moves slower than average (large T ), and the streets are more
crowded (large N ). Similarly, a fast food restaurant (fast service, small T ) needs a
smaller waiting room (e.g. drive through, small N ) than a regular restaurant for the
same customer arrival rate.
We will prove Little’s theorem graphically under some simplifying assumptions (we
relax those assumptions later on).
• assumption 1: the system is initially empty, i.e. N (0) = 0
• assumption 2: the system is FIFO
• assumption 3: the system becomes empty infinitely many times
Let D(t) be the number of customers that depart the system in the interval [0, t].
A(t) and D(t) trace the arrivals and departures by time t respectively as shown in
Figure 2 below:

4 A(τ)

3
N(τ)

2
T2
1
D(τ)
T1
0
t

Figure 2: Graphical proof of Little’s theorem


PA(t)
Rt PA(t) A(t) Ti
The system is empty at t implies that 0 N (τ )dτ = i=1
Ti = i=1
A(t)
.
Dividing by t, we get Nt = λt Tt . Taking the limit as t goes to infinity (assuming λ
and T exist), we get N = λT .
The first assumption is not really necessary. In fact, the same argument works as
long as we adopt the convention that, for customers initially in the system, the time
Ti is counted starting at t = 0.
A(t)
We now relax all assumptions. We only require that λ = limt→∞ exists and
PA(t) t
Ti
T = limt→∞ A(t)i=1
exists. Let ti be the time of arrival of customer i. Then using
the same graphical argument above:
X Z t X
Ti ≤ N (τ )dτ ≤ Ti
i:ti +Ti ≤t 0 i:ti ≤t

X Z t A(t)
X
Ti ≤ N (τ )dτ ≤ Ti
i:ti +Ti ≤t 0 i=1

X Z t
PA(t)
1 1 A(t) i=1
Ti
lim Ti ≤ lim N (τ )dτ ≤ lim
t→∞ t t→∞ t 0
t→∞ t A(t)
i:ti +Ti ≤t

1 X
lim Ti ≤ lim Nt ≤ λT
t→∞ t t→∞
i:ti +Ti ≤t

Therefore, to prove the result, we only have to show that:


A(t)
1 X 1X
lim Ti = lim Ti
t→∞ t t→∞ t
i:ti +Ti ≤t i=1

We first show that limn→∞ Tn /tn = 0. The intuition behind this approach is that
if Tn becomes very small compared to tn , the average delay for customers who leave
the system by time t (left hand side above) becomes very close to the average delay
for customers who arrive to the system by time t.

Tn Tn A(tn )
=
tn A(tn ) tn
Tn Tn
Therefore, limn→∞ tn
= λ limn→∞ A(tn )
.
Pn Pn−1
Tn i=1
Ti A(tn−1 ) i=1 Ti
= −
A(tn ) A(tn ) A(tn ) A(tn−1 )
Note that A(tn ) = n; therefore,
PA(tn ) PA(tn−1 )
Tn i=1
Ti n−1 i=1
Ti
= −
A(tn ) A(tn ) n A(tn−1 )
Tn
lim =T −1·T =0
n→∞ A(tn )
Therefore, limn→∞ Tn /tn = 0. This means that for any ² > 0, there exists a finite
time τ such that Ti < ti ² for all ti > τ . Now we finish the proof. Consider a time
t > τ: X X X
Ti = Ti + Ti
i:ti +Ti ≤t i:ti ≤τ,ti +Ti ≤t i:ti >τ,ti +Ti ≤t

Since ti > τ ⇒ Ti < ti ², then ti > τ also means that ti (1 + ²) ≤ t ⇒ ti + T ≤ t.


Therefore,
P P P
Ti ≥ T + T
i:ti +Ti ≤t Pi:ti ≤τ,ti +Ti ≤t i Pi:ti >τ,ti (1+²)≤t i P
= Ti − i:t ≤τ,t (1+²)≤t Ti + i:t ≤t/(1+²) Ti
Pi:ti ≤τ,ti +Ti ≤t P i i PA(t/(1+²))
i
= i:ti ≤τ,ti +Ti ≤t
Ti − i:ti ≤τ,ti (1+²)≤t
Ti + i=1
Ti

The first two terms are finite. Dividing by t and taking the limit as t → ∞, we get

X PA(t/(1+²))
1 1 A(t/(1 + ²)) i=1 Ti
lim Ti ≥ lim
t→∞ t 1 + ² t→∞ t/(1 + ²) A(t/(1 + ²))
i:ti +Ti ≤t

1
P 1
P
But t i:ti +Ti ≤t
Ti ≤ t i:ti ≤t
Ti ; therefore,

1 1 X
λT ≤ lim Ti ≤ λT
1+² t→∞ t
i:ti +Ti ≤t

Since ² was arbitrary, we can take the limit as ² → 0 to obtain the result.

4 Probabilistic Little
In the above analysis, we relied on a single sample and computed averages over time.
For almost every system of interest, the same applies if we replace time averages with
ensemble average, i.e. under a probabilistic setting.
• N can be replaced by N̄ = E[N ], the expected number of customers in the
system
• T can be replaced by T̄ = E[T ], the expected time spent by one customer
expected number of arrivals in [0,t]
• λ can be replaced by limt→∞ t

Therefore,
E[N ] = λE[T ]
Usually, λ is given as a property of arrival process (we will see this when we model
arrivals), and E[N ] can be computed by a simple analysis of pn , the probability of
having n customers in the system (later).

5 Little Examples
Little’s theorem can be applied to any system or even parts of it. The following two
examples illustrate the idea:

5.1 Example 1
Consider the following node where the arrival rate is λ packets per second and the link
bandwidth is µ bps:
λ µ

Figure 3: Simple system

• Looking at the node: N = λT , where N is the average number of packets in the


node and T is the average delay per packet
• Looking at the queue: NQ = λW , where NQ is the number of packets in the
queue and W is the average waiting time per packet
• Looking at the transmitter: ρ = λ L
µ
, where:
– ρ is the average number of packets being transmitted (served), also known
as link utilization, efficiency, or throughput
– L/µ is the average transmission time per packet (L is the average packet
size)
– note that N = NQ + ρ
• Looking at the link: B = λD, where B is the number of packets in transit and
D is the propagation delay of the link

5.2 Example 2
Consider the following system of nodes:

λ1
λ2

λ3

λ1
λ3

λ2

Figure 4: Combination of systems

• For each subsystem, Ni = λi Ti


P P
• For the whole system, N = λT , where N = i
Ni and λ = i
λi
• Therefore P
λi Ti
T = Pi
i
λi
(average weighted by λ0i s)
References
Dimitri Bertsekas and Robert Gallager, Data Networks
Shaler Stidham, A Last Note on L = λW , JSTOR 1972.

You might also like