NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux...
-
Upload
griselda-loraine-ramsey -
Category
Documents
-
view
215 -
download
0
Transcript of NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux...
![Page 1: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/1.jpg)
NS-2 TCP-NS-2 TCP-LinuxLinux
David Wei and David Wei and Pei CaoPei Cao
![Page 2: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/2.jpg)
OutlineOutline
MotivationMotivation Code structure of NS-2 TCP-Linux Code structure of NS-2 TCP-Linux
agentagent Design of Design of Scoreboard1Scoreboard1, a new , a new
module for SACK processingmodule for SACK processing Validation ResultsValidation Results
![Page 3: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/3.jpg)
Why one more TCP agent in Why one more TCP agent in NS-2?NS-2?
![Page 4: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/4.jpg)
TCP Implementations in TCP Implementations in NS-2NS-2
Low simulation accuracyLow simulation accuracy Low simulation performanceLow simulation performance
up to 20 hours to run a simulation of up to 20 hours to run a simulation of 200-second traffic on gigabit links200-second traffic on gigabit links
Poor extensibilityPoor extensibility Much fewer number of congestion Much fewer number of congestion
control algorithms than Linux 2.6control algorithms than Linux 2.6
![Page 5: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/5.jpg)
TCP Implementations in TCP Implementations in Linux 2.6Linux 2.6
Standard interface for congestion control Standard interface for congestion control algorithms: algorithms: void start(struct tcp_sock *tp):void start(struct tcp_sock *tp): init the algorithm init the algorithm u32 ssthresh(struct tcp_sock *tp):u32 ssthresh(struct tcp_sock *tp): called after packet called after packet
lossloss u32 min_cwnd(struct tcp_sock *tp):u32 min_cwnd(struct tcp_sock *tp): called after loss called after loss void cong_avoid(struct tcp_sock *tp, u32 ack, u32 rtt, void cong_avoid(struct tcp_sock *tp, u32 ack, u32 rtt,
u32 in_flight, int good):u32 in_flight, int good): called after ack received called after ack received void rtt_sample(struct tcp_sock *tp, u32 rtt):void rtt_sample(struct tcp_sock *tp, u32 rtt): called called
after rtt calculationafter rtt calculation set_state(…)set_state(…), , cwnd_event(…)cwnd_event(…), , undo_cwnd(…)undo_cwnd(…), ,
get_info(…)get_info(…) Better SACK processing than NS-2 Better SACK processing than NS-2
implementationimplementation
![Page 6: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/6.jpg)
Narrow the gap between Narrow the gap between NS-2 and Linux 2.6 NS-2 and Linux 2.6 NS-2 NS-2
TCP-LinuxTCP-LinuxDesign goals of Design goals of NS-2 TCP-LinuxNS-2 TCP-Linux:: Accuracy: Accuracy:
Use congestion control algorithm code Use congestion control algorithm code **as-is*as-is* from Linux 2.6 source trees from Linux 2.6 source trees
Improve SACK processingImprove SACK processing Extensibility: Extensibility:
Import the concept of interfaces for loss Import the concept of interfaces for loss detection algorithms detection algorithms
Speed: Speed: Improve event queue schedulerImprove event queue scheduler
![Page 7: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/7.jpg)
Code structureCode structure
![Page 8: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/8.jpg)
An example of congestion An example of congestion control algorithm in control algorithm in NS-2 NS-2
TCP-LinuxTCP-Linux
![Page 9: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/9.jpg)
Status of Status of NS-2 TCP-LinuxNS-2 TCP-Linux
Imported all 9 congestion control algorithms Imported all 9 congestion control algorithms from Linux 2.6.16-3from Linux 2.6.16-3 Reno (FACK), Vegas, HS-TCP, Scalable-TCP, BIC, Reno (FACK), Vegas, HS-TCP, Scalable-TCP, BIC,
Cubic, Westwood, H-TCP, HyblaCubic, Westwood, H-TCP, Hybla Imported 3 experimental congestion control Imported 3 experimental congestion control
algorithms in testing for future Linux versionsalgorithms in testing for future Linux versions Veno, TCP-LP, TCP Compound (MS Windows Vista)Veno, TCP-LP, TCP Compound (MS Windows Vista)
3 bugs were found with Linux 2.6 HighSpeed 3 bugs were found with Linux 2.6 HighSpeed TCP, 1 performance problem is found with TCP, 1 performance problem is found with Linux 2.6 VegasLinux 2.6 Vegas
![Page 10: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/10.jpg)
Using Using LinuxTCPAgentLinuxTCPAgent in in NS-2 SimulationsNS-2 Simulations
Easy usage for all users to migrate TCL Easy usage for all users to migrate TCL scripts:scripts:
……#set tcp [new Agent/TCP/Sack1]#set tcp [new Agent/TCP/Sack1]set tcp [new Agent/TCP/Linux]set tcp [new Agent/TCP/Linux]……#everything else is the same#everything else is the same……ns at 0 “tcp select_ca reno”ns at 0 “tcp select_ca reno”……#everything else is the same#everything else is the same……
![Page 11: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/11.jpg)
Better SACK ProcessingBetter SACK Processing
Scoreboard1: Scoreboard1: Combines Combines NS-2 Sack1 NS-2 Sack1 design and design and
Linux Linux scoreboardscoreboard design design Enable correct implementation of Enable correct implementation of
FACKFACK Simulation speed similar to Simulation speed similar to NS-2 NS-2
Sack1Sack1
![Page 12: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/12.jpg)
SACK Processing in NS-2 SACK Processing in NS-2 Sack1Sack1
Reassembly queueReassembly queue Pro: scans the SACK list very fastPro: scans the SACK list very fast Con: difficult to implement FACK correct, Con: difficult to implement FACK correct,
can’t identify retransmitted packets, etc.can’t identify retransmitted packets, etc.
![Page 13: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/13.jpg)
SACK processing in SACK processing in Linux 2.6Linux 2.6
Per-packet state machinePer-packet state machine Con: slower processing of SACK listsCon: slower processing of SACK lists
![Page 14: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/14.jpg)
ScoreBoard1ScoreBoard1 Combine the Linux design (state Combine the Linux design (state
diagram for each packet) and Sack1 diagram for each packet) and Sack1 design (Reassembly Queue)design (Reassembly Queue)
![Page 15: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/15.jpg)
Validation ResultsValidation Results
Accuracy: Comparable to Linux Accuracy: Comparable to Linux results in the level of congestion results in the level of congestion window trajectorieswindow trajectories
Simulation speed:Simulation speed: Best case: 50 times faster than NS-2 Best case: 50 times faster than NS-2
SACK1 SACK1 Worst case: as fast as NS-2 SACK1 Worst case: as fast as NS-2 SACK1
Memory consumption: very similar Memory consumption: very similar memory usage as NS-2 SACK1memory usage as NS-2 SACK1
![Page 16: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/16.jpg)
Evaluation SetupEvaluation Setup Comparing NS-2 TCP-Linux Results with Comparing NS-2 TCP-Linux Results with
Dummynet Results.Dummynet Results.
![Page 17: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/17.jpg)
Accuracy: Accuracy: window window
trajectorytrajectory
![Page 18: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/18.jpg)
ExtensibilityExtensibility
![Page 19: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/19.jpg)
Accuracy: throughput in Accuracy: throughput in lossy linklossy link
![Page 20: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/20.jpg)
Why use Why use NS-2 TCP-LinuxNS-2 TCP-Linux
NS-2 Analysis community: NS-2 Analysis community: Able to analyze new algorithms without Able to analyze new algorithms without
waiting for the availability of the NS-2 waiting for the availability of the NS-2 versionsversions
Higher accuracy and faster simulationHigher accuracy and faster simulation
Linux Implementation community:Linux Implementation community: Able to run repeatable simulation to test Able to run repeatable simulation to test
new algorithmsnew algorithms A larger user pool to find bugsA larger user pool to find bugs
![Page 21: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/21.jpg)
TCP-LinuxTCP-Linux: a better TCP for : a better TCP for NS-2NS-2
Future works:Future works: D-SACK processing and window D-SACK processing and window
reduction undoreduction undo Support for non-SACK receiversSupport for non-SACK receivers A tutorial for the public: “Tuning A tutorial for the public: “Tuning
TCP in NS-2”TCP in NS-2” A TCP benchmark suite in NS-2A TCP benchmark suite in NS-2
![Page 22: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/22.jpg)
Thank youThank you
Questions ?Questions ?
![Page 23: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/23.jpg)
Example 1: variable overflowExample 1: variable overflowin Linux HS-TCPin Linux HS-TCP
![Page 24: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/24.jpg)
cwnd
rate
Example 2: AI bugs in Linux Example 2: AI bugs in Linux HS-TCPHS-TCP
RTT: 64ms
Flow #: 32
(4 flows are presented)
Capacity: 100Mbps
Buffer size: 220pkt
Acker: Sack1/DelAck
![Page 25: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/25.jpg)
Performance: SpeedPerformance: Speed
![Page 26: NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.](https://reader036.fdocuments.us/reader036/viewer/2022062515/56649d095503460f949dae88/html5/thumbnails/26.jpg)
Performance: MemoryPerformance: Memory