25
Cocoa: Congestion Control Aware Queuing Maximilian Bachl, Tanja Zseby, Joachim Fabini Technische Universit¨ at Wien, Vienna, Austria

Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Cocoa: Congestion Control Aware Queuing

Maximilian Bachl, Tanja Zseby, Joachim FabiniTechnische Universitat Wien, Vienna, Austria

Page 2: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Introduction

“Bufferbloat”

If queues in routers/switches too small: UnderutilizationSolution: Make queues very large for maximumthroughput!New problem: Packets wait a long time (several seconds)in the queue: Bufferbloat

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 1

Page 3: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Introduction

CoDel Active Queue Management against Bufferbloat

Moving time window of 100 msQueuing Delay must be < 5 ms once in each windowOtherwise: Drop packet(s)

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 2

Page 4: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Introduction

Fair Queuing

Separate each flow in separate queueNo flow can “steal” bandwidthPopular implementation for Linux: fq

Static buffer size:Buffer often too large or too small

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 3

Page 5: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Introduction

Fair Queuing

Separate each flow in separate queueNo flow can “steal” bandwidthPopular implementation for Linux: fq

Static buffer size:Buffer often too large or too small

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 3

Page 6: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Introduction

fq codel Combining fair queuing with CoDel

State-of-the-artSeparate queuesEach queue managed by CoDelKeeps each flow’s queue < 5 msLinux implementation: fq codel

Inadequate interaction with Congestion Control:Cubic doesn’t achieve full throughput or keeps standing queue

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 4

Page 7: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Introduction

fq codel Combining fair queuing with CoDel

State-of-the-artSeparate queuesEach queue managed by CoDelKeeps each flow’s queue < 5 msLinux implementation: fq codel

Inadequate interaction with Congestion Control:Cubic doesn’t achieve full throughput or keeps standing queue

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 4

Page 8: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Buffer too large

BDP+bu�er sizepacket loss

standingqueue

optimal minimumwindow (BDP)

time

window (packets in �ight)

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 5

Page 9: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Buffer too small

BDP+bu�er sizepacket loss

under-utilized

link

optimal minimumwindow (BDP)

time

window (packets in �ight)

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 6

Page 10: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Measuring a flow’s congestion control

Get period between reductions of the congestion windowIf there’s a standing queue:

Reduce bufferIf the link was idle:

Increase buffer

→ Problem: How to get the interval between reductions of thecongestion window?

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 7

Page 11: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Measuring a flow’s congestion control

Get period between reductions of the congestion windowIf there’s a standing queue:

Reduce bufferIf the link was idle:

Increase buffer→ Problem: How to get the interval between reductions of thecongestion window?

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 7

Page 12: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Interval mechanism – Concept

1. Wait for previous longest interval between two packet lossestimes 0.5 and continue waiting until the next packet loss

2. Take longest interval between two packet losses sinceprevious longest interval ended

3. Adjust buffer accordingly4. Repeat

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 8

Page 13: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Interval mechanism – Illustration

packet loss

intervals

longest interval longest interval longest interval

guard interval guard interval guard interval

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 9

Page 14: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Parameters

Multiplier (default 1.25)Needed because of BBR, for Cubic and Reno 0.5 issufficient

Maximum buffer increase (default 2)Otherwise huge increase if link speed suddenly dramaticallyincreases

Maximum guard interval (default 1 s)Otherwise giant guard intervals possible and slowadaptation

→ Worked for all tested scenarios

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 10

Page 15: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Concept

Parameters

Multiplier (default 1.25)Needed because of BBR, for Cubic and Reno 0.5 issufficient

Maximum buffer increase (default 2)Otherwise huge increase if link speed suddenly dramaticallyincreases

Maximum guard interval (default 1 s)Otherwise giant guard intervals possible and slowadaptation

→ Worked for all tested scenarios

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 10

Page 16: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

Setup

Implemented on LinuxExtension of the fq kernel moduleVirtual network with py-virtnet

All other queuing disciplines for comparison with defaultparameters

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 11

Page 17: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

Cubic, fq with 20 Mbit/s, 10 ms

0 10 20 30 40 50 60Time [s]

10

15

20

Thro

ughp

ut [M

bit/

s]

0 10 20 30 40 50 60Time [s]

50

100

RTT

[ms]

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 12

Page 18: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

Cubic, cocoa with 20 Mbit/s, 10 ms

0 10 20 30 40 50 60Time [s]

10

15

20

Thro

ughp

ut [M

bit/

s]

0 10 20 30 40 50 60Time [s]

20

40

60

RTT

[ms]

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 13

Page 19: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

Cubic, cocoa with 20 Mbit/s, 10 ms

0 10 20 30 40 50 60Time [s]

20

30

40

Thro

ughp

ut [M

bit/

s]

0 10 20 30 40 50 60Time [s]

20

40

60

RTT

[ms]

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 14

Page 20: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

Cubic, fq codel with 100 Mbit/s, 100 ms

0 50 100 150 200 250Time [s]

25

50

75

100

Thro

ughp

ut [M

bit/

s]

0 50 100 150 200 250Time [s]

100

120

140

RTT

[ms]

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 15

Page 21: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

Cubic, cocoa with 100 Mbit/s, 100 ms

0 50 100 150 200 250Time [s]

25

50

75

100

Thro

ughp

ut [M

bit/

s]

0 50 100 150 200 250Time [s]

100

150

200

RTT

[ms]

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 16

Page 22: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Evaluation

BBR, cocoa with 50 Mbit/s, 10 ms

0 10 20 30 40 50 60Time [s]

20

30

40

Thro

ughp

ut [M

bit/

s]

0 10 20 30 40 50 60Time [s]

25

50

75

RTT

[ms]

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 17

Page 23: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Discussion

Conclusions

Throughput increase of ∼ 10% for Cubic and ∼ 25% forReno compared to fq codel and fq for high BDPconnectionsSame throughput and lower delay for low BDP connectionscocoa finds sweet spot of maximal throughput/minimalqueueEnvisioned deployment close to the Internet’s edge

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 18

Page 24: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Discussion

Outlook

Use previous flows’ optimal queue for initialization of newflows’ buffersMore thorough testing with real-world flowsReinforcement learning to fingerprint flows and adaptqueue dynamically using previously learned experience

December 3, 2019 Cocoa: Congestion Control Aware Queuing by Maximilian Bachl 19

Page 25: Cocoa: Congestion Control Aware Queuingbuffer-workshop.stanford.edu/slides/cocoa.pdf · Cubic, cocoa with 20Mbit/s, 10ms 0 10 20 30 40 50 60 Time [s] 10 15 20 Throughput [Mbit/s]

Cocoa: Congestion Control Aware Queuing

Maximilian Bachl, [email protected] Zseby, [email protected] Fabini, [email protected] Universitat Wien, Vienna, Austria