llnw bufferbloat

43
Bufferbloat Bufferbloat Why is the Internet slow? Why is the Internet slow? Stephen Hemminger Stephen Hemminger [email protected] [email protected] Limelight Networks May 2015

Upload: stephen-hemminger

Post on 21-Jul-2015

91 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Llnw bufferbloat

BufferbloatBufferbloat

Why is the Internet slow?Why is the Internet slow?

Stephen HemmingerStephen [email protected]@networkplumber.org

Limelight Networks May 2015

Page 2: Llnw bufferbloat
Page 3: Llnw bufferbloat

BufferbloatBufferbloat

● What is the problemWhat is the problem● What causes the problemWhat causes the problem● SolutionsSolutions

– DemonstrationDemonstration● Current statusCurrent status

– The GoodThe Good– The BadThe Bad– The UglyThe Ugly

Page 4: Llnw bufferbloat

Network PerformanceNetwork Performance

ThroughputMbits/sec

LatencyRound Trip Time

Fairness

Page 5: Llnw bufferbloat

How bad is it?How bad is it?

Page 6: Llnw bufferbloat

Why is worse now?Why is worse now?

● No longer in FTP universeNo longer in FTP universe● TCP Initial Window Size = 10TCP Initial Window Size = 10● Advanced TCP algorithmsAdvanced TCP algorithms● Network Offload packet trainsNetwork Offload packet trains● Bad benchmarksBad benchmarks● Router/switch memory is cheapRouter/switch memory is cheap● Everyone fears dropping packetsEveryone fears dropping packets

Page 7: Llnw bufferbloat

Head of Line blockingHead of Line blocking

Page 8: Llnw bufferbloat

Queuing Theory BasicsQueuing Theory Basics

averagetimeinqueueutilization

servicerate1 utilization

Graphic courtesy Sprint, Apricot 2004

From Fred Baker: Bufferbloat!

Page 9: Llnw bufferbloat

Netalyzr: DownstreamNetalyzr: Downstream

Page 10: Llnw bufferbloat

Netalyzr: UpstreamNetalyzr: Upstream

Page 11: Llnw bufferbloat
Page 12: Llnw bufferbloat

TCP throughput dynamicsTCP throughput dynamicsIn

crea

sing

Mea

sura

ble

Thr

ough

put

Increasing TCP Window

“knee” “cliff”

Bottleneck Capacity

QueueDepth

meanthroughput effectivewindowmeanroundtriptime

From Fred Baker: Bufferbloat!

Page 13: Llnw bufferbloat

Blame LinuxBlame Linux

● Windows XPWindows XP– Maximum window 64kMaximum window 64k

● Windows 7Windows 7– Bandwidth limit to 80 mbitsBandwidth limit to 80 mbits

● AndroidAndroid– Receive window limitedReceive window limited

Page 14: Llnw bufferbloat

Blame the customerBlame the customer

● Customers call Customers call supportsupport

● Applications are Applications are using more using more bandwidthbandwidth

● Block and chargeBlock and charge

Page 15: Llnw bufferbloat
Page 16: Llnw bufferbloat

Why Queueing?Why Queueing?

Page 17: Llnw bufferbloat

Priority Queue: TheoryPriority Queue: Theory

Page 18: Llnw bufferbloat

Priority Queue: RealityPriority Queue: Reality

Page 19: Llnw bufferbloat

Hierarchical Token BucketHierarchical Token Bucket

Page 20: Llnw bufferbloat

Random Early DetectRandom Early Detect

Page 21: Llnw bufferbloat

Explicit Congestion NotificationExplicit Congestion Notification

PACKETS

Page 22: Llnw bufferbloat

Ideal Active Queue ManagementIdeal Active Queue Management

● FairFair– All flows get some bandwidthAll flows get some bandwidth

● SimpleSimple– No tuningNo tuning

● Easy to deployEasy to deploy– No special hardware, no protocol changesNo special hardware, no protocol changes

● ReasonableReasonable– Won't create multi-second latencyWon't create multi-second latency

Page 23: Llnw bufferbloat

Stocastic Fair QueueStocastic Fair Queue

Page 24: Llnw bufferbloat

CodelCodel

