Presented by Rajan Includes slides presented by Andrew Sprouse, Northeastern University

Transcription

Presented by Rajan Includes slides presented by Andrew Sprouse, Northeastern University
Presented by Rajan
Includes slides presented by Andrew Sprouse, Northeastern University
CISC 856 TCP/IP and Upper Layer Protocols
Date:May 03, 2011
References
 Low Extra Delay Background Transport (LEDBAT)
draft-ietf-ledbat-congestion-04.txt
 LEDBAT: the new BitTorrent congestion control
protocol - Dario Rossi, Luca Muscariello, Computer
Communications and Networks (ICCCN), 2010
Proceedings of 19th International Conference
Peer to peer computing
• Tasks or workloads
partitioned between peers.
• Peers are both suppliers and
consumers of resources.
BitTorrent
• A peer-to-peer file transfer protocol
• Very popular today.
[2009]
BitTorrent mechanism:
• Files are broken into pieces.
– Users each download different pieces from the
original uploader (seed).
– Users exchange the pieces with their peers to
obtain the ones they are missing.
• This process is organized by a centralized
server called the Tracker.
 1. Seeder generates a
torrent file
 Uploads torrent to a
web server.
 Seeder – A client
sharing 100% of the
shared file.
 2. The seeder notifies
the tracker that it is
sharing the file
described in the
torrent file.
 3. A bitTorrent user
downloads the torrent
file from the web
server
 bitTorrent user – client
downloading the
shared file from the
seeder.
 4. The bitTorrent user
connects to the
tracker specified in the
torrent file.
 The tracker returns a
list of other peers who
are sharing the file.
 5. The bitTorrent user
connects to its peers
to retrieve pieces of
the files.
{1,2,3,4,5,6,7,8,9,10}
Seeder:
A
{}{1,2,3}
{1,2,3,5}
{}
{1,2,3}
{1,2,3,4}
{1,2,3,4,5}
Downloader
Downloader
B
C
Motivation
User
A
downloading
files
Send buffer of
modem
Modem
User
B
checking
email
Motivation
• Fair?
– BitTorrent traffic - background transfers.
– Need higher priority than checking mail.
• Why such unfairness?
– BitTorrent uses multiple TCP connections.
– More connections, the larger share of the bandwidth
BitTorrent gets.
• Problems:
– Apart from priority, TCP fills buffer, increasing delay.
Motiivation
• Traditional solution
– Cap the upload rate of the BitTorrent client to 80%
of the up-link capacity.
• Disadvantage:
– Only 20% for interactive traffic.
– 20% wasted if no interactive traffic.
Goals
LEDBAT Overview
A
B
Timestamp
Ack. delay
Ack. delay
•base_delay
•queuing_delay
•off_target
•cwnd
One way delay:
• LEDBAT use one-way delay to estimate
queuing delay.
• Why one way delay?
– Avoid reverse path congestion.
Base delay & Queuing delay:
A
Remote_timestamp
=Time.now()
Current_delay =
Ack delay
base_delay =
min(current
delay ,
base_delay)
Queuing delay=
current delay base delay
B
Ack delay =local timestamp
– remote timestamp
Base delay estimate
• End-to-end delay:
– Transmission delay
– Propagation delay
– Processing delay
– Queuing delay
Barring noise,
these 3 delays
are constant
Initial estimate of base delay:
A
Router
B
• Initial base_delay = infinity
• No queuing delay.
– Acknowledgement Delay = Transmission delay +
Propagation delay + Processing delay
– Base_delay = min(infinity, Acknowledgement delay)
TARGET, off_target and cwnd
• TARGET is the maximum queuing delay that LEDBAT
tolerates.
• Off_target = TARGET - queuing delay.
– For example if TARGET = 20 ms
– If queuing delay > 20, then sender rate is decreased
– If queuing delay < 20, then sender rate is increased
• off_target < 0 , decrease sender rate.
• off_target > 0, increase sender rate.
• cwnd += GAIN * off_target / cwnd
– Where GAIN = the rate at which the congestion window
responds to changes in queuing delay.
Max Rampup rate
• fastest increase if and only if queuing = 0
• Sender rate is 1 MSS per RTT as in TCP.
Halves on congestion
• in case of loss, LEDBAT should behave like TCP
• halve its congestion window
Controller
• A proportional-integral-derivative (PID) is used
to govern dynamic of the congestion window.
• Controller is characterized by 2 parameters:
– TARGET set to 25 ms
– GAIN = 1/TARGET
• queuing > target → slower sender rate
• queuing < target → faster sender rate
• queuing ≈ target → steady (stability)
TCP
A
B
A
B
LEDBAT
ssthreshold
=4
Additive
Increase
starts
TARGET =4
Example
• Settings:
– Packet size = 1500 bytes
– All flows have same RTT = 50ms. (one way base
delay = 25ms)
– Link capacity = 10 Mbps
– Buffer size = 40 packets.
– TARGET = 20 packets
LEDBAT
source
Modem
TCP source
LEDBAT performance
LEDBAT against TCP:
at t =0
In both case, the flow starts in
the same time.
LEDBAT vs LEDBAT
0 2
4
6
8 10 12
time
14
Micro Transport Protocol
• UDP-based variant of the bitTorrent peer to
peer file sharing protocol.
• congestion control algorithm used by µTP,
known as Ledbat
ver
type
extension
Connection_id
Timestamp_microseconds
Timestamp_difference_microseconds
Wnd_size
Seq_nr
Ack_nr