The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ... The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

nmlab.korea.ac.kr
from nmlab.korea.ac.kr More from this publisher
12.07.2015 Views

ObjectiveThe objective of the JoBS algorithm is to provide absolute and relative (proportional) loss and delay differentiation independentlyat each node for classes of traffic. JoBS therefore provides service guarantees on a per-hop basis. The set ofperformance requirements are specified to the algorithm as a set of per-class Qualtiy of Service (QoS) constraints. As anexample, for three classes, the QoS constraints could be of the form:• Class-1 Delay ≈ 2 · Class-2 Delay,• Class-2 Loss Rate ≈ 10 −1 · Class-3 Loss Rate, or• Class-3 Delay ≤ 5 ms.Here, the first two constraints are relative constraints and the last one is an absolute constraint. The set of constraints can beany mix of relative and absolute constraints. More specifically, JoBS supports the five following types of constraints:• Relative delay constraints (RDC) specify a proportional delay differentiation between classes. As an example, fortwo classes 1 and 2, the RDC enforces a relationshipDelay of Class 2Delay of Class 1 ≈ constant .• Absolute delay constraints (ADC): An ADC on class i requires that the delays of class i satisfy a worst-case boundd i .• Relative loss constraints (RLC) specify a proportional loss differentiation between classes.• Absolute loss constraints (ALC): An ALC on class i requires that the loss rate of class i be bounded by an upperbound L i .• Absolute rate constraints (ARC): An ARC on class i means that the throughput of class i is bounded by a lowerbound µ i .JoBS does not rely on admission control or traffic policing, nor does it make any assumption on traffic arrivals. Therefore, asystem of constraints may become infeasible, and some constraints may need to be relaxed. QoS constraints are prioritized inthe following order.ALC > ADC, ARC > Relative Constraints .That is, if JoBS is unable to satisfy both absolute and relative constraints, it will give preference to the absolute constraints.MechanismsJoBS performs scheduling and buffer management in a single pass. JoBS dynamically allocates service rates to classes inorder to satisfy the delay constraints. The service rates needed for enforcing absolute delay constraints are allocated upon eachpacket arrival, while service rates derived from relative delay constraints are computed only every N packet arrivals. If nofeasible service rate allocation exists 1 , or if the packet buffer overflows, packets are dropped according to the loss constraints.The service rates are translated into packet scheduling decisions by an algorithm resembling Deficit Round Robin. That is,the scheduler tries to achieve the desired service rates by keeping track of the difference between the actual transmission ratefor each class and the desired service rate for each class. Scheduling in JoBS is work-conserving.1 For instance, if the sum of the service rates needed is greater than the output link capacity.79

7.5.2 ConfigurationRunning a JoBS simulation requires to create and configure the JoBS “link(s)”, to create and configure the Markers andDemarkers in charge of marking/demarking the traffic, to attach an application-level data source (traffic generator), and tostart the traffic generator.Initial Setupset ns [new Simulator]Queue/JoBS set drop_front_ falseQueue/JoBS set trace_hop_ trueQueue/JoBS set adc_resolution_type_ 0Queue/JoBS set shared_buffer_ 1Queue/JoBS set mean_pkt_size_ 4000Queue/Demarker set demarker_arrvs1_ 0Queue/Demarker set demarker_arrvs2_ 0Queue/Demarker set demarker_arrvs3_ 0Queue/Demarker set demarker_arrvs4_ 0Queue/Marker set marker_arrvs1_ 0Queue/Marker set marker_arrvs2_ 0Queue/Marker set marker_arrvs3_ 0Queue/Marker set marker_arrvs4_ 0set router(1) [$ns node]set router(2) [$ns node]set source [$ns node]set sink [$ns node]set bw 10000000set delay 0.001set buff 500;# preamble initialization;# use drop-tail;# enable statistic traces;# see ‘‘commands at a glance’’;# all classes share a common buffer;# we expect to receive 500-Byte pkts;# reset arrivals everywhere;# set first router;# set second router;# set source;# set traffic sink;# 10 Mbps;# 1 ms;# 500 packetsCreating the JoBS links$ns duplex-link $router(1) $router(2) $bw $delay JoBS;# Creates the JoBS link$ns_ queue-limit $router(1) $router(2) $buffset l [$ns_ get-link $router(1) $router(2)]set q [$l queue]$q init-rdcs -1 2 2 2 ;# Classes 2, 3 and 4 are bound by proportional delay differentiation with a factor of 2$q init-rlcs -1 2 2 2 ;# Classes 2, 3 and 4 are bound by proportional loss differentiation with a factor of 2$q init-alcs 0.01 -1 -1 -1 ;# Class 1 is provided with a loss rate bound of 1%$q init-adcs 0.005 -1 -1 -1 ;# Class 1 is provided with a delay bound of 5 ms$q init-arcs -1 -1 -1 500000 ;# Class 4 is provided with a minimumthroughput of 500 Kbps$q link [$l link] ;# The link is attached to the queue (required)$q trace-file jobstrace ;# Trace per-hop, per-class metrics to the file jobstrace$q sampling-period 1 ;# Reevaluate rate allocation upon each arrival$q id 1 ;# Assigns an ID of 1 to the JoBS queue$q initialize ;# Proceed with the initialization80

