Skip to content

RouterBufferAdaptation

esperando edited this page Jul 19, 2018 · 1 revision

Table of Contents

Router Buffer Adaptation

This project is a hardware implementation of the router buffer adaptation algorithm proposed in the paper " Adapting Router Buffers for Energy Efficiency". The NetFPGA router buffer sizing design has been modfied to adapt the buffers dynamicly with the values generated by the algorithm, which takes real time queue occupancy as inputs and generates new values of the buffer size. Java GUI is also modified to output the real time information of queue occupancy,algorithm values and adapted buffer sizes for the test purposes.

Project summary

Status :
Released
Version :
1.0
Authors :
ZHI ZHAO ([email protected]), Vijay Sivaraman, Arun Vishwanath
NetFPGA base source :
2.2.0

Download

Download the package from http://www2.ee.unsw.edu.au/~vijay/research/green/adaptivebuffers.tar.gz.

Description

Algorithm Overview

This project is an hardware implementation of a router buffer adaptation algorithm, which adapts router buffer size according to the queue occupancy to acheive the goal of power saving. There are several thresholds of the queue occupancy, each of which coresponds to a certain value of buffer size to be set in the system. Thus buffer memories will only be used as much as the traffic requires and the rest of the memories can be left "sleep" to maximize the power saving.

The detailed algorithm:

images/algotithm.jpg

The explanation of the parameters used in the algorithm:

images/parameter.jpg

In this project, all parameters are constants:

α = 0.8

Bi = 16KB; Bs = 48KB; Bd = 448KB; Nr = 1-4

Using all the above parameters we can have the output of the algorithm as follows:

images/buffer_value.jpg

The value in the column "queue occupancy in bytes" is used as the input of the algorithm. For example, if the queue occupancy is in 0-13107 bytes, then in hardware the system will think it as 0-1638 64-bit words. Then the output of the algorithm should be 16KB, which is used as new buffer size. And correspondingly the final value set in hardware to buffer size register is 63488. Finally we put buffer level 0 into the event capture packet and in Java GUI if buffer level 0 is detected from the event capture packet then the output of the test file will know that the value "16KB" was set in the hardware.

Hardware Implementation of the algorithm

The whole project is based on project "router buffer sizing". To understand how we implement the algorithm in NetFPGA, we need to understand how buffer size is set in reference router design.

In reference router design, how buffer size is enquiried is as follows:

  1. When store_pkt module wants to put a packet into an output queue, it will enquiry the oq_regs_eval_full module whether the destination output queue is full.
  2. oq_regs_eval_full gets current maximum buffer size from the buffer size register -- oq_full_thresh_reg.
  3. oq_regs_eval_full also gets current queue occupancy from other corresponding registers.
  4. oq_regs_eval_full will judge whether the queue is full. If it is, oq_regs_eval_full will output a "FULL" signal to store_pkt module and store_pkt will drop the packet.
images/implementation.jpg

In project "router buffer sizing", a special new module called "evt_cap_oq_plugin" is created to output the events of pkt_drop, pkt_stored and pkt_removed from the queue to the host through a special packet -- event capture packet. In our implementation we put our algorithm in this module in order to use event capture packet to output the results of the algorithm to test it. The flow of our implementation is as follows:

  1. When store_pkt module wants to put a packet into output queue, it sends the packet size to evt_cap_oq_plugin.
  2. evt_cap_oq_plugin calculates the current queue occupancy, use it as input of the algorithm and get the corresponding new buffer size value.
  3. evt_cap_oq_plugin sets the new buffer size value into the buffer size register -- oq_full_thresh_reg.
  4. oq_regs_eval_full gets new maximum buffer size from the buffer size register -- oq_full_thresh_reg.
  5. oq_regs_eval_full uses the new buffer value as the maximum queue size and decides whether the queue is full or not. It then determines whether to send "FULL" signal to store_pkt module to drop this packet.

Usage

To use the software package for this project, please follow the following steps:

