linuxcon 2012 student workshop extending tcp congestion control algorithm … · 2017-11-07 ·...

26
Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm for Multimedia Streaming Midori Kato Keio University 1

Upload: others

Post on 20-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Linuxcon 2012 student workshop

Extending TCP Congestion Control Algorithm for Multimedia Streaming Midori Kato Keio University

1

Page 2: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Motivation

• Smooth congestion control is important for multimedia service (e.g. VoIP and video streaming) • Many apps use TCP to traverse NAT, firewall etc. • TCP congestion control is not appropriate (i.e. sawtooth

throughput behavior)

Hello. "How are you?!

Smooth congestion control"

TCP"

2

HELLO HO…W ARE

… YOU?!?

HELLO!HOW ARE

YOU?!

Iʼm fine.!

u o y e r a w o H H o l l e

e H u o y e r a w o H o l l

Page 3: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

TFWC (TCP-Friendly Window Control) ※[1]

• Smooth congestion control • TCP-Friendly

•  share the equal bandwidth with competing flows in the link • Window based variant of TFRC (DCCP’s congestion control algorithm) •  Implementable in TCP

• I extend TFWC for multimedia services

3

[1] S. Choi and M. Handley, ”Designing TCP-Friendly window-based congestion control for real-time multimedia applications”, PFLDNeT 2009

Page 4: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

How smooth should flows be for multimedia services? • depends on apps • Smoothness and throughput are trade-off

Non-interactive apps Interactive apps

On-demand video

Audio streaming

VoIP

Video conferencing

•  cannot buffer much data. • Smoothness is very important

•  can buffer some data. • Perfect smoothness is not

required, but require high throughput

4

Page 5: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Trade-off between smoothness and throughput

Quickly react to available bandwidth

More bandwidth becomes available

t

throughput

TFWC

TCP

TFWC is smooth, but too conservative throughput

5

Page 6: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

• Problem

• Apps have only two choices: • very flappy and high throughput (TCP), or

• very smooth and low throughput (TFWC)

6

Page 7: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Contribution

• My  work  addresses  this  problem  • Tunable TFWC (TTFWC) allows users and apps to optimize the balance between smoothness and throughput •  We define the tuning parameter to change throughput behavior

7

Page 8: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

TTFWC throughput behavior

More bandwidth becomes available

t

throughput

TFWC

TCP

Interactive apps (small parameter value)

8

TTFWC

Non-interactive apps (large parameter value)

Page 9: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

TFWC window behavior

A  packet  loss  happens.

9

TFWC TCP

Window  size  

t  TFWC window behavior is much smoother than TCP

Point 1: Window reduction after a packet loss is small.

Point 2: TFWC does not increase its window size for a certain period

Point 3: TFWC window increases slower than TCP

Page 10: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Why TFWC gets lower throughput than TCP

10

TFWC TCP

Window  size  

t  Total amount of data between TCP and TFWC is almost same while TFWC keeps the window size

TFWC window behavior results in lower throughput than TCP

Page 11: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

TTFWC window behavior 11

TTFWC TCP

Window  size  

t  

Modification 2: TTFWC increases the window size more quickly than TFWC

Modification 1:TTFWC adds the base window size

Both modifications are based on the tuning parameter

Page 12: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Evaluation: experiment setup •  Implement TTFWC as TCP extension in

Linux kernel 3.0 •  Low-speed network : B = 10 Mbps •  High-speed network : B = 250 Mbps

12

dummynet

senders receivers

TCP RENO flows

**dummynet  :  tune  delay  and  bandwidth  of  the  link

TTFWC flows B  =  bo@leneck  bandwidth  

RTT  =  16  ms  –  320  ms

Page 13: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Throughput and TCP-Friendliness[2/3]

13

TCP throughput

TTFWC throughput

TCP-Friendly line

Results in the low-speed network

4% throughput increasing

Ban

dwid

th u

sage

0.74 0.75 0.78

0.75 0.75 0.84

Page 14: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Throughput and TCP-Friendliness[3/3]

14

TCP throughput

TTFWC throughput

Results in the high-speed network

7% throughput increasing

Ban

dwid

th u

sage

TCP-Friendly line

1.80 1.78 1.93

1.60 1.67 1.77

Page 15: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

CPU Processing Time[1/2] • Measure two main congestion control functions with ftrace

•  Next window calculation and window size recalculation procedures •  Ftrace: enable to trace procedures inside the Linux kernel from

user space

15

Protocol Average time (µsec)

Standard deviation (µsec)

