experiment and analysis of dynamic tcp acknowledgement
DESCRIPTION
Experiment And Analysis of Dynamic TCP Acknowledgement. Daeseob Lim Sam Lai Wing-Ho Gordon Wong. What is the main problem of dynamic TCP acknowledgment?. To ACK, or not to ACK: that is the question. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/1.jpg)
1
Experiment And Experiment And Analysis ofAnalysis ofDynamic TCP Dynamic TCP AcknowledgementAcknowledgement
Daeseob Lim
Sam Lai
Wing-Ho Gordon Wong
![Page 2: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/2.jpg)
2
What is the main problem of dynamic TCP acknowledgment? To ACK, or not to ACK: that is the
question. When a packet arrives to the receiver,
there are two choices:ACK immediately.Wait and ACK later, such that you may have
the chance to acknowledge multiple packets with just one ACK.
![Page 3: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/3.jpg)
3
What’s the difference?
ACK immediately: low latency : time elapses between the packet
arrival and the ACK for this packet is send. No. of ACK packet increase.
Wait and ACK later:High latencySmall amount of ACK packet generated
![Page 4: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/4.jpg)
4
What consider to be the best solution? Low no. of acknowledge Low aggregate acknowledgement latency
for all packets
![Page 5: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/5.jpg)
5
Aggregate latency example:
The total ACK latency is 30ms in this case.
Packet A Arrive Packet B Arrive Send single ACK for both A and B
10ms 10ms 10ms
ACK latency for B is 10ms
ACK latency for A is 20ms
![Page 6: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/6.jpg)
6
Naïve Solutions
Send ACK immediately for each packet?Low or even no ACK latency, but this will
generate too much ACK packets Send one ACK for all the end of all
transmits?Only one ACK is neededHowever, high latencyDon’t know which one is the last packetWhat if the link is unreliable?
![Page 7: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/7.jpg)
7
An Online Randomized Algorithm
Dynamic TCP acknowledgement and other stories about e/(e-1)By Anna R. Kalin, Claire Kenyon, Dana
Randall Able to achieve a competitive ratio of 1.58
compare to the optimal solution Competitive ratio = performance of the
algorithm / performance of the optimal solution
![Page 8: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/8.jpg)
8
Detail about this algorithm
P(t, t`) be the set of packets arrive between time t and t`
There exists z such that z is between 0 and 1 inclusively
Distributed function to produced z. (randomized factor)
Suppose that ith acknowledgement happens at time i and the next one happen at time ti+1
(con’t)
![Page 9: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/9.jpg)
9
Detail about the algorithm
By the algorithm, we should locate Ti+1 such that ti <= Ti+1 <= ti+1 and P(ti, Ti+1)(Ti+1 - ti+1) = z
If we do that, z unit of latency cost will be saved by sending a single additional ACK at Ti+1.
![Page 10: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/10.jpg)
10
Before applying the algorithm
![Page 11: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/11.jpg)
11
After the algorithm
![Page 12: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/12.jpg)
12
Why this works?
The rectangle is guarantee to have area of at least 1
By sending 1 additional ACK, the acknowledgement cost increase by 1, but the latency cost decreases by at least 1.
The new sequence is at least as good as the original one.
More detail proof in the paper. Dynamic TCP acknowledgement and other stories
about e/(e-1)
![Page 13: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/13.jpg)
13
Contribution of this research
Implement a randomized online algorithm about delayed ACK into Linux kernel
Compare real performance of the randomized algorithm and the current TCP implementation
Observe its superiority in terms of cost Analyze its inability in terms of throughput
![Page 14: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/14.jpg)
14
ACK for data packet
Data packet
Receiver
Data packetReceiver
ACK packet
Immediate Immediate ACKACK
Delayed Delayed ACKACK
Data packet
Receiver
ACK packet
Schedule a timer
Timer expired
≈ 40ms
![Page 15: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/15.jpg)
15
Interval of Delayed-ACK Timer
Determined by some factorsMinimum/maximum interval by kernel constantsEstimated RTT
Restrictions by RFC 2581The maximum is 500ms.Acknowledge at least every second segment.Acknowledge out-of-order data immediately.
In most cases, ≈ 40ms (~ 200ms)
![Page 16: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/16.jpg)
16
Implementation of TCP on Linux
Need to send an Need to send an immediate ACK?immediate ACK?
tcp_rcv_established()
__tcp_ack_snd_check()
tcp_send_ack() tcp_send_delayed_ack()
Received a data packet from IP-layer
YesNo,
Then why not ‘Delayed ACK’?
The point to hack kernel
codes !!
![Page 17: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/17.jpg)
17
Hacking protocol stack
Cost > Random Cost > Random value ?value ?
Send additional ACK !
tcp_send_delayed_ack()
Choose a random value
Yes
No
Scale to threshold value
Cost = Unacked data size * Elapsed time since last ACK
![Page 18: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/18.jpg)
18
Generating random number
Generate random numbers in advance, store them into kernel codes, and select a number sequentially
y = ex/(e-1)
1X
Y
0.599, 0.761, 0.232, 0.378, 0.619, 0.997,
….
….
unsigned rand_numbers[1000] = {0.599, 0.761, 0.232,0.378, 0.619, 0.997,….….
};
….
number = rand_numbers[index++];
Generate numbers with off-line program
Select random number in the array
![Page 19: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/19.jpg)
19
Test Environment
Client
Router
Server
ModifiedKernel
+NetworkSniffer
(Ethereal)
NetworkEmulator
(ns2)
![Page 20: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/20.jpg)
20
Competitive Ratio Experiment The server sends out 100 packets to the
client at random time spacing at most 70ms apart.
The competitive ratio is calculated for each cost ratio starting from 0.05 to 0.95 stepping by 0.05, then 0.900 to 0.995 stepping by 0.005.
Run on simulated networks having bandwidth of 100Mbps and RTT of 2ms and 100ms for both versions of TCP.
![Page 21: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/21.jpg)
21
Overall Competitive Ratioon 2ms Network
1
10
100
1000
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1Cost Ratio
Com
petit
ive
Rat
io
Original TCPNew TCP
![Page 22: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/22.jpg)
22
Overall Competitive Ratioon 100ms Network
1
10
100
1000
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1Cost Ratio
Com
petit
ive
Rat
io
Original TCPNew TCP
![Page 23: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/23.jpg)
23
Blowup Competitive Ratioon 2ms Network
1
1.2
1.4
1.6
1.8
2
2.2
2.4
0.9 0.92 0.94 0.96 0.98 1Cost Ratio
Com
petit
ive
Rat
io
Original TCPNew TCP
![Page 24: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/24.jpg)
24
Blowup Competitive Ratioon 100ms Network
1
1.2
1.4
1.6
1.8
2
2.2
2.4
0.9 0.92 0.94 0.96 0.98 1Cost Ratio
Com
petit
ive
Rat
io
Original TCPNew TCP
![Page 25: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/25.jpg)
25
Analysis For new TCP, overall the competitive ratio
is within 1.58 except for borderline cases.Small cost ratio:
Expensive latency cost Overhead from network sniffer Overhead from new TCP
Large cost ratio: Expensive acknowledgement cost Original TCP acknowledgements Possibility of additional acknowledgement
![Page 26: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/26.jpg)
26
Analysis
For original TCP, the competitive ratio starts out extremely high, then converges rapidly with the new TCP. Eventually, it starts to increase, but at a slower rate.Favors delay acknowledgement even when
latency cost is high.Always acknowledge within 200ms or every 2
packet full of data even when acknowledgement cost is high.
![Page 27: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/27.jpg)
27
Streaming Data Experiment
The client sends out a request to the server asking for data of a certain size to be sent.
The server replies with the data. The client measures the total duration to
determine throughput. Run on simulated networks having
bandwidth of 100Mbps and RTT of 2ms and 100ms for both versions of TCP.
![Page 28: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/28.jpg)
28
Streaming Data Result
RTTOriginal
TCP
New TCP
Throughput Speedup
2ms 6.926Mbps 6.873Mbps 0.992
100ms 0.577Mbps 0.577Mbps 1
![Page 29: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/29.jpg)
29
Analysis The new TCP can not outperform the
original TCP in terms of throughput. Intuitively, you can imagine, if the incoming
traffic is regular and data keeps pouring in, to optimize throughput, you’d want to delay ack as long as possible.
The new TCP can not do delay ack longer than the original TCP.
Random scale down of the threshold for sending an additional acknowledgement.
Our implementation induces little overhead.
![Page 30: Experiment And Analysis of Dynamic TCP Acknowledgement](https://reader035.vdocuments.us/reader035/viewer/2022062720/5681334c550346895d9a5173/html5/thumbnails/30.jpg)
30
Conclusion
Prove the randomized algorithm can achieve the competitive ratio of 1.58 in most cases.
Our implementation achieves better competitive ratio comparing to the original TCP in most cases.
Low overhead implementation. Can not improve network performance in
terms of throughput.