Packet Scheduling - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Packet Scheduling

Description:

Virtual Clock Scheduler. VC is proposed before GPS but can be looked as an approximation of GPS ... Self-clocked Fair Queueing ... – PowerPoint PPT presentation

Number of Views:815
Avg rating:3.0/5.0
Slides: 50
Provided by: Jim4226
Category:

less

Transcript and Presenter's Notes

Title: Packet Scheduling


1
Packet Scheduling
  • Survey and Tutorial
  • Guansong Zhang

EL938 Report
2
What is Packet Scheduling ?
  • Multiple packets exist in a buffer and they share
    a common outgoing link
  • What is the policy to choose a packet for service
    ?
  • How does this policy affect the performance ?
  • A popular topic in 1990s
  • Output buffered and shared memory switches
    (routers) dominate
  • Transmission links (especially long haul links)
    are scare resources

3
Where is Packet Scheduling ?
  • Inside a network Switches Routers
  • Inside a switch or a router
  • Input buffer
  • Output buffer
  • Shared memory
  • Packet scheduling is necessary when multiple
    packets compete for a common outgoing link

4
Why Packet Scheduling
  • Required by both IntServ DiffServ model
  • Quality of Service (QoS) control
  • Delay
  • Delay jitter
  • Bandwidth
  • Fairness

5
A General Structure Inside a Router
1
1
Switch Fabric




N
N
Speedup factor 1N
6
Basic Model of Packet Scheduler
  • Output Buffered Switches
  • Multiple flows (sessions, connections)
  • Single server
  • Service discipline
  • Different packet scheduling algorithms

7
Classification of Packet Schedulers
  • A general classification
  • Work-conserving
  • The server is never idle when a packet is
    buffered in the system
  • non-work-conserving
  • The server could be idle even there are buffered
    packet in the system
  • Based on internal architecture
  • Sorted-priority
  • Frame-based

8
Classification of Packet Schedulers
  • Sorted-priority
  • A system potential (a global variable) is updated
    each time a packet arrives or departs
  • A timestamp is computed as a function of the
    system potential for each packet
  • Packets are sorted and transmitted based on their
    timestamps
  • Frame-based
  • Time is split into frames of fixed or variable
    length
  • Each session makes a reservation in terms of
    maximum traffic it is allowed to transmit during
    a frame period
  • The reservation is made according to a sessions
    allocated rate

9
Several Well-known Schedulers
  • Round-robin
  • Weighted round-robin
  • Deficit round-robin
  • Generalized processor sharing (GPS)
  • Weighted fair queueing (P-GPS)
  • Virtual clock
  • Self-clocked fair queueing

10
Round-robin Schedulers
  • Basic scheme serve all backlogged sessions in a
    round-robin fashion
  • Weighted round-robin (fixed-length packets)
  • Time is divided into frames
  • Each sessions is assigned a weight in terms of
    number of packets that could be served during a
    frame
  • A counter is maintained for each session to
    record the number of packets that have been
    served during the current frame
  • Deficit round-robin (variable-length packets)
  • Each session is assigned a weight in terms of
    number of bits (or bytes)

11
Generalized Processor Sharing
  • GPS is an ideal scheduling discipline with
    respect to a fluid-model
  • The minimum service that a connection can receive
    in any interval of time is

12
Weighed Fair Queueing (P-GPS)
  • WFQ is the Packetized version of GPS defined in
    terms of a system potential (virtual time) V(t)
  • Maintaining V(t) requires a GPS system is
    simulated in parallel with the WFQ scheduler
  • The timestamp TSi associated with the k-th packet
    arriving at t of flow i is calculated as

13
Virtual Clock Scheduler
  • VC is proposed before GPS but can be looked as an
    approximation of GPS
  • Virtual time V(t) is define as real time t
  • Thus, the timestamp of a packet is defined as
  • VC achieves worst-case delay for a leaky-bucket
    controlled session comparable to WFQ
  • However, VC can not bound short-term unfairness

