Comp 346/488: Intro to Telecommunications

Tuesdays 4:15-6:45, Lewis Towers 412

Class 13, Apr 17

    Chapter 11, ATM
    Chapter 13, congestion control (despite the title, essentially all the detailed information is ATM-specific)
    Chapter 14, cellular telephony

Asterisk VirtualBox demo/discussion
    questions



Congestion issues generally

Congestion occurs at entry queues to links. Congestion is usually defined to be (taildrop) losses, but the term may also refer to queue buildup. Congestion may simply result in increased delay at constant throughput (best case). But it also may result in plummeting throughput; as offered_load ⟶ 100%, perhaps delay ⟶ ∞!

Retransmission saturation: suppose A sends to D, B to C, C to B, and D to A, all sending clockwise (ABD, BDC, DCA, CAB). Suppose each sender offers rate r<1, where 1 is the maximum rate (and the maximum capacity on each link).

A-----B
|     |
|     |
C-----D

Now suppose that at each router the loss-ratio is α<=1. That means fraction α of the traffic is dropped, and fraction (1-α) is forwarded.

Traffic from A to B (thus, the load offered to router B) consists of:
Further, let us assume that if the total offered load exceeds 1, then the router reduces the load of each contributor proportionally.

The total load is r + (1-α)r. For r=0.5, we can have α=0 (no losses); each link is 100% full. For r≥0.5, we can solve for α: α = (2r-1)/r. When r=0.5, α=0. When r=0.75, α=2/3. As r⟶1, we see α⟶1, that is, 100% loss rate. [ref: Kurose & Ross, Computer Networking 5e, §3.6, Scenario 3]


ATM

The real goal of ATM is to allow congestion-management mechanisms that IP does not support.

GCRA [generalized cell rate algorithm],  CAC [connection admission control]
(GCRA defined later)

CBR = rt-VBR with very low value for BT (token bucket depth)
rt-VBR: still specify maxCTD; typically BT is lower than for nrt-VBR
nrt-VBR: simulates a lightly loaded network; there may be bursts from other users

Circuit setup involves negotiation of parameters

Routers generally do not try to control the individual endpoint sending rates. Here are some things routers can control:
  1. Admission Control (yes/no to connection)
  2. Negotiating lower values (eg lower SCR or BT) to a connection
  3. Path selection, internally
  4. Allocation of bandwidth and buffers to individual circuits/paths
  5. Reservations of bandwidth on particular links
  6. Selective dropping of (marked) low-priority cells
  7. ABR only: asks senders to slow down
  8. Policing


Congestion control mechanisms generally: ch 13.2, fig 9e:13.5

credit-based: aka window-based; eg TCP
rate-based: we adjust rate rather than window size

Note that making a bandwidth reservation may still entail considerable per-packet delay!

Some issues:

Priority queuing

The idea here is that a router has two (or more) separate queues: one for high-priority traffic and one for low. When the router is ready to send a packet, it always checks the high-priority queue first; if there is a packet waiting there, it is sent. Only when the high-priority queue is empty is the low-priority queue even checked.

Obviously, this means that if the high-priority queue always has some packets, then the low-priority queue will "starve" and never get to send anything. However, often this is not the case. Suppose, for example, that we know that the total traffic in high-priority packets will never be more than 25% of the bandwidth. Then the remaining 75% of the bandwidth will be used for low-priority traffic. Note that if the high-priority upstream sender "empties the bucket" then for brief periods the router may send 100% high-priority traffic.

Fair queuing

Suppose a router R has three pools of senders (perhaps corresponding to three departments, or three customers), and wants to guarantee that each pool gets 1/3 the total bandwidth. A classic FIFO router will fail at this: if sender A does its best to keep R's queue full, while B and C are using stop-and-wait and only send one packet at a time, then A will dominate the queue and thus the bandwidth.

Fair Queuing addresses this by, in effect, giving each of A, B and C their own queue. See Stallings 9e: fig 20.3. R then services these queues in round-robin fashion: one packet from A, one packet from B, and one packet from C, and back to A. (There are standard strategies for handling different-sized packets so as to guarantee each sender the same rate in bytes/sec rather than in packets/sec, but we can omit that for now.) Note that, if A's queue is full while B and C get their next packet to R "just in time", then A now only gets 1/3 the total.

Note also that if sender C falls silent, then A and B now split the bandwidth 50%-50%. Similarly, if B also stops sending then A will get 100%, until such time as B or C resumes. That is, there is no "wasted" bandwidth (as there would be with a time-division-multiplexing scheme).

