19 a Comparative Analysis of Time Stamped

Embed Size (px)

Citation preview

  • 8/3/2019 19 a Comparative Analysis of Time Stamped

    1/6

    All India National Seminar on Computing, Communication and Sensor Network, CCSN-2010

    : 83 :

    A Comparative Analysis of Time Stamped Based

    Packet Scheduling Algorithms

    Biswapratap Singh Sahoo1, Haraprasad Mohanta

    2, Rajesh Subhankar

    3, Sanjeeb Biswal

    4

    1

    Utkal University, M.Tech Student, [email protected] Hindu University, M.Sc Student, [email protected]

    3Spintronic Technology & Advance Research, B.Tech Student, [email protected]

    4Spintronic Technology & Advance Research, B.Tech Student, [email protected]

    ABSTRACT

    Every server uses a scheduling discipline to decide the

    order in which the requests are to be served. A

    scheduling discipline should satisfy the following

    requirements; 1) Is easy to be imp1emented; 2)Provides

    fairly distributed bandwidth to competing requests;

    3)Guarantees performance bounds for a wide range of

    traffic types; 4)Allows easy admission control decision.To date, a lot of scheduling disciplines have been

    proposed in the research literature, among which, the

    Strict Priority (SP). Weighted Fair Queuing PFQJ and

    Weight Round Robin (WRR) are perhaps the three most

    widely adopted disciplines. However, the Generalized

    Processor Sharing (GPS) discipline for pocket scheduling

    best caters to the above properties. GPS uses an idealized

    fluid model that can't be precisely implemented in the

    real scenario. Worst Case Fair Weighted Fair Queuing

    pF2Q is the closest packet approximation algorithm of

    the GPS discipline. WFZQ+ is an enhanced version of

    WFZQ and has a less time complexity.This paper first reviews the theory of the four timestamp

    based algorithms (WFQ, WF2Q+, SFQ, and SCFQ) and

    prepare a detailed analysis on basis of the simulations

    performed.

    Keywords: GPS, WF2Q+, pF2Q

    I INTRODUCTION

    As the Internet has developed into a ubiquitous global

    communication medium, it is used to carry a constantly

    evolving mix of applications that is becoming richer with

    innovation and improvements in technology. Todays,

    network applications can be broadly classified into twofundamental classes i.e. Best-effort Applications and

    Guaranteed-service Applications. The two types of

    applications differ in terms of their sensitivity to delay

    and availability of bandwidth, as well as in terms of the

    level of service quality they expect from the network.

    Most of the applications that were originally developed

    for the Internet (including email, file transfer, and web

    browsing) have elastic requirements from the network. In

    other words, such applications are able to adapt to the

    bandwidth, delay, or loss. Elastic applications do not

    require any explicit guarantees and work correctly with a

    best-effort service under which the network only makes apromise to attempt to deliver their packets.

    On the other hand, real-time and interactive applications

    (including streaming audio and video, multimedia

    conferencing, etc) do require performance bounds from

    the network in terms of bandwidth, delay, or delay jitter.

    For instance a VoIP application requires both a minimum

    bandwidth (generally, between 20-80 Kbps) and a round-

    trip delay of about 150 ms to ensure a good user

    experience. These applications require a guarantee of

    service quality from the network, and the network must

    reserve resources on their behalf. Furthermore, the

    performance that guaranteed-service applications receive

    is directly affected by the scheduling discipline employed

    by the nodes along their path, as these disciplines are

    responsible for scheduling packets on the outgoing links.

    In packet-switched networks, packets from various users

    or flows have to share the Network resources, including

    buffer space at the routers and link bandwidth. Whenever

    resources are shared, contention arises among flows

    seeking service. Consequently, shared resources employ a

    scheduling discipline to resolve contention by

    determining the order in which users receive service. In

    particular, the scheduling algorithm is a central

    component of the quality of service (QoS) architecture ofpacket switched networks.

    II PROBLEM DEFINITION

    Our goal is to compare the four timestamp based

    algorithms (WFQ, WF2Q+, SFQ, SCFQ) for the

    following performance parameters:

    Algorithmic Complexity Fairness of the scheduler Average end to end Delay Delay Jitter Loss of packets Throughput of the data streamAnd prepare a detailed analysis on basis of the

    simulations performed.

    III REVIEW OF PREVIOUS WORK

    Generalized Processor Sharing

    GPS is an ideal scheduler, a theoretical construct that

    serves both as a starting point for designing practical

    scheduling disciplines and as a reference point for

    evaluating the fairness and delay properties of thesedisciplines. GPS visits each backlogged flow queue in

    turn and serves an infinitesimal fraction of the head-of-

    line packet at each queue. If flows are assigned different

  • 8/3/2019 19 a Comparative Analysis of Time Stamped

    2/6

    All India National Seminar on Computing, Communication and Sensor Network, CCSN-2010

    : 84 :

    weights, then the service they receive from GPS is

    proportional to their weight.

    If a queue is empty, GPS skips it to serve the next non-

    empty queue. Therefore, whenever some queues are

    empty, backlogged flows will receive additional service

    in proportion to their weights. Consequently, GPS

    achieves an exact max-min weighted fair bandwidth

    allocation. It also provides isolation (protection) among

    flows, since a misbehaving flow is restricted to its fair

    share and does not affect other flows.

    GPS is defined in a theoretical fluid flow model in which

    multiple queues may be served simultaneously. In a

    practical packet system, on the other hand, packet

    transmissions may not be pre-empted and only one queue

    may be served at any given time. The schedulers we

    describe in the following subsections attempt to emulate

    GPS but are designed for packetized systems.

    Weighted Fair Queuing (WFQ)

    WFQ is an approximation of GPS that serves packets in

    the order they would complete service had they been

    served by GPS. Therefore, the WFQ scheduler needs to

    emulate the operation of the GPS server. WFQ combines

    fair queuing and preferential weighting. In it, queues are

    first sorted in order of their increasing weighted value.

    Then, each queue is serviced in order of its weighted

    proportion to the available resources. Here, the priority

    given to network traffic is inversely proportional to the

    signal bandwidth. Thus, narrowband signals are passed

    along first, and broadband signals are buffered.

    A virtual time function is used to calculate the finish

    time of the packets had it been scheduled in GPS. The

    WFQ scheduler serves packets in increasing order of

    their virtual finish times, a policy referred to as smallest

    virtual finish time first (SFF). The degree to which

    WFQ approximates GPS is determined by two properties.

    Bounded delay property. A packet will finish servicein a WFQ system no later than the time it would finish in

    the corresponding GPS system plus the transmission time

    of a maximum size packet.

    Weak service property. The service (in terms of totalnumber of bits) that a flow receives in a WFQ system

    does not fall behind the service it would receive in the

    fluid GPS system by more than one maximum packet

    size.

    While due to the second property above a WFQ system

    may not fall behind GPS by more than one maximum

    packet size but, it was shown that WFQ may introduce

    substantial unfairness relative to GPS in terms of the

    worst-case fairness index (WFI). WFI is a metric to

    represent the maximum time a packet arriving to an

    empty queue will have to wait before receiving its

    guaranteed service rate. Specifically, GPS has a WFI ofzero, but the WFI of WFQ increases linearly with the

    number of flows.

    Worst-Case Fair Weighted Fair Queuing (WF2Q)

    The WF2Q algorithm was introduced in as a better

    packet approximation of GPS than WFQ. Specifically,

    WF2Q employs a smallest eligible virtual finish time

    first (SEFF) policy for scheduling packets. A packet is

    eligible if its virtual start time is no greater than thecurrent virtual time; hence, the WF2Q scheduler only

    considers the packets that have started service in GPS

    when selecting the packet to be transmitted next. It has

    been shown [9] that WF2Q is work-conserving,

    maintains the bounded delay property of WFQ, and has

    these two additional properties:

    Strong service property: The service (in terms oftotal number of bits) that a flow receives from a WF2Q

    system cannot fall behind the service it would receive in

    the fluid GPS system by more than one maximum packet

    size

    Worst-case fairness property: The worst-casefairness index of WF2Q is a constant independent of the

    number n of flows served by the scheduler.

    The first property implies that the WF2Q scheduler

    closely tracks the GPS system in terms of the service

    received by each flow, and due to the second property,

    WF2Q is an optimal packet scheduler in terms of worst-

    case fairness.

    However, the worst-case complexity of WF2Q is O(n),

    identical to that of WFQ, as both schedulers need to

    compute the virtual time function .

    WF2Q+

    WF2Q+ is a lower-complexity scheduler. It is work-

    conserving, has the same bounded delay, strong service,

    and worst-case fairness properties of WF2Q, but uses a

    different virtual time function that can be computed more

    efficiently than the function used by WFQ and WF2Q.

    The overall complexity of WF2Q+ is O(log n),

    significantly lower than the O(n) complexity of WFQ and

    WF2Q.

    The scheduler implementation can be further simplified

    by maintaining a single pair of start and finish virtual

    time values per flow, rather than on a per-packet basis.

    Overall, the WF2Q+ scheduler achieves tight delay

    bounds and good worst-case fairness with a relatively low

    O(log n) algorithmic complexity.

    Self-Clocked Fair Queuing (SCFQ)

    The O(n) worst-case algorithmic complexity of the WFQ

    and WF2Q schedulers is due to the fact that the order of

    packet transmissions in these queuing schemes is

    determined by tracking the progress of the fluid-flow

    GPS reference system.

    Self-clocked fair queuing (SCFQ) avoids thecomputationally expensive emulation of a hypothetical

  • 8/3/2019 19 a Comparative Analysis of Time Stamped

    3/6

    All India National Seminar on Computing, Communication and Sensor Network, CCSN-2010

    : 85 :

    reference system by adopting a self-contained approach

    to fair queuing.

    The algorithmic complexity of SCFQ is O(log n) because

    of the requirement to select the packet with the smallest

    finish time for transmission. Although the rule that

    SCFQ uses to compute packet finish times is easy to

    implement, the trade-off is a much larger delay bound

    than WFQ. In particular, the delay bound provided by

    SCFQ increases linearly with the number n of flows

    served by the scheduler, in the worst case The worst-case

    fair index (WFI) of SCFQ is the same as that of WFQ,

    i.e, proportional to the number of flows.

    Start-Time Fair Queuing (SFQ)

    Start-time fair queuing is a variant of SCFQ that

    maintains both a start time and a finish time for each

    packet. Unlike the other packet fair schedulers, SFQ

    serves packets in increasing order of their start times, not

    their finish times.

    SFQ has the same low algorithmic complexity O(log n)

    as SCFQ. However, it has been shown that the worst-case

    delay of SFQ is significantly lower than with SCFQ. The

    worst-case fairness properties of SFQ are similar to those

    of WFQ and SCFQ.

    The table summarises the above algorithms

    Algorithms Characteristics Complexity

    GPS Ideal algorithm ---

    WFQ An implementable

    version of GPS(=PGPS)

    O(n)

    WF2Q+ Approximated GPS

    better than WFQ

    O(log n)

    SCFQ Reduced the

    complexity of WFQ

    O(log n)

    SFQ Reduced the short

    term unfairness of

    SCFQ

    O(log n)

    IV SOLUTIONAPPROACH

    To perform the analysis we created the simulation

    environment in windows XP professional with cygwin

    and Network simulator 2.29.

    The parameters we selected to analyze the scheduling

    algorithms are:

    Throughput of Receiving bits(Packets) Average throughput Bandwidth of the link Average end to end delay Delay jitter in the simulation Fairness of the scheduler

    Parameters.

    Below we discuss the various parameters in brief.

    Bandwidth

    It is essentially a data transmission rate; It is the

    maximum amount of information (bits/sec) that can be

    transmitted along a channel. In computer networkbandwidth is often used as a synonym for data transfer

    rate. The amount of data that can carried from one point

    to another in a given time period (usually a second).This

    kind of bandwidth is usually expressed in bits (of data)

    per second (bps). As the link bandwidth changes the

    behaviour of the scheduler also changes.

    Packet loss

    Packet loss occurs when one or more packets of data

    travelling across a computer network fail to reach their

    destination. Packet loss is distinguished as one of the

    three main error types encountered in digitalcommunication.

    Cause: Packet loss can be caused by a number offactors, including signal degradation over the network

    medium. Oversaturated network links, corrupted packet

    rejected in transit, faulty networking, hardware faulty

    network drivers or normal routing routines.

    Effects: when cause by network problem lost ordropped packets can result in highly noticeable

    performance issues or jitter with streaming technologies,

    voice over IP etc and will affect all other network

    application to a degree.Throughput

    In communication networks, such as Ethernet or packet

    ratio, throughput or network throughput is average rate

    of successful message delivery over a communication

    channel. This data may be delivered over a physical or

    logical link or pass through a certain network node. The

    throughput is usually measured in bits per second

    (bits/sec or bps) and some time in data packets per

    second or data packet per time slot.

    The maximum achievable throughput is affected by the

    bandwidth in hertz and signal to noise ratio of the analogphysical medium.

    Delay and Delay Jitter

    Delay is the time taken from point to point in a network.

    Delay can be measured in either one-way or round-trip

    delay.

    Jitter is the variation in delay over time from point to

    point. The delay is specified from the start of the packet

    being transmitted at the source to the end of the packet

    being received at the destination. A component of the

    delay which does not very from packet to packet can be

    ignored hence if the packet sizes are the same and packetalways take same time to be processed at the destination

  • 8/3/2019 19 a Comparative Analysis of Time Stamped

    4/6

    All India National Seminar on Computing, Communication and Sensor Network, CCSN-2010

    : 86 :

    then the packet arrival at the destination could be used

    instead of the time the end of the packet is received.

    Jitter is the time variation of a periodic signal often in

    relation to a reference clock source. Jitter may be

    observed in characteristics such as the frequency of

    successive pulses, the signal amplitude or phase ofperiodic signal. Jitter is a significant and usually

    undesired factor in the design of almost all

    communication links.

    Jitter can be quantified in the same term as all time-

    varying signals example. Peak to peak displacement.

    Also like other time varying signals, jitter can be

    expressed in terms of spectral destiny.

    In the context of computer network, the term jitter is

    often used as a measure of variability over time of the

    packet latency across a network. A packet with contest

    latency has no variation (or jitter).

    Fairness

    Allocation of link bandwidth is fair if equal bandwidth is

    allocated in every time interval to all the flows.

    This concept generalized to weighted fairness in which

    the bandwidth must be allocated in proportion to the

    weights associated with the flows. Formally if fis the

    weight of flowf and Wf(t1,t2) is the aggregate service (in

    bits) received by it in the interval [t1,t2], then an

    allocation is fair if, for all interval [t1,t2] in which both

    flows f and m are backlogged.

    Mathematically

    [Wf(t1,t2)/f] - [Wm (t1,t2)/m] = 0

    Simulation Settings and Parameters

    As different algorithms have different preferences or

    assumptions for the network configuration and traffic

    pattern, one of the challenges in designing our

    simulation is to select a typical set of network topology

    and parameters (link bandwidth, RTT, and gateway

    buffer size), as well as load parameters (numbers of TCP

    and UDP flow, packet size, traffic patterns) as the basis

    for evaluation. Currently we havent found systematicway or guidance information to design the simulation. So

    we make the decision by reading all related papers and

    extracting and combining the key characteristics from

    their simulations.

    R R

    10Mbps 1ms 10Mbps 1ms

    2Mbps 5ms

    TCP src/dst

    UDP src/dst

    Figure - 1 (Simulation topology)

    The network topology we used is a classic dumb-bell

    configuration as shown in Figure. This is a typical

    scenario that different types of traffic share a bottleneck

    router. TCP (FTP application in particular) and UDP

    flows (CBR application in particular) are chosen as

    typical traffic patterns.

    In our simulation, we used 12 TCP flows and 8 UDP

    flow. The bottleneck link in this scenario is the link

    between two routers. We set the link bandwidth at

    2Mbps, although we varied this to analyze the effect of

    bandwidth in the simulation.(the packets size for both

    TCP and UDP are 1000 bytes). The simulation time is set

    to be 100 seconds. These settings are selected after some

    parameter tuning simulations.

    V RESULTS & DISCUSSIONS

    As mentioned earlier the behaviors of the scheduling

    algorithms are stated below according to respectiveparameters.

    Average throughput

    Average throughput of all the schedulers remains almost

    same when subjected to different link bandwidth. The

    simulation settings are same as stated in section 3.2

    except the link bandwidth. Throughput increases with

    the increase in bandwidth.

    Figure-2 (Average throughput of schedulers with

    different bandwidth)

    When the bandwidth is fixed and no of TCP and UDP

    nodes are changed, SFQ stays ahead of other algorithmsas the TCP nodes are increased. All others behave the

    same.

  • 8/3/2019 19 a Comparative Analysis of Time Stamped

    5/6

    All India National Seminar on Computing, Communication and Sensor Network, CCSN-2010

    : 87 :

    Figure 3 (Average throughput with different TCP-UDP

    node combinations)

    End-to-end delay

    End-to-end delay in different link bandwidth also

    remains same for different schedulers.

    Figure 4 (End-to-end delay)

    SCFQ and SFQ has a slightly higher delay bound

    compared to WFQ and WF2Q+. SFQ has a tighter delay

    bound than SCFQ. The results are not visible in the

    graph but the stats show this with a very small variation.

    Packet Loss

    WFQ suffers most in terms of packet loss. SFQ performs

    best here. With increase in total no of nodes, packet loss

    increases as the traffic increases for all the schedulers.

    When there is no TCP flow UDP nodes take up all the

    bandwidth hence packet loss is zero. Similarly when

    theres no UDP flow TCP nodes makes maximum use ofavailable bandwidth and packet loss becomes minimum.

    Figure 5 (Throughput of lost packets)Delay jitter

    In case of delay jitter for end-to-end delay WF2Q+

    performs better when bandwidth is low. With increase in

    bandwidth all the schedulers tend to merge together. The

    low delay jitter bound shows that WF2Q+ is more suited

    to interactive applications (audio, video streaming) than

    the others.

    Figure 6(Delay jitter)

    Fairness

    Fairness to the flows is the most important feature of all

    the algorithms discussed here. Here too WF2Q+ performs

    better than other schedulers when link bandwidth is low.

    As the conditions become more favourable SFQ starts

    dominating.

    Figure 7 (Fairness)

    Although SFQ computes the virtual start and finish times

    of packets faster it doesnt follow/approximate GPS.

    Since WF2Q+ is based on simulating GPS with less

    complexity it performs well under low bandwidth,

    whereas SFQ dominates when bandwidth is increased.

    VI CONCLUSION

    In this report we compared several packet scheduling

    (queue management) algorithms (WFQ, WF2Q+, SCFQ

    and SFQ) based on simulation results. We have presented

    our simulation setting, comparison result and algorithm

    characteristics. Its still hard to conclude which

    algorithm is better in all aspects than another. But the

    major trends are:

    End-to-end delay for all the algorithms are almost thesame

    WF2Q+ shows better results in case of unfavorableconditions like low bandwidth and high traffic, SFQ on

    the other hand performs well in optimal conditions.

    All the algorithms tend to behave identically asbandwidth increases beyond a certain speed.

    WFQ and WF2Q+ has computation overhead perincoming packet their space requirements are different.

    The following table summaries our evaluation results:

    Algori

    thms

    Fairne

    ss

    Delay

    Jitter

    Avera

    ge

    throug

    hput

    Packet

    Loss

    Algori

    thmic

    Compl

    exity

    End to

    end

    Delay

  • 8/3/2019 19 a Comparative Analysis of Time Stamped

    6/6

    All India National Seminar on Computing, Communication and Sensor Network, CCSN-2010

    : 88 :

    WFQ Not

    Good

    Not

    Good

    Good Not

    Good

    Not

    Good

    Un

    Affect

    ed

    WF2Q

    +

    Better Best Not

    Good

    Good Good Un

    Affect

    ed

    SCFQ Good Better Better Better Good Un

    Affect

    edSFQ Best Good Best Best Good Un

    Affect

    ed

    Figure 8 (Comparison Table)

    REFERENCES

    [1] J. C.R. Bennett and H. Zhang. WF2 Q: worst-casefair weighted fair queueing. In Proceedings of

    IEEE INFOCOM 96, pages 120128, 1996.

    [2] Keshav S., An engineering approach to computernetworks, Corporate and Professional Publishing

    Group, 1997.

    [3] Nicola Ciulli , Stefano Giordano. Analysis andsimmulation of WF2Q+ based

    schedulers:comparisons, compliance with

    theoretical bounds and influence on end to end

    dalay jitter.

    [4] Valente P. ,Exact GPS Simulation and OptimalFair Scheduling With Logarithmic

    Complexity,IEEE/ACM Transactions on

    Networking, Volume: 15 Issue: 6 Dec. 2007

    [5] J.XuandR.Lipton.On fundamental tradeoffsbetween delay bounds and computational

    complexity in packet scheduling algorithms. InProceedings of ACM SIGCOMM '02,2002.

    [6] Jin Xiaohui; Li Jiandong; Guo Feng, "Two simpleimplementation algorithms of WFQ and their

    performance analysis," Info-tech and Info-net,

    2001. Proceedings. ICII 2001 Beijing vol.2, 2001

    [7] Alejandro Gomez Suarez, and H. Srikanth Kamath.Comparison of Different Types of Sources of

    Traffic Using SFQ Scheduling Discipline .In

    proceedings of World Academy of Science,

    Enginnering and Technology 37 2008

    [8] David Gabbay. Weighted Fair Queue(WFQ)January, 2006[9] ErikPeterson. CS276Homework1:ns-2

    October28,2006

    [10] Alan Demers ,Srinivasan Keshavt ,ScottShenker.Analysis and Simulation of a Fair

    Queueing Algorithm

    [11] PaoloValente. Exact GPS Simulation and OptimalFair Scheduling With Logarithmic Complexity.

    [12] IEEE/ACM Transactions on Networking,VOL.15,NO.6, DECEMBER 2007

    [13] X.FEI, A. MARSHALL Delay Optimized WorstCase Fair WFQ (WF2Q) Packet Scheduling , 2002

    IEEE

    [14] Ehsan Allahyar ,Ali Movaghar. Weighted Start-time Fair Queuing: A New Start Time Fair

    Queuing For Elastic Traffic .[15] http://en.wikipedia.org/wiki/Cygwin[16] http://en.wikipedia.org/wiki/AWK[17] http://www.tcl.tk/[18] http://en.wikipedia.org/wiki/Tcl[19] http://www.angelfire.com/al4/esorkor/[20] http://www.waset.org/journals/waset/v37/v37-

    31.pdf

    [21] http://clipmarks.com/clipmark/6DEF6641-0C9B-43C2-8977-79B1094BD109/

    [22] http://linkinghub.elsevier.com/retrieve/pii/S0140366405003336

    [23] http://thesis.lib.ncu.edu.tw/ETD-db/ETDsearch/getfile?URN=945202005&filename

    =945202005.pdf

    [24] http://www.ntpo.org.tw/tjc/presentation/SWFQ_for_taiwan_1109.pdf

    [25] http://www.lib.ncsu.edu/theses/available/etd-06092009-171211/unrestricted/etd.pdf

    [26] http://inst.eecs.berkeley.edu/~cs268/sp03/notes/Lecture14.ppt

    [27] http://lion.cs.uiuc.edu/courses/cs497hou/SFQ.pdfhttp://lion.cs.uiuc.edu/courses/cs497hou/pres/WF2Q.ppt