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

Post on 25-Mar-2020

4 views 0 download

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

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

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

Contents3

IntroductionIntroductionArchitectureThe Programming LanguageThe Programming LanguageExamplesE l tiEvaluationLimitationsConclusionReferences

Wednesday, April 29, 2009Vishal Prajapati

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

Architecture

Modular design5

Modular designDirected graph

Element ClassPortsPorts

PushPullAgnostic

Handlers

Wednesday, April 29, 2009Vishal Prajapati

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

Symbols and Semanticsy7

Wednesday, April 29, 2009Vishal Prajapati

Example – 1p8

Element

Push Link

Wednesday, April 29, 2009Vishal Prajapati

Simple Router

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

Example – 3p10

Implementing RED

Wednesday, April 29, 2009Vishal Prajapati

Example – 4p11

ImplementingImplementing Priority flow on the Stochastic Fairness

Queuing with dropping mechanism

Wednesday, April 29, 2009Vishal Prajapati

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

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

Example – 7p14

Wednesday, April 29, 2009Vishal Prajapati

IPSec Implementation Figure Source [4]

Example – 8p15

Full fledgedFull fledged IP Router

Wednesday, April 29, 2009Vishal Prajapati

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

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

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

Forwarding Pathg19

R i Li L kReceive Live Locks

and

Latency in allocating the y gbuffer space

Wednesday, April 29, 2009Vishal Prajapati

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

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

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

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

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

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

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