14
Self-clocked Fair Queueing
  • SCFQ is another packetized approximation of GPS
    scheduler with low implementation complexity
  • V(t) is defined as the timestamp TScur of the
    packet currently in service
  • The timestamp of an arrival packet is calculated
    as
  • SCFQ achieves short-term fairness better than WFQ
  • However, the worst-case delay is proportional to
    the number of sessions in the scheduler

15
Latency-Rate Servers
  • LR-server defines a general class of schedulers
  • Each specific scheduler S that belongs to
    LR-server is only characterized by a parameter
    ?S, named latency
  • LR-server provides a convenient way to analyze
    the worst-case behaviors, such as delay, buffer
    requirement, and internal burstiness in an
    arbitrary topology network where a broad range of
    schedulers are employed.

16
Example A Network of LR-Servers
E
C
A
Session i
B
D
?i
F
17
Definition of LR-Servers
  • Assumption
  • Non-cut-through server
  • Ai(?, t) and Wi(?, t) are increased only when the
    last bit of a packet arrives/leaves the server
  • System busy period a maximal interval of time
    during which the server is never idle
  • Backlogged period for session i any period of
    time during which packets belonging to that
    session are continuously queued in the system
  • Define Qi(t) Ai(0, t) Wi(0,t)

18
Definition of LR-Servers
  • Session i busy period a maximal interval of time
    (?1,?2 such that for any time t?(?1,?2,
    Ai(?1,t) ? ?i(t- ?1)
  • Note that a session busy period is only related
    to the arrival traffic and allocated rate
  • This definition facilitates LR-servers to be able
    to analyze a broad range of schedulers

19
Definition of LR-Servers
  • A server S belongs in the class LR if and only if
    all times t after time ? that the jth busy period
    of session i started and until the packets that
    arrived during this period are serviced,
  • is the minimum non-negative number that
    satisfies the above inequality
  • The right-hand side of the above equation defines
    an envelope to bound the minimum service offered
    to session i during a busy period

20
An example of the behavior of an LR server
21
Analysis of a Single LR Server
  • Assumption
  • Input traffic of session I is leaky-bucket
    smoothed, Ai(?,t) ? ?i?i(t-?)
  • Allocated rate is at least equal to the average
    arrival rate
  • If S is an LR server, the following bounds must
    hold
  • Backlog Qi(t) ? ?i ?i?i
  • Delay Di ? ?i/?i ?i
  • Output traffic conforms to (?i ?i?i , ?i)

22
Analysis of a network of LR Servers
  • Session i passes through a chain of LR servers in
    the network
  • Result I The output traffic of the kth server
    conforms to a leaky bucket process with
    parameters
  • Result II The maximum backlog in the kth node of
    a session is bounded as

23
Analysis of a network of LR Servers
  • Result III The maximum delay of a session I in a
    network of LR servers, consisting of K servers in
    series, is bounded as
  • It is interesting to notice that the results from
    a series of LR servers is the same as that from a
    single LR server with a latency that equals to
    the sum of the formers

24
Fairness of LR Servers
  • Normalized service Wi(?,t)/?i
  • A scheduler is perfectly fair if,
  • Wi(?,t)/?i - Wj(?,t)/?j 0
  • E.g. GPS is perfectly fair
  • For a packetized scheduler, it is close to fair
    if,
  • Wi(?,t)/?i - Wj(?,t)/?j ? FS
  • FS is a constant, named fairness of server S
  • This definition originated from SCFQ paper

25
Example Unfairness of VirtualClock Scheduler
  • Two sessions and each one is allocated half of
    bandwidth
  • Each packet is unity length
  • Service rate is unity
  • VirtualClock cannot bound fairness, if the
    traffic burstiness is unbounded

26
Characteristic of Several Schedulers
27
Design Objectives of a Fair Queueing Algorithm
  • Delay (latency) and burstiness comparable to WFQ
  • Simple timestamp computation
  • The complexity of WFQ is O(V), not good
  • Bounded fairness (comparable to SCFQ)
  • Introduce another class of schedulers, named Rate
    Proportional Server (RPS)
  • Latency comparable to WFQ

28
RPS Potential Function
  • A function represents the state of each
    connection in a scheduler, named potential, Pi(t)
  • The potential of a connection is a non-decreasing
    function of time during a system-busy period
  • All potentials can be initialized to zero at the
    beginning of a system-busy period
  • Pi(t) increases exactly by the normalized service
    session i received when it is backlogged
  • Pi(t) Pi(?) Wi(t, ?) / ?i

29
Why Potential Functions ?
  • A fair algorithm must attempt to increase the
    potentials of all backlogged connections at the
    same rate, in another word, equalize the
    potential of each connection
  • E.g. all sorted-priority schedulers (GPS, WFQ,
    VirtualClock, SCFQ)

30
How About Potentials of Idle Sessions ?
  • Ideally, the Pi(t) of an idle session must
    increase in the same way as it were backlogged
  • Introduce system potential, P(t), that keeps
    track of the total work done by the scheduler
  • Update Pi(t) with P(t) when session I becomes
    backlogged to account for the service it missed
  • Generally, P(t) can be defined as a
    non-decreasing function of Pi(t-) and t,
  • P(t) f(Pi(t-), t), i1..V
  • GPS P(t) Pi(t)
  • VirtualClock P(t) t

31
An Interesting Illustration
32
RPS Definition (Fluid Model)
  • A rate proportional server has the following
    properties
  • Sum of ?i ? r
  • Properties of Pi(t)
  • Remain constant when not backlogged
  • Pi(t) max( Pi(t-), P(t) ), when become
    backlogged
  • Pi(t) Pi(?) Wi(?,t) / ?i
  • Conditions for P(t)
  • P(t2) P(t1) ? t2 t1
  • P(t) ? min (Pj(t)), where j?B(t)

33
RPS Definition (contd)
  • Service discipline
  • Among the backlogged connections, only the set of
    connections with the minimum potential at time t
    is served
  • Each connection in this set is served with an
    instantaneous rate proportional to its
    reservation, so as to increase the potentials of
    the connections in this set at the same rate
  • It is proved that RPS is LR with zero latency

34
Illustration of the Evolution of Potential
Functions in RPS
35
Packetized RPS (PRPS)
  • A PRPS is defined in terms of the fluid-model as
    one that transmits packets in increasing order of
    their finishing potential
  • Finishing potential of a packet of session i
    equals to Pi(t), where t is time when the packet
    finishes service in the fluid server
  • Finishing potential is used to timestamp the
    arrival packet

36
Difference Bound Between PRPS RPS
  • For all packets in PRPS,
  • At any time t,
  • At any time t,

37
Delay Analysis of PRPS
  • A PRPS is an LR server with latency
  • The latency of PRPS is the same as that of WFQ

38
Fairness Analysis of PRPS
  • The choice of system potential function has a
    significant influence on the fairness of service
    provided to the sessions
  • PRPS guarantee the average service offered to
    each session, implying it is a long term concept
  • However, if the system potential lags far behind
    the potential of backlogged sessions, PRPS may
    penalized sessions for service received in excess
    of their reservation at an earlier time (e.g.
    VirtualClock Scheduler)

39
Fairness Analysis of PRPS (contd)
  • If the system potential function in a RPS never
    lags behind more than a finite amount ?P from the
    potential of the connections that are served in
    the system, the difference in normalized service
    offered to any two connections during any
    interval of time that they are continuously
    backlogged is also bounded by ?P, that is,

40
Fairness Analysis of PRPS (contd)
  • Extend the above result to PRPS,
  • Ci is defined as,

41
Fair RPS (FRPS)
  • It can be seen from above that the fairness of an
    RPS is determined by the choice of the system
    potential function
  • The definition of fair RPS
  • A finite constant ?P can be found such that P(t)
    ? Pi(t) ?P, for any i?B(t)
  • The above constraint can be satisfied by the use
    of a re-calibration mechanism periodically to
    bound the maximum difference between P(t) and
    Pi(t)

42
Base Potential Function
  • A base potential function SP(t) is a
    non-decreasing function with the following
    properties
  • Any RPS server can achieve bounded fairness by
    periodically re-calibrating the system potential
    using the base potential function, if the
    interval between re-calibration is bounded

43
Construction of FRPS
  • During a system-busy period, the function P(t) is
    a piecewise linear function of time t
  • At time ?0lt ?1lt lt ?k, the system potential is
    updated as
  • P(?j) max( P(?j-), SP(?j) )
  • At any time t between update,
  • P(t) P(?j) (t- ?j), ?jlttlt?j1
  • The interval between updates is bounded,
  • ?j1 - ?j? ?T

44
Two examples of FRPS
  • Frame-based fair queueing (FFQ)
  • SP(t) k x T
  • Starting potential fair queueing (SPFQ)
  • SP(t) minSi(t)
  • i?B(t)

45
Properties of SPFQ
  • Fairness of SPFQ, comparable to WFQ
  • According to the definition of SSPFQ(t), the
    complexity for system potential updating is
    O(logV), which is fine since at least O(logV) is
    necessary to do departure selection

46
Topics Remained to be Discussed
  • How to achieve better fairness ?
  • Worst-case fair Weighted Fair Queuing (WF2Q) and
    WF2Q
  • Introduce another fairness measurement, named
    worst-case fair index (WFI)
  • Shaped RPS
  • E.g. shaped VirtualClock shaped SPFQ
  • How to support difference class of service
    simultaneously ?
  • Hierarchical packet fair queueing (H-PFQ)

47
Reference
  • 1 D. Stiliadis and A. Varma, "Latency-Rate
    Servers A General Model for Analysis of Traffic
    Scheduling Algorithms" in IEEE/ACM Transactions
    on Networking, October 1998
  • 2 D. Stiliadis and A. Varma, Rate Proportional
    Servers A Design Methodology for Fair Queueing
    Algorithms," in IEEE/ACM Transactions on
    Networking, April 1998
  • 3 D. Stiliadis and A. Varma, Efficient Fair
    Queueing Algorithms for Packet Switched
    Networks," in IEEE/ACM Transactions on
    Networking, April 1998
  • 4 A. K. Parekh and R. G. Gallager A
    generalized processor sharing approach to flow
    control the single node case, in Proc. of IEEE
    INFOCOM, May 1992
  • 5 L. Zhang, Virtual clock a new traffic
    control algorithm for packet switching networks,
    in Proc. ACM SIGCOMM, Sep 1990

48
Reference (contd)
  • S. Golestani A selfclocked fair queueing scheme
    for broadband applications, in Proceedings of
    IEEE INFOCOM, April 1994
  • M. Shreedhar and G. Varghese Ecient fair
    queueing using deficit round robin, in
    Proceedings of ACM SIGCOMM, Sep 1995
  • J. C. R. Bennett and H. Zhang, WF2Q worst-case
    fair weighted fair queueing, in Proceeding of
    IEEE INFOCOM, Mar, 1996
  • J. C. R. Bennett and H. Zhang, Hierarchical
    packet fair queueing algorithms, in IEEE/ACM
    Tran. on Networking, Oct 1997
  • D. Stiliadis and A. Varma, A general methodology
    for design efficient traffic scheduling and
    shaping algorithms, in Proc. IEEE INFOCOM, Apr
    1997
  • F. M. Chiussi and A. Francini, A distributed
    scheduling architecture for scalable packet
    switches, in IEEE JSAC, Dec 2000

49
Questions Comments ?
  • Thank you ?
Write a Comment
User Comments (0)
About PowerShow.com