RENO 0.240 0.015 TTFWC (0.0) 1.770 0.271 TTFWC (0.4) 1.951 0.380 TTFWC (0.9) 1.975 0.400 CUBIC 1.771 1.069

* Next window calculation procedure Reasonable overhead

comparing to current system

Page 16: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

CPU Processing Time[2/2]

16

Protocol Average time (µsec)

Standard deviation (µsec)

RENO 0.225 0.00 TTFWC (0.0) 2.200 0.052 TTFWC (0.4) 2.258 0.508 TTFWC (0.9) 2.159 0.439 CUBIC 0.189 0.00

* Window size recalculation procedure

High overhead comparing to others. But this function is not frequently called.

Page 17: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Conclusion • Different types of multimedia services require a variety of throughput behavior

• TTFWC allows users and apps to optimize the balance between smoothness and high throughput

• On-going work • Give me advice to improve performance of sshthresh

re-calculation, ttfwc_ssthresh() • See http://www.ht.sfc.keio.ac.jp/~katoon/ttfwc/

17

Page 18: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Thank you for your attention

18

Page 19: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Metric of smoothness •  I define smoothness as the responsiveness of its throughput when the available bandwidth changes.

• Expectation of throughput oscillation • Small parameter (0.0 - 0.5)

• Square of tuning parameter value • Large parameter (0.5 – 1.0)

• Tuning parameter values

19

Page 20: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Throughput and TCP-Friendliness

•  In the high-speed network, • TTFWC throughput influences RTT values

• Short delay : TTFWC throughput > TCP throughput • Long delay : TTFWC throughput ≒ TCP throughput

20

Due to TCP sawtooth shape window behavior, TCP generates idle bandwidth in the high-speed network in comparison in the low-speed network.

t

Throughput

Idle bandwidth

Page 21: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Smoothness [1/4] • NS-2 simulation result • TTFWC throughput

behavior with eight flows in the low-speed network.

21 TFWC throughput behavior

TTFWC(0.4) throughput behavior

TTFWC(0.9) throughput behavior

TCP throughput behavior

Time (sec)

Thro

ughp

ut(K

bps)

Page 22: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Smoothness [2/4]

22 TFWC throughput behavior

TTFWC(0.4) throughput behavior

TTFWC(0.9) throughput behavior

TCP throughput behavior

TTFWC with small parameter generates some throughput oscillation comparing to TFWC.

Thro

ughp

ut(K

bps)

Time (sec)

Page 23: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Smoothness [3/4]

23 TFWC throughput behavior

TTFWC(0.4) throughput behavior

TTFWC(0.9) throughput behavior

TCP throughput behavior Time (sec)

Thro

ughp

ut(K

bps)

TTFWC with large parameter makes larger throughput oscillation than TTFWC with small parameter, but achieves higher throughput.

Page 24: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Smoothness [4/4]

24 TFWC throughput behavior

TTFWC(0.4) throughput behavior

TTFWC(0.9) throughput behavior

TCP throughput behavior

Time (sec)

TTFWC with large parameter is as responsive as TCP.

Thro

ughp

ut(K

bps)

We can observe that TTFWC achieves tunable

throughput behavior.

Page 25: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Related work 1.  AIMD (Additive Increase and Multiple Decrease) based [1]

•  Reno extension congestion control •  get lower throughput than TTFWC in congested network.

2.  TCP throughput formula-based [2] •  use TCP throughput equation for congestion window

control •  get more packet loss than TTFWC.

3.  Constant Bit Rate (CBR) based and others [3] •  application layer’s congestion control by UDP •  not argue about TCP-Friendliness. •  affect router and middlebox behavior.

25

[1] Y. Yang and S. Lam. General AIMD congestion control. In Proc. IEEE ICNP, November 2000. [2] I. Matta S. Jin, L. Guo and A. Bestavros. A spectrum of TCP-Friendly window-based congestion control algorithms. In Proc. IEEE/ACM Trans. Net, June 2003. [3] J. Feng and L. Xu. TCP-Friendly CBR-Like Rate Control. In Proc. ICNP IEEE, October 2008.

Page 26: Linuxcon 2012 student workshop Extending TCP Congestion Control Algorithm … · 2017-11-07 · TFWC (TCP-Friendly Window Control) ※[1] • Smooth congestion control • TCP-Friendly

Future work 1.  Dynamic adaptation for tuning parameters

•  the data rate generated for encoded video varies second by second

2.  Limitation of TTFWC design •  affects protocol friendliness and flows‘ throughput •  When we run only TTFWC flows in the link, they does

not achieves fair utilization of the link.

26