Finally, if instead of equal shares you want to allocate 50% of the bandwidth to A, 40% to B and 10% to C, the Fair Queuing scheme can be adjusted to accommodate that.



In general, FIFO queues encourage senders to keep the queue as full as possible. Any congestion-management scheme should take into account the kind of behavior it is encouraging, and to avoid bad sender behavior. For example, routers should discourage the user response of sending everything twice (as might be the case if routers dropped every other packet).


ATM congestion issues:

Latency v Speed:
transmission time of a cell at 150 Mbps is about 3 microsec. RTT propagation delay cross-country is about 50,000 microsec! We can have ~16,000 cells out the door when we get word we're going too fast.

Note that there is no ATM sliding-windows mechanism!

CLP bit: negotiated traffic contract can:
  1. Cover both CLP=0 and CLP=1 cells; ie CLP doesn't matter; this is the CLP-0-or-1 contract
  2. Allow sender to set CLP; contract covers CLP=0 cells only; carrier may drop CLP=1 cells (the CLP=0 contract)
  3. Allow network to set CLP; CLP set to 1 only for nonconforming cells (this is a variant of the CLP=0 contract)

Section 13.5 (towards the end)
Suppose a user has one contract for CLP=0 traffic and another for CLP-0-or-1 traffic. Here is a plausible strategy, where "compliant" means compliant with all token-bucket policing (see the GCRA algorithm below for details).

cell
compliance
action
CLP = 0
compliant for CLP = 0
transmit
CLP = 0
noncompliant for CLP=0 but compliant for CLP-0-or-1 set CLP=1, transmit
CLP = 0
noncompliant for CLP=0 and CLP-0-or-1 drop
CLP = 1
compilant for CLP-0-or-1 transmit
CLP = 1
noncompliant for CLP-0-or-1 drop

A big part of GFR is to make sure that all the cells of one larger IP frame have the same CLP mark, on entry. A subscriber is assigned a guaranteed rate, and cells that meet this rate are assigned a CLP of 0. Cells of additional frames are assigned CLP = 1.

ATM routers might not want to reorder traffic; ATM in general frowns upon reordering. However, if reordering were permitted, a router could use priority queuing to forward CLP=0 packets at high priority and CLP=1 packets at low priority.




QoS agreements are usually for an entire Virtual Path, not per-Virtual-Channel.
That is, the individual channels all get one lump QoS, and the endpoints are responsible for fairness among the VCCs


Traffic policing v shaping (essentially provider-based v sender-based)
Token bucket (fig 9e:13.9) is usually construed as a shaping algorithm: note smoothing effect on big bursts, but ability to pass smaller bursts intact.
Algorithm: tokens accumulate at a rate r, into a bucket with maximum capacity D (=bucket depth). This is done by the token generator. The sender needs to take a token out of the bucket (ie decrement the token count) each time it sends a packet.

Token bucket with bucket size s=1, initially full, rate r=1/5
Conformant:
0 5 10 15 20 ...
0 6 11 16 21
NOT:    0 6 10 ...
NOT:     0 4 ...
We have a minimum of 5 time units between sending, and zero bucket capacity beyond the one packet we want to send.

Token bucket with size s=1.2, initially full, rate r=1/5
This is now conformant:
0 6 10 16 20 ...
Here, we can save up 0.2 of a packet, so sometimes we can send after only 4 time units.


Generalized Cell Rate Algorithm, GCRA

GCRA - Generalized Cell Rate Algorithm (called UPC algorithm in Stallings, 13.6)
GCRA is a form of leaky / token bucket
(these are two ways of describing the same fundamental process: leaky bucket means cells add to bucket; can't overflow it; transmission fluid leaks out; token bucket means that cells subtract from bucket; volume can't go negative, transmission fluid comes in)

GCRA(T,𝝉): T = average time between packets, 𝝉 = tau = variation

We define "theoretical arrival time", or tat, for each cell, based on the arrival time of the previous cell.
Cells can always arrive later, but not earlier.
Arriving late doesn't buy the sender any "credit", though (in this sense, the bucket is "full")

Initially tat = current clock value, eg tat=0.

Suppose the current cell is expected at time tat, and the expected cell spacing is T.
Let t = actual arrival time

Case 1: t < tat - 𝝉 (the cell arrived too EARLY)

Case 2: t >= tat - 𝝉
draw picture of t<tat-𝝉, tat-𝝉<= t < tat and tat < t. The last case is "late"


