Token Bucket Leaky Bucket

Click here to load reader

download Token Bucket Leaky Bucket

of 32

  • date post

    29-Jan-2016
  • Category

    Documents

  • view

    102
  • download

    0

Embed Size (px)

description

Token Bucket Leaky Bucket. Leaky Bucket. (a) A leaky bucket with water. (b) a leaky bucket with packets. Token Bucket. We want to allow some burstiness. x(t) is the instantaneous sending rate,. Max bits b(u). Slope= average rate. Max burst rate. Interval size u. b(u)= r u +b. - PowerPoint PPT Presentation

Transcript of Token Bucket Leaky Bucket

  • Token BucketLeaky Bucket

  • Leaky Bucket(a) A leaky bucket with water. (b) a leaky bucket with packets.

  • Token Bucketx(t) is the instantaneous sending rate,

    Max bits b(u)Interval size uMax burst rateSlope=average rateb(u)=r u +bWe want to allow some burstiness.

  • Token Bucket Regulator (Shaper)

  • What is it good for?Traffic shaperShape the traffic to conform to contractTraffic policerDrop packets that do not conformTraffic markerColor packets by conformance to contractRate estimator

  • RemarksWhen tokens are not availableStore packet (shaper)Discard packet (policer)The sum of two regulated flows (b1,r1)& (b2,r2) behave like a regulated flow (b1+b2,r1+r2)Cascading t.b. after a l.b. can shape the burst rate

  • Shaping Examples(a) Input to a leaky bucket. (b) Output from a leaky bucket. Output from a token bucket with capacities of (c) 250 KB, (d) 500 KB, (e) 750 KB, (f) Output from a 500KB token bucket feeding a 10-MB/sec leaky bucket.

  • Traffic MarkerPacket arrivalEnough tokens in bucket?Color greenColor redPacket forwarding

  • IETF Packet MarkingTwo types of markers are available:RFC 2697: A Single-Rate, Three-Color MarkerCommitted Information Rate (CIR), Committed Burst Size (CBS), Excess Burst Size (EBS)RFC 2698: A Dual-Rate, Three-Color MarkerPeak Information Rate (PIR) Committed Information Rate (CIR), Committed Burst Size (CBS), Peak Burst Size (PBS)Suggested in the context of DiffServ

    Heinanen and Guerin, 1999

  • Single-Rate Three-Color MarkerUsage:Mark conforming traffic with a low drop precedenceMark exceeding traffic with a high drop precedenceDrop violating traffic

    Definitions:CIR Committed Information RateCBS Committed Burst Size (max)EBS Excess Burst Size (max)Tc Current size of CBS bucketTe Current size of EBS bucket

  • Two-Rate Three-Color MarkerUsage:Mark packets within CIR as conformingMark packets between CIR and PIR as exceeding Drop packets above the PIR

    Definitions:CIR Committed RatePIR Peak rateCBS Committed burst size (max)PBS Peak burst size (max)Tc Current size of CBS bucketTp Current size of PBS bucket

  • Marker Locations and Size

  • Juha Heinanen*RED with Multiple ThresholdsDiscardProbabilityAverage Queue Length01RedThreshold0YellowThresholdGreenThresholdRedPacketsGreenPacketsYellowPacketsFull

  • Juha Heinanen*Metering, Marking and PolicingHostEnterpriseNetworkISPMay police host behavior andclassify packets on behalf of hostPolices aggregate behavior and remarksor drops excessMay meter aggregatebehavior, classify,(re)mark, drop, and shape packetsMay meter host behavior andshape packetsRMay classify packets toservice classesMay select outgoing packetsand drop excess

  • Leaky Buckets in ATM

  • Chapter 13: ATM Traffic & Congestion Control*ATM Traffic ParametersSource Traffic DescriptorPeak Cell Rate (PCR): upper bound on traffic submitted by source (PCR = 1/T, where T = minimum cell spacingSustainable Cell Rate (SCR): upper bound on average rate of traffic submitted by source (over a larger T)Maximum Burst Size (MBS): maximum number of cells sent continuously at PCRMinimum Cell Rate (MCR): used with ABR and GFR minimum cell rate requested, access to unused capacity up to PCR (elastic capacity = PCR-MCR?)Maximum Frame Size (MFS): maximum size of a frame in cells available for GFR serviceThe ATM Guaranteed Frame Rate (GFR) service is for best effort traffic. Offers minimum throughput guarantees.

    Chapter 13: ATM Traffic & Congestion Control

  • *Generic Cell Rate Algorithm (GCRA): Virtual SchedulingGCRA (I, L):I = IncrementL = Limitta(k) = Time of arrival of a cellTAT = Theoretical arrival time

    At time of arrival ta(1) of the first cell of connection, TAT = ta(1)Algorithm takes two arguments, I and LWith PCR of R, I = T = 1/RCDVT limit, = LThen peak cell rate algorithm is expressed as:GCRA(T, )I.e., this cell arrived too late.Late arrival OKReset TATEarly arrival within limit OKEarly arrival beyond limit NOT OKEarly arrival TEST

  • Virtual scheduling algorithm Conforming cell

    Non-conforming cell

    At the time of arrival of the first cell of the connection, TAT = ta(k) Timeta(k)TAT(k)TAT(k)TAT(k+1)TAT(k-1)(a)Timeta(k)TAT(k)TAT(k+1)TAT(k-1)(b)Timeta(k)TAT(k-1)TAT(k)TAT(k-2)

  • Leaky Bucket

  • Multiple Leaky BucketsCan we create traffic differentiation?

  • ScenarioAt the Edges: Multiple Cascading Token Buckets (RFQ?) At Core router : Multi-GRED drop Model

  • RED differentiation

  • Simulation Set-Up

  • **DefinitionsThe committed rate of R: comm(A) = The excess link rate of R ex(R) = bw(R) comm(A).CIR aggregation level: AGGCIR = comm(A)/bw(R) .The EIR aggregation-level is the entire EIR allocated on a bottleneck link divided by its excess rate, AGGEIR =The fair throughput of an aggregate i is composed of its CIRi and its fair share of the excess bandwidth EIRaggi = (EIRi/AGGEIR).

  • SLAa

  • Token Bucket Rate Assignment

  • Aggregate Traffic Mix

  • Betterdifferentiation

    Chart1

    636288659360574448575264481360438400322944305504

    516752597248699840562784382864467616327376385552

    624896713568572208524384546736364368330336293456

    554800590208549136499200473536604800348672365776

    687600501600649200588000456000444000286800387600

    543600616800618000630000457200436800290400409200

    506400656400691200638400420000441600280800361200

    541200531600585600680400414000487200364800403200

    543600555600603600566400477600511200356400362400

    412800544800598800636000583200459600367200402000

    434400477600332400499200746400556800463200472800

    44280004680067200795600820800470400493200

    0000205200434400475200501600

    000000487200498000

    0000576000424800501600

    000000295200306000

    0000004392000

    Time (10 seconds)

    GoodPut(Bytes)

    Three-Color Marking Goodput Per Aggregate (a)

    utilbw

    TCM GREDGoodput Per AggregateTCM GRED Goodput Per Aggregate

    bs

    scenario B

    utilbw

    586736689472564000599616460368438048310800292640

    652704522736603488468480381696475376364576338208

    636192586048647456539984333168396416326384366304

    704800597024665536542400445200328800330672362176

    554400685200600000531600514800364800309600391200

    595200738000613200447600456000363600360000396000

    532800788400590400541200428400411600354000346800

    549600640800570000538800526800464400350400324000

    355200588000699600423600523200694800343200360000

    163200394800660000544800606000690000379200435600

    554400165600182400606000704400772800404400452400

    49080000610800750000838800452400469200

    0000289200192000457200501600

    000000492000346800

    000000475200447600

    000000439200506400

    Time (10 seconds)

    GoodPut(Bytes)

    TCMEIR - Scenario B (b)

    utilbw_bin

    847136822912508304519824412816423504217376218640

    691600651248555488602272470048443408282384295104

    638592853264513056511184443568494320242096254560

    679952796960558736505200442800469200246528296528

    756000697200552000564000421200458400279600281152

    667200772800560400574800422400459600268800277200

    678000762000553200541200421200469200265200285600

    723600728400562800566400450000435600256800288000

    612000427200607200596400567600559200315600316800

    1848000748800795600721200744000390000402000

    00757200745200760800775200426000424800

    00240000903600795600501600490800

    0000504000501600498000

    000000490800511200

    000000507600495600

    000000500400504000

    000000495600500400

    agg1,200K,4M,12K,24K

    agg2,200K,4M,12K,36K

    agg3,200K,2M,12K,24K

    agg4,200K,2M,12K,36K

    agg5,100K,2M,12K,24K

    agg6,100K,2M,12K,36K

    agg7,100K,1M,12K,24K

    agg8,100K,1M,12K,36K

    Time (10 seconds)

    GoodPut(Bytes)

    Y4TBPIR - Scenario B (c)

    termtimebin5

    815584874512494048487424433568453504210208218592

    714752700096524288568672412944488160301760285344

    732896698496516656586784431920459520243792298464

    719200798128550336591600346800468000266224270128

    734400829200511200567600390000474000224752271200

    681600871200517200544800386400475200260400262800

    788400729600506400567600396000457200266400274800

    776400637200528000564000416400513600291600294000

    567600319200630000673200537600560400334800358800

    00732000555600895200919200439200456000

    00855600388800843600897600483600537600

    001020004008001021200252000732000781200

    0000055200843600938400

    000000811200915600

    000000748800268800

    agg1,200K,4M,12K,24K

    agg2,200K,4M,12K,36K

    agg3,200K,2M,12K,24K

    agg4,200K,2M,12K,36K

    agg5,100K,2M,12K,24K

    agg6,100K,2M,12K,36K

    agg7,100K,1M,12K,24K

    agg8,100K,1M,12K,36K

    Time (10 seconds)

    GoodPut(Bytes)

    Y4TBPIR - Scenario B (d)

    termtimebin4

    730736806816498496550768434432415520275392270128

    635056867600521040520432390832492464278288279472

    687792721648589504527984405168439616275280340752

    723152906624447488528000369600476400268272298576

    673200711600567600568800448800482400285600262800

    603600841200568800542400424800460800259200290400

    730800732000559200560400428400475200244800285600

    738000552000528000620400483600481200285600302400

    550800315600661200652800586800552000308400366000

    3576000681600720000688800730800400800418800

    00795600546000794400834000511200513600

    00588001440001000800672000847200888000

    00000010836001249200

    0000120001052400704400

    agg1,200K,4M,12K,24K

    agg2,200K