Cubic

30
CUBIC: A New TCP- Friendly High-Speed TCP Variant S Ha, I Rhee, L Xu - ACM SIGOPS Operating Systems Review, 2008 Presenter: Deawoo Kim LANADA. KAIST 1

Transcript of Cubic

Page 1: Cubic

CUBIC: A New TCP-Friendly High-Speed TCP

VariantS Ha, I Rhee, L Xu - ACM SIGOPS Operating Systems Review, 2008

Presenter: Deawoo Kim

LANADA. KAIST

1

Page 2: Cubic

TCP Congestion control

• TCP seeks to• Achieve high utilization

• Without congestion

• Source calculates cwnd from indication of network congestion

• Congestion indications• Losses

• Delay

• Marks

2

Page 3: Cubic

Window Flow Control

• W packets transmitted per RTT

• Source rate =

• If W too small, then rate « capacity

• If W too big, then rate > capacity => congestion

3

Page 4: Cubic

TCP Reno (Jacobson 1990)

4

Page 5: Cubic

CUBIC Congestion Control

5

Page 6: Cubic

Wikipedia: CUBIC TCP

• CUBIC is an implementation of TCP with an optimized congestion control algorithm for high bandwidth networks with high latency

1. … the window is a cubic function of time since the last congestion event.Scalable, stable

2. CUBIC does not rely on the receipt of ACKs to increase the window size. CUBIC's window size is dependent only on the last congestion event. • Standard TCP, flows with very short RTTs will receive ACKs

faster and therefore have their congestion windows grow faster than other flows with longer RTTs. CUBIC allows for more fairness between flows since the window growth is independent of RTT.

6

Page 7: Cubic

Bandwidth and Delay Product (BDP)

• Network feature – BW, delay product (BDP)• Total number of packet needed in flight while keeping the BW

fully utilized

• BDP(capacity in bits) = path bandwidth (bps) * round-trip time(s)

• Internet evolves to include many very high speed and long distance network paths

• These networks are characterized by large BDP

Source Destination

Delay (RTT)

Bandwidth

Fully-utilized

Under-utilized

BDP

7

Page 8: Cubic

Under-utilization in Large BDP (example)

• Network environment• BW : 10 Gbps

• RTT : 100ms

• Packet : 1250 bytes

• BDP of the path : 100,000 packets

• TCP grow its window from mid-point of BDP (50,000 packets)

• After 50,000 RTT, fully-utilized (100,000packets)(5,000 sec, 1.4hour)

• If flow finish before 1.4 hour then under-utilization

8

Page 9: Cubic

Legacy TCP

• 1. Multiplicative decrease

• 2. Growth of CWND depends on RTT

Time

cwnd

CA

TD

ssthresh

TD TDTD

Wm

CA CA CA

Large RTT

9

Page 10: Cubic

Related work

• STCP (Scalable TCP)• Recovery time from loss events be constant regardless of the

window size -> scalable

• HSTCP (HighSpeed TCP)• 기본적으로 AIMD

• Window size가특정 threshold 넘으면, increase factor 증가, decrease factor 감소

• TCP-Vegas• δ < 𝛼 : path is not congested -> increase sending rate

• δ > 𝛽 : congestion -> reduce sending rate• δ : difference btw expected throughput and actual throughput

• 𝛼 : low threshold

• 𝛽 : upper threshold

• HTCP• Growth function is function of elapsed time (indep. RTT)

• Decrease factor is adjusted to be proportional to the queue size

10

Page 11: Cubic

Abstract

• CUBIC• Congestion control protocol for TCP

• Default TCP algorithm in Linux

• Modify linear window growth function -> cubic function

• Goal1. Improve the scalability of TCP over fast and long distance

networks

2. Equitable BW allocation among flows with different RTT

3. Stable : keep the CW much longer at the saturation point

4. TCP friendliness

11

Page 12: Cubic

BIC-TCP

• Window growth function : simply a logarithmic concave function

• Stable and Scalable

• How does it work?• Binary search

• Window grows to the mid-point of max and min

• Additive increasing

• Max probing

• Feature• Far from the saturation point : aggressive increase CWND

• Close to saturation point : slowly increase CWND

• Overshoot occurs very small

12

Page 13: Cubic

BIC-TCP Algorithm

Packet loss event

Wmax

Wmin = β*Wmax

midpoint = (Wmin + Wmax)/2

Wmin – midpoint > Smax

Wmin + SmaxWmin

midpoint = (Wmin + Wmax)/2

Wmin + Smax

Wmin

Additive Increase

midpoint = (Wmin + Wmax)/2Wmin + Smin

Wmin(Wmin – midpoint) < Smin

Binary Search

Wmax + SminWmax + Smin

Wmax +Smax

Slow Start

Wmax + 2Smax

Wmax + 3Smax

Additive Inc.

Max Probing

13

Page 14: Cubic

BIC-TCP

• Additive increasing• Jumping to the midpoint can be too much increase within one

RTT

• Binary search algorithm • Stable

• Max probing• Find the new saturation point if it has increased

14

