Title: Modeling TCP Throughput: A Simple Model and its Empirical Validation
1Modeling TCP Throughput A Simple Model and its
Empirical Validation
- Ross Rosemark
- Penn State University
2Goals of Presentation
- Intro to TCP
- Particularly discuss the Reno flavor of TCP
- Show how TCP is innately a self tuning algorithm
- Discuss the goals of this paper
- State assumptions
- Note I do not discus in details any math.
- Discuss Analysis
- State goals of analysis
- State analysis conclusions
- Analyize Paper
- What contributions does it make
- Other these contributions significant?
3What is TCP?
- According to Computer Networking by James
Kurose TCP acronym for - Transmission Control Protocol
- TCP together with UDP form the very core of
today's Interenet transport layer. - TCP is a protocol to send messages between two
machines.
4So what is the difference between TCP and UDP?
- As discussed, there are two ways to send
messages.. - UDP
- TCP
- The difference between these protocols is that
- UDP is NOT guaranteed to deliver a packet
- It only does a Best Effort approach
- TCP is guaranteed to deliver a packet
5How does TCP work?
- When explaining TCP assume that there are two
nodes (Node A and B) and Node A is sending a
packet to Node B utilizing TCP. - High Level example of TCP under ideal
circumstances - Node A sets a timer (TimeoutTimer)
- Node A sends a packet (segment) to Node B
- This segment contains a unique sequence number
- Node B sends an Ack to Node A
- Tells Node A that it received the msg.
- Node As TimeoutTimer expires
- Does nothing since received Ack from Node B
- Node B stores the bytes it receives in a buffer
- Application gets bytes from buffer
6So what are some cases where TCP is not Ideal?
- In TCP a packet can be lost during several
locations. - When the packet is transmitted from A to B
- At Node B
- When the packet it transmitted from B to A
7How can you detect that packets have been lost?
- There are two ways.
- Timeout
- Triple acknowledgement
8Timeout
- Typically congestion is the reason messages are
lost due to timeouts
- Node A knows its message is lost if
- Its timer expires and it has not received an Ack
from Node B - If a message is lost
- Node A resets its timer
- Node A resends the packet
- Same sequence number
- Process repeats
9Quick Discussion Based on the discussion. how
is TCP a self tuning algorithm.
- In TCP if node As timer expires before an ack is
received it sets its timer for double its
previous timer. - For instance, if Node A waits 10 seconds for an
ack for packet 1 - After 10 seconds if node A receives no Ack
- Node A retransmits packet A
- Sets it timer for 20 seconds
- Once a packet an Ack received it sets its timer
back to the original 10 secs.
10Triple Acknowledgement
- Another way of determining packet loss
- First things to note
- In TCP packets must be delivered in order
- Also Node A (i.e. sender) can send multiple
packets at a time - Technically what is a triple acknowledgement
- When a sender receives multiple Acks for the same
packet
11Triple Acknowledgement Example
- Node A sends 5 packets
- Node A never receives an Ack for the second one
- Node B receives packets 1, 3,4, 5
- When node B receives packets 3, 4, 5 send an ack
that signifies that it never seen packet 2 - Node 2 receives 3 acks for the same packet it
retransmits lost packet
12How can you limit packet loss?
- What happens if Node A sends packets quicker then
Node B processes the packet. - In this case Node Bs buffer overflows
- To ensure this does not happen TCP implements
- Flow control process
- Speed matching service matching the rate at
which the sender is sending to the rate at which
the receiving application is reading
13How is TCP implement flow control?
- Node B has a buffer
- The available space varies depending on how many
packets received it received from Node A as well
as the rate the Node B is processing the packet. - Every time Node B sends a packet to Node A, Node
B specifies the remaining size of its buffer - Node A determines the number of packets it can
send without overflowing node Bs buffer - After Node A sends these packets it waits until
it receives an Ack from Node B. - Once it receives an Ack Node A can send another
packet. - This windows size varies over time.
14Example of Window Size
15Does dropped packets affect Congestion Control?
- Oops not only can node B experience congestion
but routers between Node A and B can experience
congestion - How do you adjust the rate A sends packets based
on these also. - If Node A experiences packet loss as a result of
timeout - it cuts its window size in half.
- It then incrementally increases its window size
as it receives Acks. (slow start) - When the window size hits a threshold it grows
its window exponentially - If Node A experiences packet loss as a result of
Triple Ack - It cuts its window size in half
- It then incrementally increases its window size
as it receives Acks. . (slow start) - When the window size hits window size hits ½ the
value it had before the timeout it exponentially
grows the window
16Quick Discussion Again how is TCP a self tuning
algorithm?
- As discussed TCP self tunes to alleviate
congestion - I.e. in TCP a nodes window size fluctuates based
on the ability of Node B to process packets.
17Reno Flavor TCP
- In this paper they only consider the Reno flavor
of TCP - They argue its most widely used on the internet
- Difference between TCP and TCP reno.
- Whenever Node A is in a slow start and receives a
triple Ack, it cancels the slow start and starts
growing its window exponentially - Known as fast recovery
18Paper
- Paper Title Modeling TCP Throughput A simple
model and its empirical validation - Goals of paper
- Model TCP empirically (i.e. through a lot of
math) - Predict throughput
- Previous work
- People have previously simulated TCP in
simulation - Not sufficient as does not offer TCP-friendly,
throughput for a non-TCP flow that interacts with
a TCP connection - For instance FTPF interacting with TCP
19Paper
- In this paper the authors state
- Their approach captures
- TCPs fast retransmit mechanism (done in previous
work) - TCPs timeout mechanism on throughput (not done
in previous work) - Their approach is able to accurately predict
throughput over a significantly wider range of
loss rate than before.
20Assumptions
- They model TCP congestion avoidance behavior in
terms of rounds - i.e. round starts with the back-to-back
transmission of W packets, where W is the current
size of the TCP congestion widow. - Once all packets in this window sent no further
packets are sent until first Ack is received - The duration of a round is equal to the round
trip time and is assumed to be independent of the
window size. - Also assume that the time it takes to send all
packets in a window is less then the round trip
time. - A receiver sends one Ack for every two packets
received
21Assumptions (Cont)
- A packet is lost in a round independently of any
packets lost in other rounds - Packet loss is correlated among back to back
transmissions in a round. - i.e. one packet in a round dropped all subsequent
packets in the round dropped.
22Before we forget lets analyze these assumptions
based on what we know about TCP.
- Are these assumptions acceptable?
- They model TCP congestion avoidance behavior in
terms of rounds - Makes sense TCP does the same thing
- The duration of a round is equal to the round
trip time and is assumed to be independent of the
window size. - I would assume the window size does impact the
round time since the window size dictates how
many packets are sent.. - Hence this effects the length of the timeout
timer since the last packet in the windows timer
will go off before the first packet in the
widows timer. - The time it takes to send all packets in a window
is less then the round trip time. - No necessarily.. A node could sets its timer to
short and have to periodically adjust it as it
further learns the time it takes to send a packet
to the receiver
23Assumption Analysis
- A receiver sends one Ack for every two packets
received - Sounds good to me I dont know what the problem
with this would be. - A packet is lost in a round independently of any
packets lost in other rounds - Not valid..
- What happens if node A sends packet 1 to node B
in round 1 via Router C - This packet fills Router Cs queue
- Node A realizes this packet is lost and resends
this packet to B which B receives and sends Ack
which A receives - In another round Node A sends packet 2 to node B
via Router C - Since packet 1 is still filling up router Cs
buffer, this packet is dropped. - As you can see packet1 effects packet2
24Assumption Analysis
- Packet loss is correlated among back to back
transmissions in a round. - Very invalid
- Node A sends in round 1 packet 1 to node B via
router 1 - Packet lost at router 1
- Node A then sends in round 1 packet 2 to node B
via router 2 - Packet received by Node B
- Also dont understand how you can get triple acks
if all subsequent packets are lost? - Anyone?
25What do they develop empirical models for?
- Develop stochastic model of TCP congestion
control in several steps, corresponding to its
operating regimes - When loss indication are exclusively from triple
duplicate acks - When loss indications are both Timeout and triple
duplicate - When congestion window is limited by receivers
advertised window. - I dont get into the math at all
26Measurements and Trace Analysis
- Experimental setup
- Obtained data from 37 TCP connections established
between 18 hosts scattered across US and Europe - Operating systems at these hosts varied form
win95-sun-linux - Mostly flavors of linux
- TCP varies between approaches
- In linux 2 acks instead of 3 for triple duplicate
Ack - All data sets are for unidirectional bulk
transfers - i.e. FTP
27Measurements and Trace analysis
- Example of data utilized in experiments
- Shows overview of traces of machine.
- They would like to point out how Timeout (TO)
dominated the packets lost. - This data is used to validate their models
28Measurements and Trace analysis
- Broke trace data from 1 hour into 100 second
intervals. - Each point is a 100 sec interval
- Plotted in lines
- Another papers model
- Considers only triple duplicate acks
- Their model (proposed full)
- TD no timeout only triple duplicate acks
- TO -gt at least one timeout but no exponential
backoff - T1 -gt experiences one exponential back off
- i.e. timeout after a timeout
- T2 -gt experience two exponential back off
- T3-gt experience three exponential back off
29Measurements and Trace analysis
- Their approach better estimates observed model.
- Their approach
- proposed (Approximate)
- Other approach
- TD Only
30Problems with their model
- Their approach is not always good
- In this graph the other model is a better
estimator - They believe because in this data a lot of
duplicate acks are transpire - Recall in the other paper they are only trying to
estimate duplicate acks - In this paper they are also estimating timeouts..
Etc
31Questions?