Examples: GRCA(10,3) for the following inputs

0, 10, 20, 30
0,  7, 20, 30
0, 13, 20, 30
0, 14, 20, 30
1, 6, 8, 19, 27

CGRA(3,12):
arrivals:    0,0,0,0,  0,  3, 9,10,15
tats:          0,3,6,9,12,15,18,21,24

What is "fastest" GCRA(3,16) sequence?
peak queue length is approx 𝝉/T
better: 𝝉/(T-1) + 1

Token bucket: accumulate "fluid" at rate of 1 unit per time unit.
Bucket capacity: T+𝝉; need T units to go (or (T+𝝉)/T, need 1 unit)
A packet arriving when bucket contents >= T is conforming.
Conformant response: decrement bucket contents by T.
Nonconformant response: do nothing (but maybe mark packets)

Token bucket formulation of GCRA:


CLP bit and conformant/nonconformant

CBR traffic
1. Specify PCR and CDVT. We will assume PCR is represented as cells per cell transmission time.
2. meet GCRA(1/PCR, CDVT)
What does this mean?
6 ms sending rate, 3 ms CDVT
cells can be delayed by at most CDVT!

VBR traffic (both realtime and nrt)
GCRA(1/PCR, CDVT)  and   GCRA(1/SCR, BT+CDVT)
Note CDVT can be zero!
What does big 𝝉 do?

Example: PCR = 1 cell/microsec
SCR  = 0.2 cell/microsec
CDVT = 2 microsec
BT   = 1000 cells at 0.2 cell/microsec = 200 microsec

GCRA(1,2): delay cells by at most 2 microsec
GCRA(5,200): would have allowed delay of 200 microsec, but disallowed by first.
Allow 0 1 2 3 ... 999 5000

rt v nrt? Generally the latter has larger BT values (as well as not being allowed to specify maxCTD, and generally having a much larger value for meanCTD).

For both CBR and VBR traffic, the sender may negotiate separate values for CLP 0 and CLP 0+1 traffic.



Traffic Shaping

ATM VBR-class traffic can be shaped, say by emitting cells at intervals of time T.
This works for nrt-VBR, but will break CTD bound for rt-VBR
Example:

CGRA(3,12):
arrivals:    0,0,0,0,  0,  3, 9,10,15
tats:          0,3,6,9,12,15,18,21,24

GCRA(1,2) & GCRA(5,200):
These are traffic descriptions; the network only makes loss/delay promises
GCRA(1,2): At the PCR of 1/1, cells can be early by at most 2
GCRA(5,200): At SCR of 1/5, cells can be early by 200.
But the 200 cells cannot arrive faster than PCR, by more than 2


ABR: available bit rate
UBR: unspecified bit rate
GFR: Guaranteed Frame Rate

For ABR, the network offers the PCR, subject to being >= the MCR. The network can move PCR up and down.

For UBR, the user specifies the PCR and the CDVT.





Admission Control

This is telecom. The most important thing is to keep the CBR traffic flowing with no more delay than propagation delay, basically.

We need to decide when we can accept another connection.

(Often the issue is whether to accept a new circuit, or VCC, on an aggregate path, or VPC. Often VPCs are under the same administrative jurisdiction as all the component VCCs.)

CAC = connection admission control.

Note that policing, or determining if a connection stays within its contracted parameters, is an entirely different issue.

UBR: all that matters is if PCR <= free_bandwidth. Note that not all of existing allocated bandwidth may be used. We use a priority queue, and have UBR traffic be the lowest priority. This amounts to the requirement that sum(PCR) <= free_bandwidth for all UBR connections.

Actually, if sum(PCR) == free_bandwidth, we can be in a bit of a fix as to analyzing peaks. Figuring out how statistics can help us out here is tricky; getting a good handle on the statistical distribution of data-transmission bursts is not trivial.


ABR: depends on "space available"

ABR and Resource Manager packets
ABR v UBR: ABR gets guaranteed service bounds if it abides by the rules
ACR: allowed cell rate; also Minimum/Peak/Initial CR
significance of MCR

RM (resource manager) cells

These are sent periodically over the link. They include a requested rate, for future data cells. They also contain the following bits:
CI indicates more serious congestion than NI.

CI set: reduce ACR by a percentage

CI not set, NI not set: increase ACR by percentage

CBR: reserve bandwidth, handle these queues on round-robin/fair-queuing basis

VBR

