Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Router SC 504 Project Gardar Hauksson Allen Liu.

Similar presentations


Presentation on theme: "The Router SC 504 Project Gardar Hauksson Allen Liu."— Presentation transcript:

1 The Router SC 504 Project Gardar Hauksson Allen Liu

2 Overview Design principals, requirements and constraints The Router – quick introduction The iSLIP algorithm Packet generation Underlying datastructures The program interface The Router – revisited

3 Design principles, requirements and constraints Project was open-ended, routing is a rather general term. You may see more resemblence to a network switch than to a network router in this project. Main objectives can be split into two: Creating packets and inserting them into input queues Routing the packets from input queues to output queues as efficiently as possible

4 Program parameters Input/output queues (q) – same number of input/output queues Number of packets per queue (n) Maximum number of packets routed per second (p) – upper bound is q (reasons shown later) Length of routing timeslot Packet generation rate Probability distribution of generated packets.

5 A quick peak The program flow: A thread generates packets to a random input queue. Each packet has a destination queue to go to. This thread can generate up to 1000 packets per second. Once in every timeslot (example timeslot is one second) The Router goes through all input queues and moves packets from their input queues to their destination queues. A short demo of the program might make things more clear...

6 Crossbar switch Each input queue can send one packet per timeslot. Each output queue can receive one packet per second. Our job is to make connections between input and output queues in a clever way. Source: Wikipedia

7 Crossbar switch Number of packets routed per timeslot can never exceed the number of input/output queues. (p <= q) If number of packets routed per each timeslot reaches p, then we have 100% efficiency. Packets are sent away from the output queues at a rate of 1 per queue per timeslot (total of q packets per timeslot) Why is this hard to achieve??

8 Routing algorithm In FIFO we just look at first packet of each queue and pass it on to the destination. If the destination is already occupied in this timeslot we have to cancel any subsequent packets going to the same destination in this timeslot. It has been shown 1 that this yields a efficiency. 1 Nick McKeown: iSLIP: A Scheduling Algorithm for Input-Queued Switches

9 Head of Line blocking This problem with FIFO queueing is called “Head of Line blocking” where the first packet in the queue is “Head of Line” or HOL.

10 HOL blocking in FIFO queues 1->11->31->1... 2->42->1... 3->13->3... 4->24->4... 2->2 3->3 1 2 3 4 Input queues Output queues Only 3 packets routed when capacity is 4! In the long run, efficiency is only 58.6% 1 2 3 4 HOL These packets could go to output queue 3 in this routing slot but since the HOL packet is blocking the queue, they just sit around and the queue doesn’t utilize it’s opportunity to send packets, even though it has packets to send and an idle output queue to receive them!

11 Virtual Output Queues (VOQ) This HOL blocking is not just a fact of life we have to accept. Being the engineers we are we can’t sleep at nights when this is the case! That’s why someone invented Virtual Output Queues (VOQ). 1 Nick McKeown: iSLIP: A Scheduling Algorithm for Input-Queued Switches

12 Virtual Output Queues (VOQ) VOQ is a fundamental method in iSLIP. Instead of just looking at the first packet in each input queue, we create virtual output queues in each input queue. Each input queue has one virtual output queue for each “actual” output queue. Thus, if there are q input queues and q output queues, there are a total of q 2 virtual output queues. Therefore iSLIP is not feasible for very high number of input/output queues.

13 Virtual Output Queues (VOQ) 1->11->31->1 2->42->1 3->13->2 4->24->4 2->3 3->2 Input queues (FIFO) 1 2 3 4 HOL These input queues... 4 1 3 1 3 4 1 2 3 4 2 3 2 2 4 1 HOL Input queues (VOQ) 1 2 3 4...become like this

14 Virtual Output Queues Eliminate HOL blocking Perform better when queue size is greater (the higher n the better) Simulations showed that n=50 was a good number for 100 queues. So have we solved all the problems in the world by using VOQ? No!

15 iSLIP If two input queues both have packets for the same output queue, which one gets to send the packet? iSLIP tackles this problem by using a Round-Robin scheme that is fair and efficient.

16 iSLIP iSLIP has three main steps which are iterated: REQUEST: Input queues send a request for every HOL packet to a corresponding queue GRANT: Output queues accept the highest priority request it gets and drops others. Priority is determined from which queue number is next in a fixed, round-robin schedule from a pointer g i. g i is incremented each time an output queue receives an ACCEPT from step 3. ACCEPT: Each input now looks at its grants and accepts the one that appears next in a fixed, round- robin schedule from a pointer a i. a i is updated accordingly.

17 iSLIP 4 1 3 1 3 4 1 2 3 4 2 3 2 2 4 1 HOL Input queues 1 2 3 4 1 2 3 4 Output queues REQUEST g 1 =1 g 2 =1 g 3 =1 g 4 =1 a 1 =1 a 2 =1 a 3 =1 a 4 =1 GRANT ACCEPT a 1 =2 a 2 =1 a 3 =4 g 1 =2 g 3 =4 g 4 =3 UPDATE POINTERS!

18 iSLIP Sharp individuals might have noticed that we actually just routed 3 packets out of 4 in last turn. Our observations showed that first iteration usually gave around 50-60% efficiency. To increase efficiency the iSLIP steps are iterated lg(q) times (7 times for 100 queues). This is the time it takes for iSLIP to converge. The a i and g i pointers are not updated until after all iterations have finished. This is to avoid starvation but won’t be discussed in detail here.

