Difference between revisions of "SOCIS2017"

From Nsnam
Jump to: navigation, search
Line 11: Line 11:
 
* '''Mentor:''' [mailto:tommaso.pecorella@unifi.it Tommaso Pecorella]
 
* '''Mentor:''' [mailto:tommaso.pecorella@unifi.it Tommaso Pecorella]
  
* '''Abstract:''' The goal of the project is the improvement of the emulation performance of the simulator. The project introduces a device in ns-3 that uses the netmap primitives to process the incoming and outgoing traffic. netmap is a fast packets processing that bypass the host networking stack and gains direct access to network device. Also, the project introduces a flow control mechanism between the traffic control of ns-3 and the device ring. Finally, the project introduces a performance evaluation of the introduced device in ns-3 in emulation scenarios on real device.
+
* '''Abstract:''' The goal of the project is the improvement of the emulation performance of the simulator. The project introduces a device in ns-3 that uses the netmap primitives to process the incoming and outgoing traffic. netmap is a fast packets processing that bypass the host networking stack and gains direct access to network device. Also, the project introduces a flow control mechanism between the traffic control of ns-3 and the device ring. Finally, the project introduces a performance evaluation of the introduced device in ns-3 in emulation scenarios on real device. The project enables a more accurate evaluation of high level protocols, e.g., Deley Tolerant Networking protocols (DTN), and of the scheduling algorithms in emulated scenarios.
  
 
* '''Code:''' https://github.com/pasquimp/ns-3-dev-git/commits/socis
 
* '''Code:''' https://github.com/pasquimp/ns-3-dev-git/commits/socis
Line 21: Line 21:
 
= Approach =
 
= Approach =
  
In the first step the project introduces netmap in ns-3 to gain direct access to network device. netmap allows to bypass the host networking stack and to map the device memory in user space area. In the second step the project introduces a realistic flow control mechanism between the traffic control of ns-3 and the real devices ring. Finally, the project implements the required optimisation to gain the performance improvement on real device emulation scenarios.
+
In the first step the project introduces netmap in ns-3 to gain direct access to network device. netmap allows to bypass the host networking stack and to map the device memory in user space area. This step includes the integration of the netmap headers in ns-3 and the introduction of a new device, i.e., NetmapNetDevice, in the fd-net-device module. Also, the emu-fd-net-device-helper will be extended with the introduction of a new function to set the emulation in netmap mode. This step includes functional testing of the new device by ping a real host connected back-to-back.
 +
 
 +
In the second step the project introduces a realistic flow control mechanism between the traffic control of ns-3 and the real device ring. Also, the project will introduce support for Byte Queue Limit (BQL) in the new device. The flow control and BQL will be fundamental to keep a backlog in traffic-control where we will evaluate the presence of backlog and the effectiveness of the Active Queue Management algorithms as consequence of the presence of such mechanisms. The support for flow control and BQL will be tested by ping a real host connected back-to-back and with presence of traffic load (to saturate the transmission ring capacity).
 +
 
 +
In the final step, the project will introduce further optimization to gain the performance improvement on real device emulation scenarios. The performance bottleneck will be evaluated with profiler and we expect to improve the incoming phase, e.g., by removing the dynamic memory allocation, and the outgoing phase, e.g., with the transfer of batch of packets to the new device.
 +
The final step perform a benchmark of the new device by comparison of the new device with the FdNetDevice in emulation mode in a back-to-back scenario of two ns-3 nodes.
  
 
= Deliverables =
 
= Deliverables =
  
The coding period has been divided in three phases. The deliverables at the end of each phase is as mentioned below
+
By the end of the project, the following will be delivered to the ns-3 fd-net-device module
 +
 
 +
* the NetmapNetDevice to send and receive packet using the netmap primitives on an emulated real device and its support for flow control and BQL
 +
* EmuFdNetDeviceHelper extension to provide helper functions useful to set the netmap emulation mode
 +
* functional testing of the new device by ping a real host connected back-to-back with or without presence of traffic load
 +