Suppose our bandwidth cap is C. We can require sum(PCR) <= C, or sum(SCR) <= C. Both work, but note that the total queue size needed will be approximately the sum of the appropriate Burst Tolerances (BTs). A VBR flow will typically meet GCRA(1/PCR, BT1) and GCRA(1/SCR, BT2), where the BT2 is much higher than BT1. Therefore, the worst-case queue backlog (representing delay) will be much worse for sum(SCR) = C than for sum(PCR) = C.

How many GCRA(T,𝝉) flows can we have? 1/T = SCR
nrt-VBR: to support a GCRA(T1,𝝉1) flow, need 𝝉1/T1 +1 buffer space. (Actually buffer space ~ 𝝉1/(T1-1) + 1)
To support that and GCRA(T2,𝝉2), we need:

VBR and CTD

rt-VBR: need to account for maxCTD too. This makes things much more complicated, because a simple rule such as sum(SCR)<=C may still leave us with queues that we have the bandwidth and buffer space to handle, but not in enough time to meed the CTD requirement.

Here is an analysis that attempts to take this maxCTD requirement into account. It is from Walrand & Varaiya, High-Performance Communications Networks, Admission Control, 2e:p 398. The goal is to calculate the maximum queue (cell backlog).

Step 1: given GCRA(T,𝝉), what is the "fastest sequence" of cell times?
Give some examples (where line rate = 1 cell per unit time)
We will always have t == tat - 𝝉: ; newtat = max(tat) + T

GCRA(5, 2): 0  3  8 13 18 23...
GCRA(5,10):
arrivals
0
0
0
5
10
15
20
tats
0
5
10
15
20
25
30

In every case, (tat - arrival) <=10, and = 10 when possible

Graph of GCRA(3,25), output line rate = 2.5 ticks per cell
(C = 0.4 cells/tick)
Fastest when we allow multiple cells at the same time tick:  
    0  0  0  0  0  0  0  0  0  2  5
Fastest when we need 1 tick for each cell:  
              0  1  2  3  4  5  6  7  8  9 10 11 12 14 17 20
tats:       0  3  6  9 12 15 18 21 24 27 30 33 36 39 42 45

peak backlog: 8 cells / 13 cells
13 = floor(𝝉/(T-1))+1 = floor(25/2)+1

For a single flow, define M = MaxQueue = floor(𝝉/(T-1)) + 1

Let D = max delay (in cell transmission times)
Note D is delay at this switch; = 1/K of total delay through K switches
C = bandwidth

what is requirement on bandwidth to handle one connection?
We need C >= M/D, where M/D = rate needed to send queue M in time D

[If we're not concerned about D, all we need is enough bandwidth to stay ahead in the long run, and enough buffer space to handle worst-case M, and we can make cell-loss guarantees.]

Also need C > 1/T, the nominal bandwidth.

When is M/D > 1/T? Another way to write this is D < TM. TM = time to send a burst, at the existing rate

With N connections, we get something like

    effective bandwidth needed = N * max(1/T, M/D)

Max backlog is NM; need this cleared in time D so NM <= CD.
    C >= N*(M/D)
Also need C>=N/T, so this yields
    C >= N * max(1/T, M/D)        as above


For D small, α := max(1/T, M/D) is  M/D; about D/M connections can be accommodated

Let us measure D in units of inter-cell spacing.
T measured by those units is 1.
Note D<<T is certainly a possible requirement.
Question: when is 1/T < M/D?    (so M/D term dominates)
ie     T > D/M?
ie    D < TM?
Now take T=1. If D<M, we need extra bandwidth allocation to handle delay. If D>M, then we can take care of a backlog of M simply by sending at the advertised PCR, and no special delay guarantee is needed.

Need extra bandwidth if D < M, and we thus cannot get rid of a burst using usual PCR.
Recall D = max delay, M = time needed to process a burst

numeric example? Depends on given D.


Video example

video connections: 2 Mbps average, peak 10 Mbps (for active scenes)
peak bursts last up to 10 sec, D = 0.1 sec
Burst: 10Mbps for 10 sec = 100Mbit = 12MB = 250Kcells

suppose we have 200Mbps = 471 cells/ms
Do we assign 100 connections, using average? or 20, using peak?

Line rate: 10 Mbps = PCR = 23 cells/ms
max back-to-back cells: 10 sec worth, M = 230,000 cells
Acceptable delay = 10 ms = 2300 cells
α = max(1/T, M/(D+M-1)) = M/(D+M-1) ~ 1.0; must treat as at line rate

statistical approach might double this, if we make the assumption that busy times are, say, 10% of total.