packetization guaranteed rate nodes · greedy shaper and packetizer consider a -packetizer and a...
TRANSCRIPT
Packetization
&
Guaranteed Rate NodesK-G Stenborg
Packetization & Guaranteed Rate Nodes – p.1/49
Variable Length Packets
A sequence
�
of cumulative packet lengths is awide sense increasing sequence such that�� �� � �� �
� � �� � � � � �� ��
is finite.We interpret
� � � � � �� � � �
as the length of the
th packet.For any real number � define� � � � � �� �
� � �� � � � � ��� ��
. We have thecharacterization� � � � � � � � � �� � � � � �� � �
A
�
-packetizer is the system transforming the in-
put
��� �
into� � � � � �
.
Packetization & Guaranteed Rate Nodes – p.2/49
Packetizer
We say that a flow is
�
-packetized if� � � � � � � � � �
for all
�
.
Packetization & Guaranteed Rate Nodes – p.3/49
Greedy Shaper and Packetizer
Consider a
�
-packetizer
�
and a “good” func-
tion �. Call � the greedy shaper with shap-
ing curve �. Assume that there is a sub-additive
function ��� and a number� � � � � such that
�� � � � ����� � � ��� � � . Then for any input the out-
put of the composition
�� � �
�
is �-smooth.
Packetization & Guaranteed Rate Nodes – p.4/49
Packetized Greedy Shapers (P. G. S.)
Consider an input sequence of packets,represented by the function
��� � � ���
�� ��� � � � .
Call
�
the cumulative packet lengths.
Packetized Shaper (with shaping curve ): Asystem that forces its output to have as anarrival curve and be -packetized.Packetized Greedy Shaper: A packetized shaperthat delays the input packets in a buffer,whenever sending a packet would violate theconstraint , but outputs them as soon aspossible.
Packetization & Guaranteed Rate Nodes – p.5/49
Packetized Greedy Shapers (P. G. S.)
Consider an input sequence of packets,represented by the function
��� � � ���
�� ��� � � � .
Call
�
the cumulative packet lengths.Packetized Shaper (with shaping curve �): Asystem that forces its output to have � as anarrival curve and be
�
-packetized.
Packetized Greedy Shaper: A packetized shaperthat delays the input packets in a buffer,whenever sending a packet would violate theconstraint , but outputs them as soon aspossible.
Packetization & Guaranteed Rate Nodes – p.5/49
Packetized Greedy Shapers (P. G. S.)
Consider an input sequence of packets,represented by the function
��� � � ���
�� ��� � � � .
Call
�
the cumulative packet lengths.Packetized Shaper (with shaping curve �): Asystem that forces its output to have � as anarrival curve and be
�
-packetized.Packetized Greedy Shaper: A packetized shaperthat delays the input packets in a buffer,whenever sending a packet would violate theconstraint �, but outputs them as soon aspossible.
Packetization & Guaranteed Rate Nodes – p.5/49
Proposition
If ���� � � � � � �� � � �� � � � �
�� � then the packetizedgreedy shaper blocks all packets for ever(namely,
� � � � �
).Thus in this seminar, we assume that
�� � � �
�� � for
� � �
.
Thus the arrival curve � has a discontinuity at the
origin (at least as large as one maximum packet
size).
Packetization & Guaranteed Rate Nodes – p.6/49
Realization of the P. G. S.
Consider a sequence
�
of cumulative packet
lengths and a “good” function � that satisfies
�� � � � ��� � � � ��� � � there ��� is sub-additive and
� ��� �. Let the inputs be
�packetized. Then the
packetized greedy shaper for � and
�
can be re-
alized as the concatenation of the greedy shaper
with shaping curve � and the
�
-packetizer.
Packetization & Guaranteed Rate Nodes – p.7/49
Proof
� � �
packetized input.
� � �
packetized greedyshaper output. .
The definition of the packetized greedy shaperimplies that .
=>
Packetization & Guaranteed Rate Nodes – p.8/49
Proof
� � �
packetized input.
� � �
packetized greedyshaper output. .
�� � � � � � � � �
�� ��� � � � � �
�� � � � � �
� � � � � � � � � �
The definition of the packetized greedy shaperimplies that .
=>
Packetization & Guaranteed Rate Nodes – p.8/49
Proof
� � �
packetized input.
� � �
packetized greedyshaper output. .
�� � � � � � � � �
�� ��� � � � � �
�� � � � � �
� � � � � � � � � �
The definition of the packetized greedy shaperimplies that
�� �.
=>
Packetization & Guaranteed Rate Nodes – p.8/49
Proof
� � �
packetized input.
� � �
packetized greedyshaper output. .
�� � � � � � � � �
�� ��� � � � � �
�� � � � � �
� � � � � � � � � �
The definition of the packetized greedy shaperimplies that
�� �.
=> � �� �Packetization & Guaranteed Rate Nodes – p.8/49
Corollary
For
�
-packetized inputs, the implementations of
buffered leaky bucket controllers based on bucket
replenishment and virtual finish times are equiva-
lent.
Packetization & Guaranteed Rate Nodes – p.9/49
I/O characterisation of P. G. S.
Consider a packetized greedy shaper withshaping curve � and cumulative packet length
�
.Assume that � is a “good” function. The output� � �
of the packetized greedy shaper is given by
� � � �� ��
� � ��
� � �� � � �
�
with
�� � � � � � � � ��
� ��� � �
and
� � � � � � � � � ��
� ��
� � � � � � �
for
� �
.
Packetization & Guaranteed Rate Nodes – p.10/49
Lemma
Consider a sequence
�
of cumulative packetlengths and a “good” function �. Among all flows
� � � �
such that(1) �
(2) � is
�
-packetized(3) � has � as an arrival curve
there is one flow� � �
that upper-bounds all. It is
given by � � � � � �� ��
� � ��
� � �� � � �
�
.
Packetization & Guaranteed Rate Nodes – p.11/49
Proof
If � is a solution, then � � � � � � � � � �
and thus �
. is a solution if it hold the three conditions
(1), (2) and (3) on previous slide.
Packetization & Guaranteed Rate Nodes – p.12/49
Proof of
�� �
and by induction on
�
,
� � �
for all
�
.
Thus .
Packetization & Guaranteed Rate Nodes – p.13/49
Proof of that is -packetized
Consider some fixed
�
.
� � � � � �
is
�
-packetized forall
� �
.Let
� �� ��
� � �� � � � �
. Since
� � � � � � �� � � � �
,
� � � ��� �
is in the set
� � � � ��
� � � ��
� � � �� � � � �
� �� ���
.
This set is finite, thus� � �
has to be one of the
� � � �
for
� � . This shows that
� � �
is
�
-
packetized, and this is true for any time
�
.
Packetization & Guaranteed Rate Nodes – p.14/49
Proof of that has � as an arrival curve
� � � � �� � � � � � � � � ��
� � � � � � � � ��
� � � � � � �
for all
�
,thus
� � � � � � �� ��
� � � � � � �� �
� � �� � � ��� � � � � � ���� � � � � � � � � �� �
� � �� � � ��� � � � � � � � � ��� � � � � � � � � �� � �
� � �� � � ��� � ��
��� � � � � � � �� � � � � � � �� � �
� � �� � � ��� � � ��� � � � � � �� � ��
� � � �
.
� � �Packetization & Guaranteed Rate Nodes – p.15/49
Conservation of concave arrival constraints
Assume an
�
-packetized flow with arrival curve �
is input to a packetized greedy shaper with cumu-
lative packet length
�
and shaping curve �. As-
sume that � and � are concave with � �� � � �
�� �
and ��� � � �
�� � (and �� � � � �� � � � �
). Then
the output flow is still constrained by the original
arrival curve �.
Packetization & Guaranteed Rate Nodes – p.16/49
Proof
is �-smooth, � � . The output flow canthen be expressed as � � �
�
� �
� ��
��
� � � � � �� �
� �.
Theorem 3.1.6 gives � � � � � � � ��
��
and thus
� � satisfies
�� �
� � � � � ���� � � � �� � � . Thus
is � �-smooth, and thus �-smooth.
Packetization & Guaranteed Rate Nodes – p.17/49
Series decomposition of shapers
Consider a tandem of packetized greedyshapers in series; assume that the shaping curve
� �
of the �th shaper is concave with
� ��
� � � ��� �. For
�
-packetized inputs, the
tandem is equivalent to the packetized greedy
shaper with shaping curve � � � � � � � �
.
Packetization & Guaranteed Rate Nodes – p.18/49
Proof (for � )
Output of tandem of shapers is� � � ��
� � ��
� �� � ��
� ��
��
since � � � for all �. � � ��
�
is
�
-packetized and �-smooth, thus
�
.
is -packetized and -smooth. Thus thetandem is a packetized (possible non greedy)shaper. Since is the output of the packetizedgreedy shaper, we must have .
Packetization & Guaranteed Rate Nodes – p.19/49
Proof (for � )
Output of tandem of shapers is� � � ��
� � ��
� �� � ��
� ��
��
since � � � for all �. � � ��
�
is
�
-packetized and �-smooth, thus
�
.
�
is
�
-packetized and �-smooth. Thus thetandem is a packetized (possible non greedy)shaper. Since
��� �is the output of the packetized
greedy shaper, we must have
�
.
Packetization & Guaranteed Rate Nodes – p.19/49
Proof (for � )
Output of tandem of shapers is� � � ��
� � ��
� �� � ��
� ��
��
since � � � for all �. � � ��
�
is
�
-packetized and �-smooth, thus
�
.
�
is
�
-packetized and �-smooth. Thus thetandem is a packetized (possible non greedy)shaper. Since
��� �is the output of the packetized
greedy shaper, we must have
�
.
� � � �Packetization & Guaranteed Rate Nodes – p.19/49
The Effective Bandwidth
Consider a flow with cumulative function and afixed but arbitrary delay .The effective bandwidth of a flow is given by
� �� � � �� �
� � � � �
� � � � �� �
� � �
with a virtual delay .
The effective bandwidth of a “good” arrival curveis given by
Packetization & Guaranteed Rate Nodes – p.20/49
The Effective Bandwidth
Consider a flow with cumulative function and afixed but arbitrary delay .The effective bandwidth of a flow is given by
� �� � � �� �
� � � � �
� � � � �� �
� � �
with a virtual delay .The effective bandwidth of a “good” arrival curveis given by
� ��
�� � �� �
� � �
��� �
�
Packetization & Guaranteed Rate Nodes – p.20/49
Equivalent Capacity
The equivalent capacity for a flow is given by
�� � � �� �
� � � ��
� � � � �� � �
� � �
and for a “good” function � it is given by
��
�� � �� �
� � �
��� � �
�
A queue with constant rate , guarantees a max-
imum backlog of for a flow if �� �
.
Packetization & Guaranteed Rate Nodes – p.21/49
Effective Bandwidth and Equivalent Capacity
The definition of the effective bandwidth gives
� ��
�
� ��
�
� ��
� ��
and the definition of the equivalent capacity gives
��
�
� ��
�
��
�� �
�
where � � �.
Packetization & Guaranteed Rate Nodes – p.22/49
Packet Scheduling
Packet scheduling is the function that decides, atevery buffer inside a network node, the serviceorder for different packets.
FIFO (first in, first out) - Packets are served inthe order of arrival.
Per flow queuingProvide isolation to flowsOffer different guarantees
Example: Generalized Processor Sharing.
Packetization & Guaranteed Rate Nodes – p.23/49
Packet Scheduling
Packet scheduling is the function that decides, atevery buffer inside a network node, the serviceorder for different packets.
FIFO (first in, first out) - Packets are served inthe order of arrival.
Per flow queuingProvide isolation to flowsOffer different guarantees
Example: Generalized Processor Sharing.
Packetization & Guaranteed Rate Nodes – p.23/49
Packet Scheduling
Packet scheduling is the function that decides, atevery buffer inside a network node, the serviceorder for different packets.
FIFO (first in, first out) - Packets are served inthe order of arrival.
Per flow queuingProvide isolation to flowsOffer different guarantees
Example: Generalized Processor Sharing.
Packetization & Guaranteed Rate Nodes – p.23/49
Generalized Processor Sharing (GPS)
A GPS node serves several flows in parallel, and
has a total output rate equal to � b/s. A flow
�
is allocated a given weight, �. Call ���� �
,
��
� � �
the input and output functions for flow
�
. The
guarantee is that for any time
�
, the service rate
offered to flow
�
is 0 if flow
�
has no backlog,
and otherwise is equal to
��
�� � �� ���
�, where
� � �
is the set of backlogged flows at time
�
. Thus
��
� � � ��
�
��
�� � � ���
�� � � � � � � �
�� .
Packetization & Guaranteed Rate Nodes – p.24/49
GPS, PGPS and GR
A GPS node is a theoretical concept, which isnot really implementable, because it relies on afluid model, and assumes that packets areinfinitely divisible.
Practical implementations of GPS are Packet
Generalized Processor Sharing (PGPS) and
Guaranteed Rate (GR).
Packetization & Guaranteed Rate Nodes – p.25/49
Packet Generalized Processor Sharing (PGPS)
PGPS emulates GPS as follows. There is one
FIFO queue per flow. The scheduler handles
packets one at a time, until it is fully transmitted, at
the system rate �. For every packet, we compute
the finished time that it would have under GPS
(the “GPS-finish-time”). Then, whenever a packet
is finished transmitting, the next packet selected
for transmission is the one with the earliest GPS-
finish-time, among all packets present.
Packetization & Guaranteed Rate Nodes – p.26/49
Proposition
The finish time for PGPS is at most the finish time
of GPS plus
�� , where � is the total rate and
�
is
the maximum packet size.
Packetization & Guaranteed Rate Nodes – p.27/49
Proof
Packetization & Guaranteed Rate Nodes – p.28/49
Guaranteed Rate (GR) Node
Consider a node that serves a flow. Packets arenumbered in order of arrival. Let � �
,
� �
be the arrival and departure times. We say that anode is a guaranteed rate node for this flow, withrate � and delay �, if it guarantees that
� �, where
�
� � �
� � �� � � � ��
� ���� �
�
Packetization & Guaranteed Rate Nodes – p.29/49
One Way Deviation of a scheduler from GPS
We say that deviates from GPS by � if for allpacket the departure time satisfies
� � �,where � is the departure time from ahypothetical GPS node that allocates a rate
� � ����
�� � to this flow (assumed to be flow 1).
Theorem: If a scheduler satisfies ,then it is GR with rate and latency .
Proof: and the rest is immediate.
Packetization & Guaranteed Rate Nodes – p.30/49
One Way Deviation of a scheduler from GPS
We say that deviates from GPS by � if for allpacket the departure time satisfies
� � �,where � is the departure time from ahypothetical GPS node that allocates a rate
� � ����
�� � to this flow (assumed to be flow 1).
Theorem: If a scheduler satisfies
� � �,then it is GR with rate � and latency �.
Proof: and the rest is immediate.
Packetization & Guaranteed Rate Nodes – p.30/49
One Way Deviation of a scheduler from GPS
We say that deviates from GPS by � if for allpacket the departure time satisfies
� � �,where � is the departure time from ahypothetical GPS node that allocates a rate
� � ����
�� � to this flow (assumed to be flow 1).
Theorem: If a scheduler satisfies
� � �,then it is GR with rate � and latency �.
Proof: � and the rest is immediate.
Packetization & Guaranteed Rate Nodes – p.30/49
Max-Plus Representation of GR
Consider a system where packets are numbered��
�� � � � in order of arrival. Call � ,
� the arrivaland departure times for packet , and
� the sizeof packet . Define by convention
�� � �
. Thesystem is a GR node with rate � and latency � ifand only if for all there is some
� � � �� � � � �
�
such that
� � ���
��
� � �
�
�
Packetization & Guaranteed Rate Nodes – p.31/49
Proof
� � � �� � ���
�� ��
�
Packetization & Guaranteed Rate Nodes – p.32/49
Proof
� � � �� � ���
�� ��
�
� ��
��
�
Packetization & Guaranteed Rate Nodes – p.32/49
Proof
� � � �� � ���
�� ��
�
� ��
��
�
� � � �� � � ��
��
��
�� ���
�
Packetization & Guaranteed Rate Nodes – p.32/49
Proof
� � � �� � ���
�� ��
�
� ��
��
�
� � � �� � � ��
��
��
�� ���
�
� � �
� � �� � � �
� ��
��� � �� � � � � �
��
��� � � � �� ��� � �
� � � � � �
��
�� � � � �� �� � �
�
� � ��
Packetization & Guaranteed Rate Nodes – p.32/49
Equivalence with service curve
Consider a node with
�
-packetized input.
(1) If the node guarantees a minimum servicecurve equal to the rate-latency function
� �� � , and if it is FIFO, then it is a GR nodewith rate � and latency �.
(2) Conversely, a GR node with rate andlatency is the concatenation of a servicecurve element, with service curve equal to therate-latency function , and an
-packetizer. If the GR node is FIFO, then sois the service element.
Packetization & Guaranteed Rate Nodes – p.33/49
Equivalence with service curve
Consider a node with
�
-packetized input.
(1) If the node guarantees a minimum servicecurve equal to the rate-latency function
� �� � , and if it is FIFO, then it is a GR nodewith rate � and latency �.
(2) Conversely, a GR node with rate � andlatency � is the concatenation of a servicecurve element, with service curve equal to therate-latency function �� � , and an�
-packetizer. If the GR node is FIFO, then sois the service element.
Packetization & Guaranteed Rate Nodes – p.33/49
Proof (1)Consider a service curve element
�
. Assume that the in-
put and output functions
�
and
��
are right-continuous.
Consider the virtual system
� �
made of a bit-by-bit greedy
shaper with shaping curve
��� , followed by a constant bit-by-
bit delay element. The bit-by-bit greedy shaper is a constant
bit rate server, with rate �. Thus the last bit of packet � de-
parts from it exactly at time
� ,
� � ��� . The output
function of
� �
is
� � � � ���� �. By hypothesis,
�� � � �
, and
by the FIFO assumption, this shows that the delay in
�
is
upper bounded by the delay in
� �
. Thus
� � �� .
Packetization & Guaranteed Rate Nodes – p.34/49
Proof (2)
Packetization & Guaranteed Rate Nodes – p.35/49
Corollary
A GR node offers a minimum service curve
�� �� � �� � �
Packetization & Guaranteed Rate Nodes – p.36/49
Delay Bound
For an �-smooth flow served in a (possible nonFIFO) GR node with rate � and latency �, thedelay for any packet is bounded by
�� �� � �
� �� � �
�
� � � �
Packetization & Guaranteed Rate Nodes – p.37/49
Proof
For any fixed , we can find a
� � such that
� ���
� � � � � �� ���
� . The delay for a packet is
� � � � � � .Define
� � � � ��� . By hypothesis��
� � �
� �� � �
, where ���� �
is the limit tothe right of � at
�
. Thus
� � � � � � �� � ��
� �� �� � �� � �� � �
� � � � �.
Now �� �� � �� � �� �
� � � � � �� �� � �� � �� � �
� � � � .
Packetization & Guaranteed Rate Nodes – p.38/49
Concatenation of GR nodes
The concatenation of GR nodes (that areFIFO per flow) with rates � � and latencies � � isGR with rate � � � � � � � � and latency
� � � �� � � � �� � � � �� � � � �� ��
� �� �� � , where
��� � is the
maximum packet size for the flow.
Packetization & Guaranteed Rate Nodes – p.39/49
Proof
By Theorem (2), we can decompose system
�
into a concatenation ��
�, where � offers theservice curve � �� � � and � is the packetizer.
Call the concatenation
��
��
��
�� � � � � �
�� �
�� .
By Theorem (2), is FIFO and provides theservice curve �� �. By Theorem (1), it is GR withrate � and latency �. Now does not effect thefinish time of the last bit of every packet.
Packetization & Guaranteed Rate Nodes – p.40/49
End-to-end Delay Bound
A bound on the end-to-end delay through aconcatenation of GR nodes is
�
�� ��
� �
��� �
��
�� ��
�� �
�
� � � � � �
Packetization & Guaranteed Rate Nodes – p.41/49
A Composite Node
We consider a composite node, made of twocomponents. The former (“variable delaycomponent”) imposes to packets a delay in therange
���� � � �
��
� � ��
. The latter is FIFO andoffers to its input the packet scale rate guarantee,with rate � and latency �.
If the variable delay component is known to beFIFO, then we have a simple result.
Packetization & Guaranteed Rate Nodes – p.42/49
Variable Delay as GR
Lemma:Consider a node which is known to guarantee adelay
��� �. The node need not be FIFO. Call�
� � the minimum packet size.
For any � � �
, the node is GR with latency � �
���� � �
� � � ��
� �
and rate �.
Packetization & Guaranteed Rate Nodes – p.43/49
Proof
With the standard notation in this section, the
hypothesis implies that
� � ��� � for all
�
. We have �
���
�
� � � �� , thus
� � ��� � �
� � � ��
���� � �
� � � ��
� �
.
Packetization & Guaranteed Rate Nodes – p.44/49
Composite GR Node with FIFO Variable Delay Component
Consider the concatenation of two nodes. The
former imposes to packets a delay�
�� �. The
latter is a GR node with rate � and latency �. Both
nodes are FIFO. The concatenation of the two
nodes, in any order, is GR with rate � and latency
�� � � �
��� �.
Packetization & Guaranteed Rate Nodes – p.45/49
Proof
The former node is GR( � ��
�� � ��
�� � �� � � �
� �
� �
) for
any � � � �. We know that the concatenation is
GR( ��
� �� � � � �
� � ). Let � �
go to .
Packetization & Guaranteed Rate Nodes – p.46/49
GR nodes that are not FIFO per flowConsider the concatenation of two nodes. The first imposes
to packets a delay in the range
� ��� � � ��
��� �
�
. The second is
FIFO and offers the guaranteed rate clock service to its in-
put, with rate � and latency� . The first node is not assumed
to be FIFO, so the order of packets arrivals at the second
node is not the order of packets arrivals at the first one.
Assume that the fresh input is constrained by a continuous
arrival curve � � �
. The concatenation of the two nodes, in
this order, offers to the fresh input the guaranteed rate clock
service with rate � and latency�� � � � ��� � � �� ��� ��� ���
� .
Packetization & Guaranteed Rate Nodes – p.47/49
Proof
Packetization & Guaranteed Rate Nodes – p.48/49
Exercises
Problem 1.31 & 1.38
Proof of Example: GPS (after definition 2.1.1).
Packetization & Guaranteed Rate Nodes – p.49/49