* benchmark of the new device: comparison of the new device with the FdNetDevice in standard emulation mode in a real scenario of back-to-back of two ns-3 nodes; performance evaluation in term of throghput, rtt, qdisc backlog and dropping.
 +
 
 +
Due to the short timespan of SOCIS 2017, there will be a single deliverable at the end of the project. However, the developed code and documentation is available at https://github.com/pasquimp/ns-3-dev-git/commits/socis. Anyone is encouraged to comment the code and leave feedbacks.
 +
 
 +
Finally, to improve the organization of the coding period it has been divided in three phases. Each phase includes test, documentation and gathering of comments from the community. The milestones expected at the end of each phase are
  
 
===Phase 1===
 
===Phase 1===
Line 31: Line 45:
 
* netmap integration into ns-3
 
* netmap integration into ns-3
 
* new device and its helper that uses netmap primitives
 
* new device and its helper that uses netmap primitives
* test
+
* functional testing with the ping example of a real host connected back-to-back
* documentation
+
  
 
===Phase 2===
 
===Phase 2===
  
* flow control mechanism
+
* support for flow control and BQL
* basic examples and initial performance evaluation
+
* functional testing with a ping example with presence of UDP traffic load
* test
+
* introduction of a example to assess the performance parameters in a back-to-back scenario of two ns-3 nodes with UDP and TCP traffic load
* documentation
+
* intermediate code review
+
  
 
===Phase 3===
 
===Phase 3===
  
* required optimisations
+
* further optimizations
* examples extension and performance evaluation
+
* benchmarck of the new device with the introduced example, i.e., comparison of the performance parameters of the new device and the FdNetDevice in emulation mode in a back-to-back scenarios of two ns-3 nodes
 
* refinement of the whole project
 
* refinement of the whole project
* test
 
* documentation
 
* final code review
 
  
 
= Weekly Reports =
 
= Weekly Reports =
Line 61: Line 69:
 
===Week 1 (July 17-July 23)===
 
===Week 1 (July 17-July 23)===
  
During the first week, I have implemented the extensions in the fd-net-device model and its helpers to support the netmap emulation mode. More specifically, I have
+
During the first week, I have implemented the extensions in the fd-net-device module and its helpers to support the netmap emulation mode. More specifically, I have
  
 
* inserted the check for the netmap installation in the fd-net-device module wscript;
 
* inserted the check for the netmap installation in the fd-net-device module wscript;
Line 79: Line 87:
 
===Week 3 (July 31-August 6)===
 
===Week 3 (July 31-August 6)===
  
 +
I implemented the read method of the new device and tested the new device in a back-to-back scenario with the introduced ping-example. More specifically, I have
  
 +
* implemented the read method of the new device;
 +
* tested the new device in a back-to-back with the ping example
 +
* added traffic load to the ping example to support future test
  
 
===Week 4 (August 7-August 13)===
 
===Week 4 (August 7-August 13)===

Revision as of 14:05, 9 August 2017

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

Return to Summer Projects page.

Project overview

  • Project name: High Performance Emulation of Real Devices in ns-3
  • Abstract: The goal of the project is the improvement of the emulation performance of the simulator. The project introduces a device in ns-3 that uses the netmap primitives to process the incoming and outgoing traffic. netmap is a fast packets processing that bypass the host networking stack and gains direct access to network device. Also, the project introduces a flow control mechanism between the traffic control of ns-3 and the device ring. Finally, the project introduces a performance evaluation of the introduced device in ns-3 in emulation scenarios on real device. The project enables a more accurate evaluation of high level protocols, e.g., Deley Tolerant Networking protocols (DTN), and of the scheduling algorithms in emulated scenarios.
  • About me: I am a PhD student in Information Technology and Electrical Engineering at University of Naples Federico II

Approach

In the first step the project introduces netmap in ns-3 to gain direct access to network device. netmap allows to bypass the host networking stack and to map the device memory in user space area. This step includes the integration of the netmap headers in ns-3 and the introduction of a new device, i.e., NetmapNetDevice, in the fd-net-device module. Also, the emu-fd-net-device-helper will be extended with the introduction of a new function to set the emulation in netmap mode. This step includes functional testing of the new device by ping a real host connected back-to-back.