Objective<strong>The</strong> objective of the JoBS algorithm is to provide absolute <strong>and</strong> rel<strong>at</strong>ive (proportional) loss <strong>and</strong> delay differenti<strong>at</strong>ion independently<strong>at</strong> each node for classes of traffic. JoBS therefore provides service guarantees on a per-hop basis. <strong>The</strong> set ofperformance requirements are specified to the algorithm as a set of per-class Qualtiy of Service (QoS) co<strong>ns</strong>traints. As anexample, for three classes, the QoS co<strong>ns</strong>traints could be of the form:• Class-1 Delay ≈ 2 · Class-2 Delay,• Class-2 Loss R<strong>at</strong>e ≈ 10 −1 · Class-3 Loss R<strong>at</strong>e, or• Class-3 Delay ≤ 5 ms.Here, the first two co<strong>ns</strong>traints are rel<strong>at</strong>ive co<strong>ns</strong>traints <strong>and</strong> the last one is an absolute co<strong>ns</strong>traint. <strong>The</strong> set of co<strong>ns</strong>traints can beany mix of rel<strong>at</strong>ive <strong>and</strong> absolute co<strong>ns</strong>traints. More specifically, JoBS supports the five following types of co<strong>ns</strong>traints:• Rel<strong>at</strong>ive delay co<strong>ns</strong>traints (RDC) specify a proportional delay differenti<strong>at</strong>ion between classes. As an example, fortwo classes 1 <strong>and</strong> 2, the RDC enforces a rel<strong>at</strong>io<strong>ns</strong>hipDelay of Class 2Delay of Class 1 ≈ co<strong>ns</strong>tant .• Absolute delay co<strong>ns</strong>traints (ADC): An ADC on class i requires th<strong>at</strong> the delays of class i s<strong>at</strong>isfy a worst-case boundd i .• Rel<strong>at</strong>ive loss co<strong>ns</strong>traints (RLC) specify a proportional loss differenti<strong>at</strong>ion between classes.• Absolute loss co<strong>ns</strong>traints (ALC): An ALC on class i requires th<strong>at</strong> the loss r<strong>at</strong>e of class i be bounded by an upperbound L i .• Absolute r<strong>at</strong>e co<strong>ns</strong>traints (ARC): An ARC on class i mea<strong>ns</strong> th<strong>at</strong> the throughput of class i is bounded by a lowerbound µ i .JoBS does not rely on admission control or traffic policing, nor does it make any assumption on traffic arrivals. <strong>The</strong>refore, asystem of co<strong>ns</strong>traints may become infeasible, <strong>and</strong> some co<strong>ns</strong>traints may need to be relaxed. QoS co<strong>ns</strong>traints are prioritized inthe following order.ALC > ADC, ARC > Rel<strong>at</strong>ive Co<strong>ns</strong>traints .Th<strong>at</strong> is, if JoBS is unable to s<strong>at</strong>isfy both absolute <strong>and</strong> rel<strong>at</strong>ive co<strong>ns</strong>traints, it will give preference to the absolute co<strong>ns</strong>traints.MechanismsJoBS performs scheduling <strong>and</strong> buffer management in a single pass. JoBS dynamically alloc<strong>at</strong>es service r<strong>at</strong>es to classes inorder to s<strong>at</strong>isfy the delay co<strong>ns</strong>traints. <strong>The</strong> service r<strong>at</strong>es needed for enforcing absolute delay co<strong>ns</strong>traints are alloc<strong>at</strong>ed upon eachpacket arrival, while service r<strong>at</strong>es derived from rel<strong>at</strong>ive delay co<strong>ns</strong>traints are computed only every N packet arrivals. If nofeasible service r<strong>at</strong>e alloc<strong>at</strong>ion exists 1 , or if the packet buffer overflows, packets are dropped according to the loss co<strong>ns</strong>traints.<strong>The</strong> service r<strong>at</strong>es are tra<strong>ns</strong>l<strong>at</strong>ed into packet scheduling decisio<strong>ns</strong> by an algorithm resembling Deficit Round Robin. Th<strong>at</strong> is,the scheduler tries to achieve the desired service r<strong>at</strong>es by keeping track of the difference between the actual tra<strong>ns</strong>mission r<strong>at</strong>efor each class <strong>and</strong> the desired service r<strong>at</strong>e for each class. Scheduling in JoBS is work-co<strong>ns</strong>erving.1 For i<strong>ns</strong>tance, if the sum of the service r<strong>at</strong>es needed is gre<strong>at</strong>er than the output link capacity.79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!