Giter Site home page Giter Site logo

devopsmi / ns3-rdma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bobzhuyb/ns3-rdma

0.0 2.0 0.0 6.22 MB

NS3 simulator for RDMA over Converged Ethernet v2 (RoCEv2), including the implementation of DCQCN, TIMELY, PFC, ECN and shared buffer switch

License: GNU General Public License v2.0

Makefile 0.05% Python 62.66% C++ 36.32% Shell 0.01% MATLAB 0.05% Click 0.04% C 0.23% Perl 0.63% Gnuplot 0.02% Batchfile 0.01%

ns3-rdma's Introduction

NS-3 simulator for RDMA

This is an NS-3 simulator for RDMA over Converged Ethernet v2 (RoCEv2). It includes the implementation of DCQCN, TIMELY, PFC, ECN and Broadcom shared buffer switch.

It is based on NS-3 version 3.17, and ported to Visual Studio environment, as explained here.

Note

TIMELY module has not been merged into this yet. We are working on merging it.

Quick Start

Build

To compile it out-of-the-box, you need Visual Studio 2015. People have successfully built it with free version, which can be downloaded here. Open windows/ns-3-dev/ns-3-dev.sln, just build the whole solution.

If you cannot get a Windows machine or Visual Studio for any reason, you may try building it with the original Makefile. We have done it a while back, but now you probably need to edit a few things in waf to make it work.

Run

The binary will be generated at windows/ns-3-dev/x64/Release/main.exe. We include a sample configuration file at windows/ns-3-dev/x64/Release/mix/config.txt Execute main.exe in windows/ns-3-dev/x64/Release/:

cd windows\ns-3-dev\x64\Release\
main.exe mix\config.txt

It runs a 2:1 incast at 40Gbps for 1 second. Please allow a few minutes for it to finish. The trace will be generated at mix/mix.tr, as defined by mix/config.txt

There are quite a few options in mix/config.txt. We will gradually add documentation. For your own convenience you can just check the code, project "main" -- source files -- "third.cc", and see how these options are parsed. You can also raise issues if you have any questions.

What did we add exactly?

point-to-point/model/qbb-net-device.cc and all other qbb-* files:

DCQCN and PFC implementation. It also includes go-back-to-N and go-back-to-0 that handle packet drop due to corruption.

In 2013, we got a very basic NS-3 PFC implementation somewhere, and developed based on it. We cannot find the original repository anymore.

network/model/broadcom-node.cc and .h:

This implements a Broadcom ASIC switch model, which is mostly doing all kinds of buffer threshold-related operations. These include deciding whether PFC should be triggered, ECN should be marked, buffer is too full so packets should be dropped, etc. It supports both static and dynamic thresholds for PFC.

Disclaim: this module is purely based on authors' personal understanding of Broadcom ASIC. It does not reflect any official confirmation from either Microsoft or Broadcom.

network/utils/broadcom-egress-queue.cc and .h:

This is the actual MMU buffering packets. It also includes switch scheduler, i.e., when upper layer ask for a packet to send, it will decide which queue to be dequeued. Strategies like strict priority and round robin are supported.

applications/model/udp-echo-client.cc:

We implement the RDMA client here, which aligns with the fact that RoCEv2 includes UDP header. In particular, original UDP client has troubles when PFC pause the link. Original UDP client keeps sending packets at line rate, soon it builds up huge queue and memory runs out. Here we throttle the sending rate if it gets pushed back by PFC.

internet/model/seq-ts-header.cc and .h:

We didn't implement the full InfiniBand header. Instead, what we really need is just the sequence number (for detecting corruption drops, and also help us understand the throughput) and timestamp (required by TIMELY.) This is where we encode this information into packets.

main/third.cc:

The main() function.

There may be other edits here and there, especially the trace generation is scattered among various network stacks. But above are the major ones.

Q&A

Q: Why do you port it to Windows?

A: This is a Microsoft project. Visual Studio, including the free version, works well.

Q: Fine. What if I want to run it on Linux, and do not want to spend time changing the build process?

A: You can build it using Visual Studio and run the .exe using WINE. We have tested WINE 1.6.2 and it works well.

Q: I don't understand ... (some part of the code or configuration)

A: Raise issues on GitHub, so that your questions can also help others. If you really do not want others know you are working on this, you can email [email protected]

Q: What papers should I cite, if I also publish?

A: Below are the ones you should definitely check. They are ranked from most relevant to less. That said, all of them are quite relevant:

ECN or Delay: Lessons Learnt from Analysis of DCQCN and TIMELY, CoNEXT'16 (this project is released with this paper, we ask you to at least cite this paper if you use this code.)

Congestion Control for Large-scale RDMA Deployments, SIGCOMM'15 (DCQCN)

TIMELY: RTT-based Congestion Control for the Datacenter, SIGCOMM'15 (TIMELY)

RDMA over Commodity Ethernet at Scale, SIGCOMM'16 (discussed go-back-to-N)

Deadlocks in Datacenter Networks: Why Do They Form, and How to Avoid Them, HotNets'16 (PFC deadlock analysis, directly used this simulator.)

ns3-rdma's People

Contributors

bobzhuyb avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.