In the second step the project introduces a realistic flow control mechanism between the traffic control of ns-3 and the real device ring. Also, the project will introduce support for Byte Queue Limit (BQL) in the new device. The flow control and BQL will be fundamental to keep a backlog in traffic-control where we will evaluate the presence of backlog and the effectiveness of the Active Queue Management algorithms as consequence of the presence of such mechanisms. The support for flow control and BQL will be tested by ping a real host connected back-to-back and with presence of traffic load (to saturate the transmission ring capacity).

In the final step, the project will introduce further optimization to gain the performance improvement on real device emulation scenarios. The performance bottleneck will be evaluated with profiler and we expect to improve the incoming phase, e.g., by removing the dynamic memory allocation, and the outgoing phase, e.g., with the transfer of batch of packets to the new device. The final step perform a benchmark of the new device by comparison of the new device with the FdNetDevice in emulation mode in a back-to-back scenario of two ns-3 nodes.

Deliverables

By the end of the project, the following will be delivered to the ns-3 fd-net-device module

  • the NetmapNetDevice to send and receive packet using the netmap primitives on an emulated real device and its support for flow control and BQL
  • EmuFdNetDeviceHelper extension to provide helper functions useful to set the netmap emulation mode
  • functional testing of the new device by ping a real host connected back-to-back with or without presence of traffic load
  • benchmark of the new device: comparison of the new device with the FdNetDevice in standard emulation mode in a real scenario of back-to-back of two ns-3 nodes; performance evaluation in term of throghput, rtt, qdisc backlog and dropping.

Due to the short timespan of SOCIS 2017, there will be a single deliverable at the end of the project. However, the developed code and documentation is available at https://github.com/pasquimp/ns-3-dev-git/commits/socis. Anyone is encouraged to comment the code and leave feedbacks.

Finally, to improve the organization of the coding period it has been divided in three phases. Each phase includes test, documentation and gathering of comments from the community. The milestones expected at the end of each phase are

Phase 1

  • netmap integration into ns-3
  • new device and its helper that uses netmap primitives
  • functional testing with the ping example of a real host connected back-to-back

Phase 2

  • support for flow control and BQL
  • functional testing with a ping example with presence of UDP traffic load
  • introduction of a example to assess the performance parameters in a back-to-back scenario of two ns-3 nodes with UDP and TCP traffic load

Phase 3

  • further optimizations
  • benchmarck of the new device with the introduced example, i.e., comparison of the performance parameters of the new device and the FdNetDevice in emulation mode in a back-to-back scenarios of two ns-3 nodes
  • refinement of the whole project

Weekly Reports

Below the detailed report of the activity

Community Bonding Period (July 3-July 16)

During the community bonding period, I communicated with the mentor to refine the project and its schedule. Also, during this period I improved my knowledge of the fd-net-device module and of netmap.

Week 1 (July 17-July 23)

During the first week, I have implemented the extensions in the fd-net-device module and its helpers to support the netmap emulation mode. More specifically, I have

  • inserted the check for the netmap installation in the fd-net-device module wscript;
  • implemented the requested changes in the FdNetDevice to support its specializations;
  • introduced the new device as derived class of the FdNetDevice class;
  • introduced an helper function in the EmuFdNetDeviceHelper to set the netmap emulation mode;
  • implemented an extension of the raw socket creator to open a netmap fd.

Week 2 (June 24-July 30)

I started the implementation of the methods of the new device. I have

  • implemented the method to switch the emulated interface in netmap mode;
  • implemented a write method to copy a packet in the netmap transmission ring;
  • introduced an example to ping a real host through a real interface in netmap emulated mode.

Week 3 (July 31-August 6)

I implemented the read method of the new device and tested the new device in a back-to-back scenario with the introduced ping-example. More specifically, I have

  • implemented the read method of the new device;
  • tested the new device in a back-to-back with the ping example
  • added traffic load to the ping example to support future test

Week 4 (August 7-August 13)

Week 5 (August 14-August 20)

Week 6 (August 21-August 27)

Week 7 (August 28-September 3)

Wrapping Up (September 4-September 17)