1. Install NetFPGA based on version 2.2.0 or higher in your computer, finish all installations. Since our design is based on existing project "router buffer sizing", it is very important that the normal NetFPGA version is correctly installed in your computer.

2. Dowmload the software package and extract it. You will get a folder "netfpga" and please copy all folders under this folder into your netfpga directory. Replace any existing files if you are promted.

3. If you only want to use the bit file, you can directly use the command:

cd ~/netfpga/bitfiles
nf_download router_buffer_adaptation_0.8.bit

If you want to synthesis the bit file again, you can do the following if you have ISE development tool installed in your computer:

make

4. After downloading the bit file into the FPGA chip, we need to start up scone:

cd ~/netfpga/projects/scone/sw
./scone

5. The last step to use the design is to start up GUI. Because our implementation is based on the project "router buffer sizing", the sh file we use is eventcap.sh instead of router.sh:

cd ~/netfpga/lib/java/gui
./eventcap.sh

By default the FPGA chip will pack the information of time stamp, queue occupancy, operation type ( pkt store, remove and algorithm) and new buffer value in one event capture packet and send it to the host through PCI. When java GUI captures this packet, it will parse it, get all packed information and output these information into standard output -- the screen. To redirect the output to a txt file, we need to do the following:

cd ~/netfpga/lib/java/gui
./eventcap.sh > a.txt

Then after we complete our experiment, we can find a.txt file in /root/netfpga/lib/java/gui, which includes all information we need to test the algorithm.

Testbed setup

A simple topology to test our design is as follows:

images/test_topology.jpg

Note: if no event packet can be captured, please try to put all traffic between two NetFPGA routers through their phsical ports 1.

The following steps are followed to test the algorithm:

1. Edit the file cpuhw to configure the network interfaces for the router:

cd ~/netfpga/projects/scone/sw
gedit cpuhw

Here is an example of cpuhw file:

eth0 192.168.1.254 255.255.255.0 00:00:00:00:00:05
eth1 192.168.0.1 255.255.255.0 00:00:00:00:00:06
eth2 192.168.2.254 255.255.255.0 00:00:00:00:00:07
eth3 192.168.5.1 255.255.255.0 00:00:00:00:00:08

2. Start up the whole design as what is described in "usage". Excute eventcap.sh in the way: ./eventcap.sh > a.txt

3. In GUI, go to event capture window, check three boxes:

images/GUI-evt.jpg

4. In output queue panel, you can see the "output queue size in bytes" slider is moving according to the newly-set size of the output queue.

images/GUI-oq.jpg

5. Use iperf in computers to send both TCP and UDP traffic. Please use the proper settings for iperf to make the traffic big enough to cause the queue occupancy fluctuating between 0 and 512KB. When the test is completed, we can analyze the result file a.txt. The sample of the result is attached in the attachments.

Here is an example of the content of a.txt:

00003833.324280    2 S 235312   154
00003833.336560    2 S 236840   155
00003833.348928    2 S 238368   156
00003833.348968    2     400KB
00003833.353912    2 R 236840   155
00003833.353952    2     288KB
00003833.453760    2 R 235312   154
00003833.553584    2 R 233784   153
00003833.653432    2 R 232256   152

There are two kinds of information in the result file. One is the queue information stated in five columns: time stamps, queue number, save(S) or remove(R) packets from the queue, queue occupancy and number of packets in the queue. The other is the value of buffer size set for the queue, which is described in three columns: time stamps, queue number and the value of new buffer size.

To get the new value of buffer size, just search "KB" in the result file and all buffer size values can be located.

References

A. Vishwanath, V. Sivaraman, Z. Zhao, C. Russell and M. Thottan,"Adapting Router Buffers for Energy Efficiency", ACM SIGCOMM CoNEXT, Tokyo, Japan, Dec. 2011. Available: http://www2.ee.unsw.edu.au/~vijay/pubs/conf/11conext.pdf

-- Main.ZhiZhao - 21 Nov 2011

Clone this wiki locally