Page 15: Cubic

New Window Growth Function

• BIC-TCP• 장점

• Scalability in high speed networks

• Stability with low window oscillations

• 단점• Growth function can be too aggressive for TCP for short RTT or

low speed networks (RTT-fairness)

• Difference phase (binary search, max probing, 𝑆𝑚𝑎𝑥, 𝑆𝑚𝑖𝑛) complexity

• New window growth function 필요• BIC-TCP 장점취함

• Simple

• TCP friendliness

• RTT-fairness

15

Page 16: Cubic

Introduction

• CUBIC• Next version of BIC-TCP

• Window growth -> cubic function

• cubic function – Incidental, out of convenience

• In mathematics, a cubic function is a function of the form

• The window growth function of CUBIC

• 𝐶 : CUBIC parameter

• 𝑡 : elapsed time from the last window reduction

• 𝐾 : time period take to 𝑊𝑚𝑎𝑥

16

Page 17: Cubic

TCP CUBIC

Packet loss event

Time

Steady State Behavior

Max Probing

Wmax

Around Wmax, window growth almost becomes zeroFast growth upon

reduction

Cubic starts probing for more Bandwidth

17

Page 18: Cubic

RTT-fairness

• Window growth depends only on the real time(congestion

epoch) between two consecutive congestion events

• Independent of RTT

BIC-TCPCUBIC

Large RTT

Small RTT

18

Page 19: Cubic

TCP-friendliness

• Short RTT – window growth rate slower than TCP standards

• Current wnd in CUBIC < window size of standard TCPat time 𝑡

• Set cwnd as Wtcp(t) (Standard TCP)

• Improve convergence speed of CUBIC

• New flow join -> existing flow give up BW

• 𝑊𝐿𝑎𝑠𝑡 𝑚𝑎𝑥 > 𝑐𝑤𝑛𝑑 -> reducing 𝑊𝑚𝑎𝑥 further

19

Fast Convergence

Page 20: Cubic

CUBIC window growth function

• Congestion avoidance basic• Compute the window growth rate during next RTT period

• Set 𝑊(𝑡 + 𝑅𝑇𝑇) as target congestion window

• 3 modes• TCP-friendly region

• Concave region

• Convex region

• Multiplicative decrease of cwnd factor of 𝛽

20

Page 21: Cubic

TCP Cubic Advantages

• Good RTT fairness• Growth dominated by t, competing flows have same t after

synchronized packet loss

• Real-time dependent• Similar to BIC but linear increases are time dependent

• Does not depend on ACK’s like TCP/ Reno

• Scalability and stability• Cubic increases window to Wmax quickly and keeps it there longer

• High utilization in large BDP• Scalability

• Independent RTT

21

Page 22: Cubic

TCP Cubic Drawbacks

• The speed to react• It can be sluggish to find the new saturation point if the

saturation point has increased far beyond the last one

• Slow Convergence• Flows with higher cwnd are more aggressive initially

• Prolonged unfairness between flows

22

Page 23: Cubic

CUBIC action

23

Page 24: Cubic

Fairness to standard TCP

• Standard TCP performs well

• Small BDP

• Short RTT

24

Page 25: Cubic

Thank you

25

Page 26: Cubic

BIC Algorithm

while (cwnd != Wmax){

If ((Wmin – midpoint) > Smax)

cwnd = cwnd + Smax

else

If ((Wmin – midpoint) < Smin)

cwnd = Wmax

else

cwnd = midpoint

If (no packet loss)

Wmin = cwnd

else

Wmin = β*cwnd

Wmax = cwnd

midpoint = (Wmax + Wmin)/2

}

(Additive Increase)

(Binary Search)

26

while (cwnd >= Wmax){

If (cwnd < Wmax + Smax)

cwnd = cwnd + Smin

else

cwnd = cwnd + Smax

If (packet loss)

Wmin = β*cwnd

Wmax = cwnd

}

Max Probing

Page 27: Cubic

CUBIC window growth function

• Window growth function of CUBIC is a cubic function

• CUBIC use both concave and convex for window size

• Details of CUBIC• Loss event

• Register 𝑊𝑚𝑎𝑥 loss 발생한지점

• Multiplicative decrease of cwnd factor of 𝛽 (decrease constant)

• Start to increase the window using concave profile of the cubic function

• Plateau at 𝑊𝑚𝑎𝑥, concave growth continue until the window size becomes 𝑊𝑚𝑎𝑥

• Cubic function turn into convex profile (max probing)

27

Page 28: Cubic

Slow Start

Congestion Avoidance

28

Page 29: Cubic

Fast Retransmit

29

Page 30: Cubic

TCP Reno (Jacobson 1988)

Fast Recovery

• Motivation: prevent ‘pipe’ from emptying after fast retransmit

• Idea: each dupACKrepresents a packet having left the pipe

• Enter CA after 3 dupACKs(Fast Retransmit/Fast Recovery)• Set ssthresh←cwnd/2• Set cwnd←ssthresh

• Enter SS after timeout• Set ssthresh←cwnd/2• Set cwnd←1

30