30
Performance Evaluation and Asymptotics for Content Delivery Networks Virag Shah, Prof. Gustavo de Veciana The University of Texas at Austin May 02, 2014 1

Performance Evaluation and Asymptotics for Content …users.ece.utexas.edu/~gustavo/talks/shah-Infocom2014.pdf( Multipath TCP; P2P content delivery ^ ) Back of the envelope performance

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

  • Performance Evaluation and Asymptotics forContent Delivery Networks

    Virag Shah, Prof. Gustavo de Veciana

    The University of Texas at Austin

    May 02, 2014

    1

  • Disciplined Engineering of Large Scale CDNs

    • ‘Content is King’ [Bill Gates ’96]

    • Netflix + Youtube: ~50% of today’s peak internet traffic• More than a billion hours of video per month

    • Akamai: ~150,000 servers distributed over 1,200 ISPs• Delivers 15-30% of all Web traffic, reaching up to 15 TB/s

    • Providing better user-perceived performance (download time) atlow operating cost is a key problem

    • Our Goal: Provide robust models to enable large scale systemdesign, and performance analysis + optimization

    2

  • Selected Related WorkLarge Scale Performance Modeling applicable to CDNs:

    • Is routing request to the/a least loaded server enough?[Vvedenskaya et al.’96; Mitzenmacher ’96; Bramson et al.’12]

    • If we defer service decision until servers become available, howshould the number of copies scale? [Tsitsiklis & Xu ’13]

    • How should content be replicated/dynamically cached to reducetraffic to centralized back-up? [Leconte et al.’14, Moharir et al.’14]

    Other metrics:

    • Reliability, e.g., [Cidon et al.’13] show randomized contentplacement is not always optimal

    • Reducing energy costs, e.g., by leveraging energy storage[Palasamudram ’12], etc.

    3

  • The QuestionWhat is the impact on user performance in a large scale system if asubset of servers work together, as a pooled resource, to serveindividual download requests?

    Two key elements:

    1. Parallel downloads of customer files

    2. Coupling across servers

    4

  • System Model: Simple Example

    r2

    r1

    µ2

    µ1 + µ2r2(x)

    r1(x) r(x)

    Capacity region

    x1

    Network state x = (x1, x2)

    x2

    λ1

    λ2

    Service:

    2. PS discipline within a queue

    1. rate ri (x) for i th queue– state dependent r(x) ∈ C ⊂ R2+ for each state x

    C

    f1

    f2

    s1

    s2

    µ1

    µ2

    Poisson

    Dynamic Model

    Files Servers

    3. Service requirements: i.i.d. with mean νi for file i

    arrivals

    One queue for each file type

    under poolingFile placement

    ν2

    ν1

    5

  • Dynamic Resource Allocation & Fairness

    x1

    x2

    x1 < x2r1

    r2

    r(x)

    Cx1

    x2

    x1 > x2r1

    r2

    r(x)C

    • Ideally, r(x) assigns more rate to bigger queues, i.e., to file typeswith more requests

    • e.g., Max-min, Proportional, α-fair, Balanced fair

    • We use Balanced fair because it is close to Proportional fair &tractable[ e.g., Bonald & Proutiere ’03, Massoulié ’07, Joseph & de Veciana ’11]

    6

  • What is Balanced Fairness?

    ρ = λνPS

    µ

    r(x) = µ

    π(x) = ρx (1− ρ)

    insensitive to servicerequirement distribution

    ρ1 = λ1ν1 r1(x)

    ρ2 = λ2ν2 r2(x)C

    For some function Φ(.) : Z2+ → R+,

    π(x) = Φ(x)ρx11 ρx22 (G(ρ1, ρ2))

    −1

    insensitive to servicerequirement distribution

    ei := unit vectorin i th direction

    ri (x) =Φ(x−ei )

    Φ(x)

    7

  • What is Balanced Fairness?

    • Balanced fair rate allocation is the choice for Φ(.) such that

    ∀x, r(x) = (r1(x), r2(x)) =(

    Φ(x− e1)Φ(x)

    ,Φ(x− e2)

    Φ(x)

    )and is on the boundary of C.

    r2

    r1

    r(x)

    • Similarly, generalizes to n dimensions

    8

  • Content Delivery System Model: General

    r2(x)

    r1(x)x2

    x1

    Capacity region C ⊂ Rnf1

    f2

    s1

    s2µ1

    µ2

    Dynamic Model

    n Files m Servers

    f3

    fn

    s3

    sm

    r3(x)x3

    rn(x)xn

    r(x) ∈ C for each state x ∈ Zn

    given by balanced fairness

    λ1ν1

    λ2ν2

    λ3ν3

    λnνn

    µ3

    µm

    F

    Poissonfile requests

    under pooling

    9

  • Structural Result: Polymatroid Capacity Region

    TheoremFor a given file placement, the capacity region C is a polymatroidwith rank function µ(.).

    • Rank function: µ : 2F → R+, where µ(A) := sum capacityfor servers that can serve any file in set A

    • C = {r ≥ 0 :∑

    i∈A ri ≤ µ(A), ∀A ⊂ F}

    • µ(.) is submodular, i.e., µ(A) + µ(B) ≥ µ(A ∪ B) + µ(A ∩ B)

    10

  • Performance Result: Expression for Mean Delayfor Serving File Requests

    TheoremGiven capacity region C with rank function µ(.), andρ = (ρi : ρi = λiνi , i ∈ F ), the mean delay for file fi is:

    E [Di ] =νi

    ∂∂ρi

    G(ρ)

    G(ρ)

    • where G(ρ) =∑

    A⊂F GA(ρ),

    • and where G∅(ρ) = 1, and GA(ρ) can be computed recursivelyas GA(ρ) =

    ∑i∈A ρi GA\{i}(ρ)µ(A)−

    ∑j∈A ρj

    .

    11

  • Complexity of Expression for Mean Delay

    • Bad news: µ(.) has exponential complexity in n, so mean delayis hard to compute

    • Good news: If µ(.) is symmetric, then complexity is linear in n

    • Better news: Some asymmetric large systems can beasymptotically approximated by that of a symmetric system

    • We now use this idea to analyze practically relevant largescale systems!

    12

  • Large-Scale CDN Asymptotic Regimeand Randomized File Placement

    • Large number of server: m→∞

    • Larger number of files: n→∞ faster than m

    • Fixed number of copies for each file: c• Stored at random across servers

    13

  • Load & Capacity: Homogeneity, Scaling and Stability

    • Homogeneity of Load and Scaling:• Arrival rate for each file: λ(m,n) = λmn for some constant λ• Arrival rate per server: λ• Mean service requirements for requests of each file: ν• Load per server: ρ = λν, a constant.

    • Homogeneity of Capacity and Stability:• Let µi = ξ for each server i• Let ρ < ξ for stability.

    14

  • RPBF Systems: Randomized Placement andBalanced Fairness

    For given m and n, the capacity region C(m,n) is randomf1

    f2

    s1

    s2

    µ1

    n Files m Servers

    f3

    fn

    s3

    sm

    Random bipartite graph

    degree c

    M(m,n)(.) := associated randomrank function

    µm

    µ3

    µ2

    µ(m,n)(.) := a realization of M(m,n)(.)

    Given a realization of the Randomized Placement, we study theperformance under Balanced Fair rate allocation

    15

  • Approximation via ‘Averaged’ Capacity

    • In a randomized file placement, the averaged rank function

    µ̄(m,n)(A) := E [M(m,n)(A)] for all A ⊂ F ,

    is symmetric!

    16

  • Goodness of Approximation via ‘Averaged’ Capacity

    m = 4, n→∞, c = 2, and ξ = 1

    0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

    1

    1.5

    2

    2.5

    3

    3.5

    Load per server ρ

    Mea

    n d

    elay

    Asymmetric capacity region

    Averaged capacity region

    17

  • Mean Delay of RPBF Systems: Asymptotics via‘Averaged’ Capacity

    TheoremFor the ‘averaged’ capacity region with rank function µ̄(.), under loadhomogeneity, scaling and stability assumptions, the expected delaysatisfies:

    limm→∞

    limn→∞

    E [D(m,n)] =1λc

    log(

    11− ρ/ξ

    )• Compare this with standard M/GI/1 PS queue where

    E [D] ∝ 11− ρ/ξ

    • In M/GI/1, total service rate across jobs is fixed

    • In RPBF systems, effective service rate increases with morejobs!

    18

  • Performance Evaluation: Key factors

    1. Parallel downloads from servers• Abstracted in capacity region C(m,n)

    2. Coupling across servers• Randomized placement =⇒ overlapping pools of servers

    Claim: BF over C(m,n) nicely exploits both for load balancingacross servers!

    19

  • Baseline Policy 1: Fixed Pools and Parallel Downloads

    n files m servers

    c serversin a group

    µ1 = ξ

    ξ

    ξ

    ξ

    ξ

    ξ

    • Pro: Parallel download from servers• Con: Non-overlapping pools =⇒ No load balancing

    20

  • Baseline Policy 2: Random Placement andLeast-loaded Routing

    s1 s2 s3 sm

    n Files m Serversc

    Poisson file request arrivals

    Route to one of the c servers with

    m servers

    Randomized File Placement Least-loaded Routing

    the least number of waiting jobs

    • Pro: Good load balancing across servers• Con: No parallel downloads from multiple servers

    21

  • Performance Comparison• c = 3, ξ = 1, ν = 1• n→∞ and then m→∞• Each policy is stable for ρ < 1

    0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95

    0.6

    0.8

    1

    1.2

    1.4

    1.6

    1.8

    2

    2.2

    Load per server ρ

    Mean D

    ela

    y

    Least Loaded Routing

    Fixed Pooling

    Crossover point

    > 100% gain

    > 100% gain RPBF

    22

  • Summary

    • Parallel service sharing gives substantial performanceimprovements across loads, e.g., even over least loadedrouting( Multipath TCP; P2P content delivery ¨̂ )

    • Back of the envelope performance estimates• e.g., E [D] ∝ 1c , and E [D] ∝ log

    (1

    1−ρ/ξ

    )• Enabled evaluation of Performance-Reliability-Energy

    tradeoffs in engineering CDNs• e.g., can limit overlapping of pools for reliability at cost of

    performance

    23

  • Energy-Delay Tradeoffs• Power consumption model: f (ξ) = ξ2 when service rate ξ

    [Wierman et al. ’12].• Speed scaling policy: Turn server off when idle, turn on

    with service rate ξ when busy.• Increasing ξ trades off energy for performance.

    0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    1.4

    1.6

    Mean energy consumption per unit time

    Mean d

    ela

    y

    > 20 % savings> 70% energy savings

    Least loaded routing

    Fixed pooling

    Randomized placement & fair allocations

    Energy-delay tradeoff with varying server speed ξ. ρ = 0.8, ν = 1,and c = 3.

    24

  • Reliability Against Correlated Failures

    • Consider large scale correlated failures: e.g., about 1% ofservers can fail after power outage

    • All the c copies of some files may be lost

    • Recovering from cold storage may incur high fixed costs,less affected by number of files lost [Cidon et al.’13]

    • Goal: keep probability of a file loss (Ploss) low

    25

  • Strategy For Better Reliability

    • File placement policy [Cidon et al.’13]:• Partition set of servers into m/κ pools of size κ• Partition set of files into m/κ groups• Random file-server association within a group

    • Keep κ small for lower Ploss

    Files

    Servers

    Randomassociation

    within a group

    κ servers in a group

    c = 2

    26

  • Performance Reliability Tradeoff• Upon power outage, say with probability 0.01 a server fails.

    0 10 20 30 40 50 600.5

    0.6

    0.7

    0.8

    0.9

    1

    1.1

    1.2

    1.3

    Pool size κ

    Mea

    n d

    elay

    0 10 14 20 30 40 50 6010

    −4

    10−3

    10−2

    10−1

    100

    Plo

    ss

    Probability of file loss

    Mean Delay

    n = 2× 106, m = 400, c = 3, ρ = 0.7, and ν = 1.

    • At κ = 14, mean delay is 12% greater than the minimumvalue, while Ploss is less than 1%.

    • Decreasing κ can further lower Ploss but at the cost of asignificant increase in mean delay. 27

  • Key Idea behind Asymptotic Result• In our asymptotic regime, one gets concentration of

    measure on states x such that µ̄(m,n)(Ax) ≈ ρm

    ρm

    |Ax|

    µ̄(m,n)(Ax)

    Total load into the system = ρm

    |Ax| drifts upwards

    µ̄(m,n)(Ax)� ρm|Ax| drifts downwards

    µ̄(m,n)(Ax)� ρm

    • Proof a bit technical, uses the exact mean delay expression

    28

  • More Detailed Intuition for Asymptotic Expression• In the limiting regime, the invariant distribution

    concentrates on states x such that µ̄(m,n)(Ax) ≈ ρm• If µ̄(m,n)(A)� ρm or µ̄(m,n)(A)� ρm, system quickly drifts

    towards equilibrated states• Actual proof quite technical, uses the exact mean delay

    expression

    • Recall:µ̄(m,n)(A) = ξm(1− (1− c/m)|A|) ≈ ξm

    (1− e−c|A|/m

    )• µ̄(m,n)(Ax ) ≈ ρm when |Ax| ≈ mc log

    (1

    1−ρ/ξ

    )• As n→∞,

    ∑i xi ≈ |Ax | w.h.p.

    • By Little’s Law, E [D(m,n)] ≈ 1λc log(

    11−ρ/ξ

    )29

  • Balanced Fairness: Defintion

    ri(x) =Φ(x− ei)

    Φ(x)i = 1,2

    • Balanced fair rate allocation is the choice of Φ(.) such that∀x, r(x) = (r1(x), r2(x)) is on the boundary of C.

    • Formally, set Φ(0) = 1, Φ(x) = 0, ∀x s.t. xi < 0 for somei , otherwise, set:

    Φ(x) = inf(α :

    (Φ(x− e1)

    α,

    Φ(x− e2)α

    )∈ C)

    Φ(x− e2)

    Φ(x− e1)

    r2

    r130