+ All Categories
Home > Documents > A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati...

A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati...

Date post: 25-Mar-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
26
CLICK CLICK CLICK CLICK A NEW PROGRAMMING LANGUAGE FOR DEVELOPING SOFTWARE ROUTERS A NEW PROGRAMMING LANGUAGE FOR DEVELOPING SOFTWARE ROUTERS DEVELOPING SOFTWARE ROUTERS DEVELOPING SOFTWARE ROUTERS Under the Guidance of Prof. D Manjunath and Prof. Anirudha Sahoo Vishal Prajapati Indian Institute of Technology, Bombay MTech Seminar Presented By
Transcript
Page 1: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

CLICKCLICKCLICKCLICKA NEW PROGRAMMING LANGUAGE FOR

DEVELOPING SOFTWARE ROUTERSA NEW PROGRAMMING LANGUAGE FOR

DEVELOPING SOFTWARE ROUTERSDEVELOPING SOFTWARE ROUTERSDEVELOPING SOFTWARE ROUTERS

Under the Guidance ofProf. D Manjunath and Prof. Anirudha Sahoo

Vishal PrajapatiIndian Institute of Technology, Bombay

MTech Seminar Presented By

Page 2: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Acknowledgmentg2

The graphs and figures are taken from EddieThe graphs and figures are taken from Eddie Kohler’s PhD thesis.

Network Diagram is created on “htt // l l h t /”“http://www.lovelycharts.com/”

Wednesday, April 29, 2009Vishal Prajapati

Page 3: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Contents3

IntroductionIntroductionArchitectureThe Programming LanguageThe Programming LanguageExamplesE l tiEvaluationLimitationsConclusionReferences

Wednesday, April 29, 2009Vishal Prajapati

Page 4: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Introduction4

History - “Routers”History RoutersPacket forwarders => firewall, load balancerClosed, Static, Inflexible Design.Closed, Static, Inflexible Design.

Solution – “Click”Solution – ClickSimplicityNo of lines codeNo. of lines codeSolution of problems simple then normal

Wednesday, April 29, 2009Vishal Prajapati

Page 5: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Architecture

Modular design5

Modular designDirected graph

Element ClassPortsPorts

PushPullAgnostic

Handlers

Wednesday, April 29, 2009Vishal Prajapati

Page 6: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Click – The Programming Languageg g g g6

Declarative Language ------------------------- C++ -------------------------

Written in C++

class Hub : public Element { public:

Hub();

~Hub();

const char *class name() const

Syntax h :: Hubq :: Queue

const char *class_name() const

{ return "Hub"; }

const char *port_count() const

{ return "-/="; }q :: QueueFromDevice(eth0) -> [0]h;FromDevice(eth1) -> [1]h;h[0] -> q;h[1] -> q;

{ return / ; }

const char *processing() const

{ return PUSH; }

const char *flow_code() const [ ] q;q -> toDevice(eth0);q -> toDevice(eth1);

{ return "#/[^#]"; }

void push(int port, Packet* p);

};

Wednesday, April 29, 2009Vishal Prajapati

Examples

Page 7: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Symbols and Semanticsy7

Wednesday, April 29, 2009Vishal Prajapati

Page 8: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 1p8

Element

Push Link

Wednesday, April 29, 2009Vishal Prajapati

Simple Router

Page 9: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 2p9

Queue is the element having both(PUSH d PULL) t f t(PUSH and PULL) types of ports.

Implementing Stochastic Fairness Queuing

Wednesday, April 29, 2009Vishal Prajapati

Page 10: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 3p10

Implementing RED

Wednesday, April 29, 2009Vishal Prajapati

Page 11: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 4p11

ImplementingImplementing Priority flow on the Stochastic Fairness

Queuing with dropping mechanism

Wednesday, April 29, 2009Vishal Prajapati

Page 12: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 5p12

Differentiated Services Algorithm

Will send12,500 packets/second on its first output port other on second output portport other on second output port.

Will pull10,000 packets/second queue will determine which packets to drop, if busty flow.

Best effort flow queue.

Wednesday, April 29, 2009Vishal Prajapati

Page 13: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 6p13

Ethernet Switch

This works as a 802.1d standard learning bridge between two networks connected to eth0 and

eth1 ports.

Wednesday, April 29, 2009Vishal Prajapati

Page 14: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 7p14

Wednesday, April 29, 2009Vishal Prajapati

IPSec Implementation Figure Source [4]

Page 15: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Example – 8p15

Full fledgedFull fledged IP Router

