Title: TCP Friendly Rate Protocol TFRC
1TCP Friendly Rate Protocol(TFRC)
2Outline
- Introduction
- Packet Contents
- Data Sender Protocol
- Data Receiver Protocol
- Loss Event Rate
- Security Considerations
- Conclusion
3Introduction
- TFRC is an end-to-end transport level congestion
control mechanism. - Designed to have smoother throughput than TCP
while being TCP compatible. - Intended for real time applications.
- Reasonably fair
- Adjusts the sending rates of packets of fixed
size.
4Receiver-based Approach
- TFRC is a receiver-based mechanism, with the
calculation of the congestion control information
in the data receiver rather than in the data
sender. - Less load on server.
- Congestion control for Multicast traffic.
5Packet Contents
- Two Types of packets in TFRC
- Data Packets
- Feedback Packets
6Data Packets
- Sequence number that is incremented by one for
each data packet transmitted. - Timestamp (ts_i) - indicates when the packet is
sent. - The senders current estimate of the Round trip
time (RTT) .
7Feedback Packets
- Timestamp of the last data packet received.
- Delay -The amount of time elapsed between the
receipt of the last data packet at the receiver,
and the generation of the feedback report. - Receiving Rate - The rate at which the receiver
estimates that data was received since the last
feedback report was sent. - The receiver's current estimate of the
- Loss event rate.
8Data Sender Protocol
- The data sender sends a stream of data packets to
the data receiver at a controlled rate. - When a feedback packet is received from the data
receiver, the data sender changes its sending
rate, based on the information contained in the
feedback report. - If the sender does not receive a feedback report
for two round trip times, it cuts its sending
rate in half. - This is achieved by means of a timer called the
nofeedback timer.
9Senders Tasks
- Calculate a sample of RTT
- Estimate RTT
- Calculate the RTO
- Adjust the sending rate
- Reset the nofeedback timer
10Sample RTT Calculation
- The sender calculates a new RTT sample every time
a feedback packet is received. - R_sample (t_now - t_recvdata) - t_delay
- t_recvdata is the sending time of the last data
packet received by the receiver upon the
generation of this feedback packet. - t_delay is the time elapsed from the receipt of
the last data packet to the generation of this
feedback packet on the receiver -
11Example of Sample RTT
12Estimate RTT
- If no feedback has been received before
- RR_sample
- Else
- R qR (1-q)R_sample
- TFRC is not sensitive to the precise value for
the filter constant q, but recommended default
value is 0.9.
13Calculate the TCP retransmission timeout value
- In TCP algorithm, it is estimated as,
- t_RTO R 4R_var
- where R_var is the variance of RTT.
- TFRCs rough estimate of t_RTO
- t_RTO 4R
14Throughput Equation
- Simplified TCP Reno Equation
- Where X is the transmit rate in bytes/second.
- s is the packet size in bytes.
- R is the round trip time in seconds.
- p is the loss event rate, between 0 and 1.0, of
the number of loss events as a fraction of the
number of packets transmitted. - t_RTO is the TCP retransmission timeout value
in seconds. - b is the number of packets acknowledged by a
single TCP acknowledgement.
15Adjust the sending rate
- If loss_event_rate (p) gt zero then
- recalculate X using the TCP throughput eq.
- when p gt 0, the sender sends at least one packet
every 64 seconds. - if p 0, then the sender is in slow-start
phase, where it approximately doubles the sending
rate each round-trip time until a loss occurs.
16Nofeedback timer
- When no feedback packet is received for an
extended period of time, nofeedback timer will
expire. - Update the receiving rate, last calculated by the
receiver. - Adjust sending rate.
- Reset the nofeedback timer.
- Reset the nofeedback timer to expire after
max(4R, 2s/X) seconds.
17Data Receiver Protocol
- Feedback packets should normally be sent at least
once per RTT, unless the sender is sending at a
rate of less than one packet per RTT, in which
case a feedback packet should be send for every
data packet received. - A feedback packet should also be sent whenever a
new loss event is detected without waiting for
the end of an RTT, and whenever an out-of-order
data packet is received that removes a loss event
from the history. - Sending periodic feedback messages more than once
per RTT in response to high sending rate.
18Loss Event Rate
- Obtaining an accurate and stable measurement of
the loss event rate is of primary importance for
TFRC. - Loss rate measurement is performed at the
receiver, based on the detection of lost or
marked packets from the sequence numbers of
arriving packets. - P 1 / Avg. Loss Interval
19Loss Event Definitions
- A loss event contains one or more losses occurred
during one round trip time. - Loss interval is the number of packets within a
loss event - Loss event rate is the ratio of the number of
loss event and the total number of lost packets.
20Example of Loss Events
RTT
RTT
RTT
1
2
3
4
5
6
7
8
16
9
10
11
12
13
14
15
17
18
Loss Event N
Loss Event N 1
Loss Event N 2
Loss Event N 3
21Detection of Lost or Marked Packets
- The receiver maintains a data structure that
keeps track of which packets have arrived and
which are missing. - The loss of a packet is detected by the arrival
of at least three packets with a higher sequence
number than the lost packet.
22History Discounting
- It allows the TFRC receiver to adjust the
weights, concentrating more of the relative
weight on the most recent loss interval, when the
most recent loss interval is more than twice as
large as the computed average loss interval.
23Security Considerations
- Security primarily needs to be considered in the
context of a specific transport protocol and its
authentication mechanisms. - Exploitation to create denial of service.
- Manipulation by a greedy receiver.
24Conclusion
- Receiver driven End-End Congestion Control
Mechanism. - Provides smoother throughput than TCP while being
TCP-compatible. - Useful for applications such as telephony or
streaming media where a relatively smooth sending
rate is of importance. - With a reasonably low loss rate, TFRC performs
well as a congestion control mechanism.
25References
- 1 M. Handley Request for Comments 3448 S.
Floyd- ICIR, - J. Padhye-Microsoft,J. Widmer-University
of Mannhei, January 2003, RFC 3448,
http//www.faqs.org/rfcs/rfc3448.html - 2 Widmer, J., "Equation-Based Congestion
Control", Diploma Thesis, University of Mannheim,
February 2000. http//www.icsi.berkeley.edu/widme
r/tfrc/thesis/node26.html - 3 Mei Lin, University of Texas at Austin, 2003
- http//www.cs.utexas.edu/ftp/pub/techreports/tr03
-54.pdf
26Questions