traffic behavior and queuing in qos...

70
Traffic Behavior and Queuing in QoS Environment Instructor: Hamid R. Rabiee Spring 2012

Upload: others

Post on 02-Feb-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

  • Traffic Behavior and Queuing

    in QoS Environment

    Instructor: Hamid R. Rabiee

    Spring 2012

  • Objectives

    Provide some basic understanding of queuing phenomena

    Explain the available solution approaches and associated

    trade-offs

    Give guidelines on how to match applications and solutions

    2

  • Outline

    Basic concepts

    Source models

    Service models (demo)

    Single-queue systems

    Priority/shared service systems

    Networks of queues

    3

  • Outline

    Basic concepts Performance measures

    Solution methodologies

    Queuing system concepts

    Stability and steady-state

    Causes of delay and bottlenecks

    Source models

    Service models(demo)

    Single-queue systems

    Priority/shared service systems

    Networks of queues

    4

  • Performance Measures

    Delay

    Delay variation (jitter)

    Packet loss

    Efficient sharing of bandwidth

    Relative importance depends on traffic type (audio/video, file transfer,

    interactive)

    Challenge: Provide adequate performance for (possibly) heterogeneous

    traffic

    5

  • Queuing System Concepts:

    Arrival Rate, Occupancy, Time in the System

    Queuing system

    Data network where packets arrive, wait in various queues, receive service at

    various points, and exit after some time

    Arrival rate

    Long-term number of arrivals per unit time

    Occupancy

    Number of packets in the system (averaged over a long time)

    Time in the system (delay)

    Time from packet entry to exit (averaged over many packets)

    6

  • Stability and Steady-State

    A single queue system is stable if

    packet arrival rate < system transmission capacity

    For a single queue, the ratio

    packet arrival rate / system transmission capacity

    is called the utilization factor

    Describes the loading of a queue

    In an unstable system packets accumulate in various queues and/or get dropped

    For unstable systems with large buffers some packet delays become very large

    Flow/admission control may be used to limit the packet arrival rate

    Prioritization of flows keeps delays bounded for the important traffic

    Stable systems with time-stationary arrival traffic approach a steady-state

    7

  • Little’ s Law

    For a given arrival rate, the time in the system is proportional to packet occupancy

    N = T

    where

    N: average number of packets in the system

    : packet arrival rate (packets per unit time)

    T: average delay (time in the system) per packet

    Examples:

    `On rainy days, streets and highways are more crowded

    Fast food restaurants need a smaller dining room than regular restaurants with the same customer

    arrival rate

    Large buffering may cause large delays

    8

  • Explanation of Little’ s Law

    Amusement park analogy: people arrive, spend time at various sites, and

    leave

    They pay $1 per unit time in the park

    The rate at which the park earns is $N per unit time

    (N: average number of people in the park)

    The rate at which people pay is $ T per unit time

    (: traffic arrival rate; T: time per person)

    Over a long horizon:

    Rate of park earnings = Rate of people’s payment

    or

    N = T

    9

  • Delay is Caused by Packet Interference

    If arrivals are regular or sufficiently spaced apart, no queuing delay occurs

    Regular Traffic

    Irregular but

    Spaced Apart Traffic

    10

  • Burstiness Causes Interference

    Note that the departures are less bursty

    11

  • Burstiness Example

    Different Burstiness Levels at Same Packet Rate

    Source: Fei Xue and S. J. Ben Yoo, UCDavis, “On the Generation and Shaping Self-similar Traffic in Optical Packet-switched Networks”, OPNETWORK 2002

    12

  • Packet Length Variation Causes Interference

    Regular arrivals, irregular packet lengths

    13

  • High Utilization Exacerbates Interference

    As the work arrival rate:

    (packet arrival rate * packet length)

    increases, the opportunity for interference increases

    Time

    Queuing Delays

    14

  • Bottlenecks

    Types of bottlenecks

    At access points (flow control, prioritization, QoS enforcement needed)

    At points within the network core

    Isolated (can be analyzed in isolation)

    Interrelated (network or chain analysis needed)

    Bottlenecks result from overloads caused by:

    High load sessions, or

    Convergence of sufficient number of moderate load sessions at the same queue

    15

  • Bottlenecks Cause Shaping

    The departure traffic from a bottleneck is more regular than the arrival

    traffic

    The inter-departure time between two packets is at least as large as the

    transmission time of the 2nd packet

    16

  • Bottlenecks Cause Shaping

    Bottleneck

    90% utilization

    Transmission time

    sec

    Exponential

    interarrivals

    sec

    # of packets

    # of packets

    Incoming traffic

    Interarrival timesOutgoing traffic

    Interdeparture times

    Fixed

    packet

    length

    17

  • Bottleneck

    90% utilization

    Outgoing traffic

    Interdeparture times

    Incoming traffic

    Interarrival times

    Large

    Medium

    Small

    sec

    # of packets

    18

  • Packet Trains

    Histogram of inter-departure times for small packets

    sec

    # of packets

    19

  • Outline

    Basic concepts

    Source models

    Poisson traffic

    Batch arrivals

    Example applications – voice, video, file transfer

    Service models (demo)

    Single-queue systems

    Priority/shared service systems

    Networks of queues

    20

  • Poisson Process with Rate

    Interarrival times are independent and exponentially

    distributed

    Models well the accumulated traffic of many

    independent sources

    The average interarrival time is 1/ (secs/packet), so

    is the arrival rate (packets/sec)

    Time

    Interarrival Times

    21

  • Batch Arrivals

    Some sources transmit in packet bursts

    May be better modeled by a batch arrival process

    (e.g., bursts of packets arriving according to a Poisson process)

    The case for a batch model is weaker at queues after the first, because of

    shaping

    22

  • Markov Modulated Rate Process (MMRP)

    Extension: Models with more than two states and/or stochastic

    transmission process

    Stay in each state an exponentially

    distributed time,

    Transmit according to a deterministic process

    at each state

    State 0 State 1

    OFF ON

    23

  • Source Types

    Voice sources

    Video sources

    File transfers

    Web traffic

    Interactive traffic

    Different application types have different QoS requirements, e.g., delay,

    jitter, loss, throughput, etc.

    24

  • Source Type Properties

    Characteristics QoS Requirements

    Model

    Voice * Alternating talk-spurts and silence

    intervals.

    * Talk-spurts produce

    constant packet-rate

    traffic

    Delay < ~150 ms

    Jitter < ~30 ms

    Packet loss < ~1%

    * Two-state (on-off) Markov

    Modulated Rate Process (MMRP)

    * Exponentially distributed time at

    each state

    Video * Highly bursty traffic (when encoded)

    * Long range

    dependencies

    Delay < ~ 400 ms

    Jitter < ~ 30 ms

    Packet loss < ~1%

    K-state (on-off) Markov Modulated Rate Process (MMRP)

    DataFTP

    telnet

    web

    * Poisson type

    * Sometimes batch-

    arrivals, or bursty,

    or sometimes on-off

    Zero or near-zero packet loss Delay may be important

    Poisson, Poisson with batch arrivals, Two-state MMRP

    25

  • Typical Voice Source Behavior

    26

  • MPEG1 Video Source Model

    Diagram Source: Mark W. Garrett and Walter Willinger, “Analysis, Modeling, and Generation of Self-Similar VBR Video Traffic, BELLCORE, 1994

    The MPEG1 MMRP model can be extremely bursty, and has “long range

    dependency” behavior due to the deterministic frame sequence

    27

  • Outline

    Basic concepts

    Source models

    Service models

    Single vs. multiple-servers

    FIFO, priority, and shared servers

    Demo

    Single-queue systems

    Priority/shared service systems

    Networks of queues

    28

  • Device Queuing Mechanisms

    Common queue examples for IP routers

    FIFO: First In First Out

    PQ: Priority Queuing

    WFQ: Weighted Fair Queuing

    Combinations of the above

    Service types from a queuing theory standpoint

    Single server (one queue - one transmission line)

    Multiple server (one queue - several transmission lines)

    Priority server (several queues with hard priorities - one transmission line)

    Shared server (several queues with soft priorities - one transmission line)

    29

  • Single Server FIFO

    Single transmission line serving packets on a FIFO (First-In-First-Out)

    basis

    Each packet must wait for all packets found in the system to complete

    transmission, before starting transmission

    Departure Time = Arrival Time + Workload Found in the System +

    Transmission time

    Packets arriving to a full buffer are dropped

    Arrivals

    Transmission Line

    30

  • Multiple Servers

    Multiple packets are transmitted simultaneously on multiple lines/servers

    Head of the line service: packets wait in a FIFO queue, and when a server

    becomes free, the first packet goes into service

    31

  • Priority Servers

    Packets form priority classes (each may have several flows)

    There is a separate FIFO queue for each priority class

    Packets of lower priority start transmission only if no higher priority packet is waiting

    Priority types:

    Non-preemptive (high priority packet must wait for a lower priority packet found under transmission

    upon arrival)

    Preemptive (high priority packet does not have to wait …)

    32

  • Priority Queuing

    Packets are classified into separate queues

    E.g., based on source/destination IP address, source/destination TCP port, etc.

    All packets in a higher priority queue are served before a lower priority queue is served

    Typically in routers, if a higher priority packet arrives while a lower priority packet is

    being transmitted, it waits until the lower priority packet completes

    33

  • Shared Servers

    Again we have multiple classes/queues, but they are served with a “soft” priority

    scheme

    Round-robin

    Weighted fair queuing

    34

  • Round-Robin/Cyclic Service

    Round-robin serves each queue in sequence

    A queue that is empty is skipped

    Each queue when served may have limited service (at most k packets

    transmitted with k = 1 or k > 1)

    Round-robin is fair for all queues (in terms of packet transmission rate)

    Round-robin cannot be used to enforce bandwidth allocation among the

    queues.

    35

  • Fair Queuing

    This scheduling method is inspired by the “most fair” of methods:

    Transmit one bit from each queue in cyclic order (bit-by-bit round robin)

    Skip queues that are empty

    To approximate the bit-by-bit processing behavior, for each packet

    We calculate upon arrival its “finish time under bit-by-bit round robin” and we

    transmit by FIFO within each queue

    Transmit next the packet with the minimum finish time

    Important properties:

    Priority is given to short packets

    Equal bandwidth is allocated to all queues that are continuously busy

    36

  • Weighted Fair Queuing

    Fair queuing cannot be used to implement bandwidth allocation and soft priorities

    Weighted fair queuing is a variation that corrects this deficiency

    Let wk be the weight of the kth queue

    Think of round-robin with queue k transmitting wk bits upon its turn

    If all queues have always something to send, the kth queue receives bandwidth equal to a fraction wk / Si wi of the total bandwidth

    Fair queuing corresponds to wk = 1

    Priority queuing corresponds to the weights being very high as we move to higher priorities

    Implementation: For each packet

    Calculate its “finish time” (under the weighted bit-by-bit round robin scheme)

    Transmit the packet with the minimum finish time

    37

  • Weighted Fair Queuing Illustration

    Weights:

    Queue 1 = 3

    Queue 2 = 1

    Queue 3 = 1

    38

  • A Practical Combination (e.g. Cisco)

    Example – voice in PQ, guaranteed b/w traffic in WFQs

    (all at middle priority), and best effort traffic in low priority queue

    39

  • Demo: Comparing FIFO, WFQ and PQ

    Two traffic streams mixing on a common interface Video

    FTP

    Apply different service schemes FIFO

    PQ

    WFQ

    Run simulation and compare queuing delays

    40

  • Demo: FIFO

    FIFOBottleneck 90% utilization

    41

  • Demo: FIFO Queuing Delay

    Applications have different requirements

    Video

    delay, jitter

    FTP

    packet loss

    Control beyond “best effort” needed

    Priority Queuing (PQ)

    Weighted Fair Queuing (WFQ)

    42

  • Demo: Priority Queuing (PQ)

    PQBottleneck 90% utilization

    43

  • Demo: PQ Queuing Delays

    FIFO

    PQ Video

    PQ FTP

    44

  • Demo: Weighted Fair Queuing (WFQ)

    WFQBottleneck 90% utilization

    45

  • Demo: WFQ Queuing Delays

    FIFO

    WFQ/PQ Video

    PQ FTP

    WFQ FTP

    46

  • Queuing: Summary Points

    Choice of queuing mechanism can have a profound effect on performance

    To achieve desired service differentiation, appropriate queuing mechanisms can be used

    Complex queuing mechanisms may require simulation techniques to analyze behavior

    Improper configuration (e.g., queuing mechanism selection or weights) may impact performance of low priority traffic

    47

  • Outline

    Basic concepts

    Source models

    Service models (demo)

    Single-queue systems

    M/M/1……M/M/m/k

    M/G/1……G/G/1

    Demo: Analytics vs. simulation

    Priority/shared service systems

    Networks of queues

    48

  • M/M/1 System

    Nomenclature: M stands for “Memory-less” (a property of the exponential distribution)

    M/M/1 stands for Poisson arrival process (which is “probabilistically memory-less”)

    M/M/1 stands for exponentially distributed transmission times

    Assumptions:

    Arrival process is Poisson with rate l packets/sec

    Packet transmission times are exponentially distributed with mean 1/m

    One server

    Independent inter-arrival times and packet transmission times

    Transmission time is proportional to packet length

    Note 1/m is secs/packet so m is packets/sec (packet transmission rate of the queue)

    Utilization factor: r = 1/m

    49

  • Delay Calculation

    Let

    Q = Average time spent waiting in queue

    T = Average packet delay (transmission plus queuing)

    Note that T = 1/m + Q

    Also by Little’s law

    N = T and Nq = Q

    where

    Nq = Average number waiting in queue

    These quantities can be calculated with formulas derived by Markov chain

    analysis (see references)

    50

  • The analysis gives the steady-state probabilities of number of

    packets in queue or transmission

    P{n packets} = rn(1-r) where r= /m

    From this we can get the averages:

    N = r/(1 - r)

    T = N/ = r/(1 - r) = 1/(m - )

    51

    M/M/1 Results

  • Example: How Delay Scales with Bandwidth

    Occupancy and delay formulas

    N = r/(1 - r) T = 1/(m - ) r= /m

    Assume:

    Traffic arrival rate is doubled

    System transmission capacity m is doubled

    Then:

    Queue sizes stay at the same level (r stays the same)

    Packet delay is cut in half (m and are doubled

    A conclusion: In high speed networks

    Propagation delay increases in importance relative to transmission and queuing delays

    Buffer size and packet loss may still be a problem

    52

  • M/M/m, M/M/ System

    Same as M/M/1, but it has m (or ) servers

    In M/M/m, the packet at the head of the queue

    moves to service when a server becomes free

    Qualitative result

    Delay increases to as r= /mmapproaches 1

    There are analytical formulas for the occupancy

    probabilities and average delay of these systems

    53

  • Finite Buffer Systems: M/M/m/k

    The M/M/m/k system

    Same as M/M/m, but there is buffer space for at most k

    packets. Packets arriving at a full buffer are dropped

    There are formulas for average delay, steady-state

    occupancy probabilities, and loss probability

    The M/M/m/m system is used widely to size telephone or

    circuit switching systems

    54

  • Characteristics of M/M/. Systems

    Advantage: Simple analytical formulas

    Disadvantages:

    The Poisson assumption may be violated

    The exponential transmission time distribution is an

    approximation at best

    Interarrival and packet transmission times may be

    dependent (particularly in the network core)

    Head-of-the-line assumption precludes heterogeneous input

    traffic with priorities (hard or soft)

    55

  • M/G/1 System

    Same as M/M/1 but the packet transmission time distribution is general, with given

    mean 1/m and variance s2

    Utilization factor r = /m

    Pollaczek-Kinchine formula for

    Average time in queue = (s2 + 1/m2)/2(1- r)

    Average delay = 1/m + (s2 + 1/m2)/2(1- r)

    The formulas for the steady-state occupancy probabilities are more complicated

    Insight: As s2 increases, delay increases

    56

  • G/G/1 System

    Same as M/G/1 but now the packet interarrival time

    distribution is also general, with mean and variance 2

    We still assume FIFO, independent interarrival times and

    packet transmission times

    Heavy traffic approximation:

    Average time in queue ~ (s2 + 2)/2(1- r)

    Becomes increasingly accurate as r

    57

  • Demo: M/G/1

    Packet inter-arrival times

    exponential (0.02) sec

    Capacity

    1 Mbps

    Packet size

    1250 bytes

    (10000 bits)

    Packet size distribution:

    exponential

    constant

    lognormal

    What is the average delay and queue size ?

    Compare analytical formulas with simulation results

    58

  • Demo: M/G/1 Analytical Results

    Packet Size Distribution

    Delay T (sec) Queue Size (packets)

    Exponential

    mean = 10000

    variance = 1.0 *1080.02 1.0

    Constant

    mean = 10000

    variance = 0.0

    0.015 0.75

    Lognormal

    mean = 10000

    variance = 9.0 *1080.06 3.0

    59

  • Demo: M/G/1 Simulation Results

    Average Delay (sec) Average Queue Size (packets)

    60

  • Demo: M/G/1 Limitations

    Application traffic mix not memoryless

    Video

    constant packet inter-arrivals

    Http

    bursty traffic

    Delay

    P-K formula

    Simulation

    61

  • Outline

    Basic concepts

    Source models

    Service models (demo)

    Single-queue systems

    Priority/shared service systems

    Preemptive vs. non-preemptive

    Cyclic, WFQ, PQ systems

    Demo: Simulation results

    Networks of queues

    Hybrid simulation (demo)

    62

  • Non-preemptive Priority Systems

    We distinguish between different classes of traffic (flows)

    Non-preemptive priority: packet under transmission is not preempted by a packet

    of higher priority

    P-K formula for delay generalizes

    63

  • Cyclic Service Systems

    Multiple flows, each with its own queue

    Fair system: Each flow gets access to the transmission line in turn

    Several possible assumptions about how many packets each flow can

    transmit when it gets access

    This Type Systems Could Modeled by M/G/1 type assumptions

    64

  • Weighted Fair Queuing

    A combination of priority and cyclic service

    No exact analytical formulas are available

    65

  • Outline

    Basic concepts

    Source models

    Service models (demo)

    Single-queue systems

    Priority/shared service systems

    Networks of queues

    Violation of M/M/. assumptions

    Effects on delays and traffic shaping

    Analytical approximations

    66

  • Two Queues in Series

    First queue shapes the traffic into second queue

    Arrival times and packet lengths are correlated

    M/G/1 formulas yield significant error for second queue

    How about M/M/1 if packet lengths are exponential?

    67

  • Two bottlenecks in series

    Bottleneck

    Exponential

    inter-arrivals

    Bottleneck

    No queuing delayDelay

    Spaced-apart

    inter-arrivals

    Spaced-apart

    departures

    68

  • Approximations

    Kleinrock independence approximation

    Perform a delay calculation in each queue independently of other queues

    Add the results (including propagation delay)

    Note: In the preceding example, the Kleinrock independence

    approximation overestimates the queuing delay by 100%

    Tends to be more accurate in networks with “lots of traffic mixing”, e.g.,

    nodes serving many relatively small flows from several different locations

    69

  • References

    Networking Bertsekas and Gallager, Data Networks, Prentice-Hall, 1992

    Device Queuing Implementations Vegesna, IP Quality of Service, Ciscopress.com, 2001 http://www.juniper.net/techcenter/techpapers/200020.pdf

    Probability and Queuing Models Bertsekas and Tsitsiklis, Introduction to Probability, Athena Scientific, 2002,

    http://www.athenasc.com/probbook.html Cohen, The Single Server Queue, North-Holland, 1992 Takagi, Queuing Analysis: A Foundation of Performance Evaluation. (3

    Volumes), North-Holland, 1991 Gross and Harris, Fundamentals of Queuing Theory, Wiley, 1985 Cooper, Introduction to Queuing Theory, CEEPress, 1981

    OPNET Hybrid Simulation and Micro Simulation See Case Studies papers in

    http://secure.opnet.com/services/muc/mtdlogis_cse_stdies_81.html

    70

    http://www.juniper.net/techcenter/techpapers/200020.pdfhttp://www.juniper.net/techcenter/techpapers/200020.pdfhttp://www.juniper.net/techcenter/techpapers/200020.pdfhttp://www.athenasc.com/probbook.htmlhttp://secure.opnet.com/services/muc/mtdlogis_cse_stdies_81.htmlhttp://secure.opnet.com/services/muc/mtdlogis_cse_stdies_81.htmlhttp://secure.opnet.com/services/muc/mtdlogis_cse_stdies_81.html