19 Packet generation machine Simulating network traffic is not a trivial task. Each protocol has its own characteristics and each network has its own characteristics. We decided to simulate two traffic patterns: Uniform distribution Poisson distribution The probability of a packet having a specific input/output queue is uniform. The time between generated packets is either uniformally or Poisson distributed.

20 Distributions Uniform probability mass function (on [a,b]) Poisson probability mass function Source: Wikipedia

21 Underlying datastructures The input/output queues are stored in an array with length q. Each output queue is a doubly linked list. If head/tail pointers both point to null the queue is empty. Each input queue holds an array of VOQ's. Each VOQ is a doubly linked list. Queue size is maintained in a number that is updated every time we insert/remove from the queue.

22 Datastructure analysis Queues Insert into (tail of) queue: O(1) Delete from (head of) queue: O(1) Get size of queue: O(1) Router Search for REQUESTS: O(q 2 ) Search for GRANTS: O(q) (average case) – O(q 2 ) worst case Search for ACCEPTS: O(q) (average case) – O(q 2 ) worst case => Routing: O(q 2* lg(q)) – lg(q) is due to iterations

23 User interface The next few slides will explain the user interface

24 # of queues (q): the number of input/output queues that the router has. For example, the figure above has 100 input/output queues. # of packets per queue (n): the number of packets capacity of a queue. Packets will be dropped if they are being inserted into a full queue. # of packets routed per timeslot (p): the number of packets the router can route per timeslot. Average time between generated packets (ms): the average time between packet generations. Length of timeslot (ms): the length of routing timeslot. For example, a value 1000 here means that each timeslot has duration of 1000ms (1 sec).

25 Green: low load Yellow: medium load Red: high load

26 Dropped output packets: the total number of packets that have been dropped while being moved from input queues to output queues during the entire routing process. Due to the structure of the program (it does not try to insert packets into full output queues) this value should always be 0. Dropped input packets: the total number of packets that have been dropped when being inserted into the router during the entire routing process. No of routed packets: the total number of packets that have been routed from input queues to output queues during the entire routing process. Average routing time (ms): the average routing time it has taken for a packet to journey through a router, i.e. the time elapsed since it entered the router until it exited the router. No of packets created: the total number of packets that have been created so far by the packet generation machine.

27 Packets/sec: the average number of input packets per second. Average packets routed: the efficiency of how packets are being routed from the input queues through the router. Our goal is to get this number as close to 100% as possible. For example, a 90% indicates that 90% of the routing capacity is being utilized. Average packets sent: the efficiency of how packets are being sent out by the output queues. Packets routed in last turn: the number of packets that were routed during the execution of the routing. Packets sent in last turn: the number of packets consumed at the output queues last time we routed. To achieve full throughput this number should be equal to the number of queues.

28 Basic Project Structure

29 Simulation Result The following parameters are used during the simulation: number of queues (q):100 number of packets per queue (n):50 number of packets routed per timeslot (p):100 Timeslot:1000 Simulation time:3600 Distribution type:Poisson Interval rate (ms) (#packets created per second) 7 (142)8 (125)9 (111)10 (100)11 (90)12 (83) # packet generated446073407736357660334523299632277012 dropped packets from I.Q9232654008930221000 packet/sec123.908113.25199.34992.92283.22876.947 average routing time13021236112510161000 avg packet routed97.31%97.24%96.01%92.58%83.41%77.17% avg packet sent97.28%97.22%95.98%92.56%83.38%77.15%

30

31 What we did We created a GUI We implemented an algorithm that is much better than FIFO (100% for iSLIP against 58.6% for FIFO) Our program does write to output log as well The program can be run with parameters, and without GUI which is more suitable for simulations Code and project details will be on course webpage today

32 Features we didn't write in this version but will write into the next one so our clients will be forced to upgrade and pay more QoS (priority queueing). Can be implemented by creating k priority queues inside each VOQ (raises the total number of queues to q 2 *k). Use real-world ip addresses instead of simple numbers. Implement routing tables from real life routers. Make the GUI more elaborate.

33 References McKeown, Nick (1999). "iSLIP: A Scheduling Algorithm for Input- Queued Switches". IEEE Transactions on Networking, Vol 7, No.2, April 1999 (http://tiny-tera.stanford.edu/~nickm/papers/ToN_April_99.pdf)http://tiny-tera.stanford.edu/~nickm/papers/ToN_April_99.pdf Gospodinov, Mitko and Gospodinoa, Evgeniya (2004). “Analysis of iSLIP scheduling algorithm for input-queuing switches”. (http://ecet.ecs.ru.acad.bg/cst04/Docs/sIIIB/316.pdf)http://ecet.ecs.ru.acad.bg/cst04/Docs/sIIIB/316.pdf Sun Microsystems. Java 2 Platform Standard Edition 5.0 API Specification (http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html)http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html Wikipedia contributors. "Poisson distribution". Wikipedia, The Free Encyclopedia, 26 November 2006, 12:42 UTC (http://en.wikipedia.org/w/index.php?title=Poisson_distribution&oldi d=90210203) [accessed 29 November 2006]http://en.wikipedia.org/w/index.php?title=Poisson_distribution&oldi d=90210203

34 Questions?

35 Thank you!


Download ppt "The Router SC 504 Project Gardar Hauksson Allen Liu."

Similar presentations


Ads by Google