Wednesday, April 29, 2009Vishal Prajapati

Page 16: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Evaluation

Forwarding path16

Forwarding pathPerformance of the “Click” diffserv configurationconfigurationComparison of IP router and non-IP router created with clickcreated with clickCPU time breakdown

Wednesday, April 29, 2009Vishal Prajapati

Page 17: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Experimental Setupp pAll are having DEC 21140 Tulip 100 Mbit/s PCI Ethernet Controllers

17

Mbit/s PCI Ethernet Controllers.

Router Host700 MHz Intel Pentium III CPUEi ht Eth t C t llEight Ethernet Controllers are on multi-port cards split across the motherboard's two independent PCI buses.

Source Hosts733 MHz Pentium III CPUsGenerates the 64-byte packets per second of UDP flow.

Destination Hosts200 MHz Pentium Pro CPUsCounts and Discards the packets.

Wednesday, April 29, 2009Vishal Prajapati

Page 18: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Forwarding Pathg18

357,000 packets/s

308,000 packets/s

446% increase in forwarding

rate

Around 80,000 packets/s

Wednesday, April 29, 2009Vishal Prajapati

Page 19: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Forwarding Pathg19

R i Li L kReceive Live Locks

and

Latency in allocating the y gbuffer space

Wednesday, April 29, 2009Vishal Prajapati

Page 20: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Performance of the Click diffserv configurationconfiguration

20

Because of theBecause of inability of CPU to schedule

Because of the limit of sending rate

schedule.

Wednesday, April 29, 2009Vishal Prajapati

Page 21: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Comparison of IP router and non-IP router created with clickrouter created with click

21

Not much of theNot much of the difference even if the more complex and

optimized configuration are installed.

Wednesday, April 29, 2009Vishal Prajapati

Page 22: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

CPU Time Breakdown22

19%

3%5%

14% Total Time : 2905 ns

Push Time : 1572 ns5%

3% Push Time : 1572 ns

Polling packet

Refill receive DMA ring

Cli k f di th h

54%

Click forwarding path: push

Click forwarding path: pull

Enqueue packet for transmit

Wednesday, April 29, 2009Vishal Prajapati

Clean transmit DMA ring

Page 23: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

CPU Time Breakdown (Cont…)( )23

Per element execution time5% 5%

4%2% 13%

ClassifierPaintSt i

4%8%

StripeCheckIPHeaderGetIPAddressL k IPR t

29%4%

4% LookupIPRouteDropBroadcastsPaintTeeIPGWOptions

8%9%5%

4%IPGWOptionsFixIPSrcDecIPTTLIPFragmenter

Wednesday, April 29, 2009Vishal Prajapati

IPFragmenterARPQuerierTotal Time : 1455 ns

CheckIPHeader Time : 457 ns

Page 24: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

LimitationsLimitations of the tool

24

“Click” cannot be used to create the coarse-grained elements.Coarse-grained elements are required when control or data flow doesn't match the flow of packets.

Ex. BGP.G“Click” cannot schedule the CPU per individual flow.

It is using stride algorithm for CPU scheduling.

Limitations of the languageCompound element classes

Ex. The customized handlers implementation is not possible.p pCompound elements are an imperfect abstraction mechanism.

They do not hide themselves from the user.They are strictly less powerful than native element classes.

Wednesday, April 29, 2009Vishal Prajapati

Page 25: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

Conclusion

Simple design25

Simple designReadable language configurationsBetter performance in smaller networksBetter performance in smaller networksEasy to find faults because of modularity

Wednesday, April 29, 2009Vishal Prajapati

Page 26: A NEW PROGRAMMING LANGUAGE FOR DEVELOPING …vishalprajapati08/Study... · Vishal Prajapati Wednesday, April 29, 2009 Examples. Symbols and Semantics 7 Vishal Prajapati Wednesday,

References

[1] Eddie Kohler, Robert Morris, Benjie Chen, John Jannotti, and M. Frans

26

Kaashoek. The Click modular router. ACM Transactions on Computer Systems, 18(4), November 2000.

[2] The Click Modular Router Project: http://read.cs.ucla.edu/click/

[3] Eddie Kohler, Click for Measurement, UCLA Computer Science Department Technical Report TR060010, February 2006

[4] Benjie Chen and Robert Morris, Flexible Control of Parallelism in a [ ] j ,Multiprocessor PC Router, USENIX 2001 Annual Technical Conference, June 2001.

Wednesday, April 29, 2009Vishal Prajapati


Recommended