Page 25: Llnw bufferbloat

PIEPIE

Page 26: Llnw bufferbloat

CakeCake

Priority

Fair Queue

CoDel

Page 27: Llnw bufferbloat

Back to Reality

Page 28: Llnw bufferbloat

Benchmark issuesBenchmark issues

● BadBad– Bytes/secBytes/sec– Packes/secPackes/sec– LatencyLatency

● GoodGood– Throughput + LatencyThroughput + Latency– Multiple connectionsMultiple connections– Real not simulatedReal not simulated

Page 29: Llnw bufferbloat

Better toolsBetter tools

● DSLreport'sDSLreport's– http://www.dslreports.com/speedtest/http://www.dslreports.com/speedtest/

● ICSI netalyzrICSI netalyzr– http://netalyzr.icsi.berkeley.edu/http://netalyzr.icsi.berkeley.edu/

● Real time Response Under LoadReal time Response Under Load– https://github.com/tohojo/netperf-wrapperhttps://github.com/tohojo/netperf-wrapper– Flent: The Flexible Network TesterFlent: The Flexible Network Tester

Page 30: Llnw bufferbloat

DSLReports speedtestDSLReports speedtest

5 sec delay!!

Page 31: Llnw bufferbloat

FIFO – the defaultFIFO – the default

Høiland-Jørgensen T., Battling Bufferbloat

Ping 1sec!

Upload

Download

Page 32: Llnw bufferbloat

Stochastic Fair QueueStochastic Fair Queue

Høiland-Jørgensen T., Battling Bufferbloat

Page 33: Llnw bufferbloat

Controlled Delay - codelControlled Delay - codel

Høiland-Jørgensen T., Battling Bufferbloat

Page 34: Llnw bufferbloat

Fair Queue Controlled DelayFair Queue Controlled Delay

Høiland-Jørgensen T., Battling Bufferbloat

Page 35: Llnw bufferbloat

Bufferbloat statusBufferbloat status

Page 36: Llnw bufferbloat

Bufferbloat: The GoodBufferbloat: The Good

● Industry awarenessIndustry awareness● Standards progressStandards progress● Active researchActive research● Open Source SolutionsOpen Source Solutions

Page 37: Llnw bufferbloat

Once you start looking,Once you start looking,Bufferbloat can be everywhereBufferbloat can be everywhere● EdgeEdge

– Home routerHome router● ProviderProvider● NetworkNetwork● AcceleratorsAccelerators

– CachesCaches– Load balancers,...Load balancers,...

● ServersServers

Page 38: Llnw bufferbloat

How is Bufferbloat Solved on Linux?How is Bufferbloat Solved on Linux?

● Queuing disciplinesQueuing disciplines– Codel, PIE, ...Codel, PIE, ...

● Linux internal Linux internal – BQL, FQ, PacingBQL, FQ, Pacing

● Enable good defaultsEnable good defaults– ecnecn– fq_codel fq_codel

Page 39: Llnw bufferbloat

Bufferbloat: the BadBufferbloat: the Bad

● Legacy equipmentLegacy equipment– OEM focus on cost not AQMOEM focus on cost not AQM

● Congestion on backboneCongestion on backbone– It's not a bug it's a feature?It's not a bug it's a feature?– Problem is political not technicalProblem is political not technical

Page 40: Llnw bufferbloat

Bufferbloat: the UglyBufferbloat: the Ugly

● WirelessWireless– AggregationAggregation– MulticastMulticast– Bad benchmarksBad benchmarks– Proprietary firmwareProprietary firmware

Page 41: Llnw bufferbloat

Questions?

Page 42: Llnw bufferbloat

Thank youStephen Hemminger@networkplumber

[email protected]

Page 43: Llnw bufferbloat

Bufferbloat resources

Bufferbloat.net: http://bufferbloat.netEmail Lists: http://lists.bufferbloat.net

CeroWrt: http://www.bufferbloat.net/projects/cerowrt Other talks: http://mirrors.bufferbloat.net/Talks

Jim Gettys Blog – http://gettys.wordpress.com A big thanks to the bloat mailing list, Jim, Kathie, Van, Dave, Eric, ISC, and all the other the CeroWrt/OpenWrt contributors