BufferbloatBufferbloat
Why is the Internet slow?Why is the Internet slow?
Stephen HemmingerStephen Hemminger
stephen@networkplumber.orgstephen@networkplumber.org
Limelight Networks May 2015
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
Network PerformanceNetwork Performance
Throughput
Mbits/sec
Latency
Round Trip Time
Fairness
How bad is it?How bad is it?
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
Head of Line blockingHead of Line blocking
Queuing Theory BasicsQueuing Theory Basics
averagetimeinqueue
utilization
servicerate
1 utilization
Graphic courtesy Sprint, Apricot 2004
From Fred Baker: Bufferbloat!
Netalyzr: DownstreamNetalyzr: Downstream
Netalyzr: UpstreamNetalyzr: Upstream
TCP throughput dynamicsTCP throughput dynamicsIncreasingMeasurableThroughput
Increasing TCP Window
“knee” “cliff”
Bottleneck Capacity
Queue
Depth
meanthroughput
effectivewindow
meanroundtriptime
From Fred Baker: 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
Blame the customerBlame the customer
● Customers callCustomers call
supportsupport
● Applications areApplications are
using moreusing more
bandwidthbandwidth
● Block and chargeBlock and charge
Why Queueing?Why Queueing?
Priority Queue: TheoryPriority Queue: Theory
Priority Queue: RealityPriority Queue: Reality
Hierarchical Token BucketHierarchical Token Bucket
Random Early DetectRandom Early Detect
Explicit Congestion NotificationExplicit Congestion Notification
PACKETS
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
Stocastic Fair QueueStocastic Fair Queue
CodelCodel
PIEPIE
CakeCake
Priority
Fair Queue
CoDel
Back to Reality
Benchmark issuesBenchmark issues
● BadBad
– Bytes/secBytes/sec
– Packes/secPackes/sec
– LatencyLatency
● GoodGood
– Throughput + LatencyThroughput + Latency
– Multiple connectionsMultiple connections
– Real not simulatedReal not simulated
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
DSLReports speedtestDSLReports speedtest
5 sec delay!!
FIFO – the defaultFIFO – the default
Høiland-Jørgensen T., Battling Bufferbloat
Ping 1sec!
Upload
Download
Stochastic Fair QueueStochastic Fair Queue
Høiland-Jørgensen T., Battling Bufferbloat
Controlled Delay - codelControlled Delay - codel
Høiland-Jørgensen T., Battling Bufferbloat
Fair Queue Controlled DelayFair Queue Controlled Delay
Høiland-Jørgensen T., Battling Bufferbloat
Bufferbloat statusBufferbloat status
Bufferbloat: The GoodBufferbloat: The Good
● Industry awarenessIndustry awareness
● Standards progressStandards progress
● Active researchActive research
● Open Source SolutionsOpen Source Solutions
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
How is Bufferbloat Solved on Linux?How is Bufferbloat Solved on Linux?
● Queuing disciplinesQueuing disciplines
– Codel, PIE, ...Codel, PIE, ...
● Linux internalLinux internal
– BQL, FQ, PacingBQL, FQ, Pacing
● Enable good defaultsEnable good defaults
– ecnecn
– fq_codelfq_codel
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
Bufferbloat: the UglyBufferbloat: the Ugly
● WirelessWireless
– AggregationAggregation
– MulticastMulticast
– Bad benchmarksBad benchmarks
– Proprietary firmwareProprietary firmware
Questions?
Thank you
Stephen Hemminger
@networkplumber
stephen@networkplumber.org
Bufferbloat resources
Bufferbloat.net: http://bufferbloat.net
Email 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

Llnw bufferbloat

  • 1.
    BufferbloatBufferbloat Why is theInternet slow?Why is the Internet slow? Stephen HemmingerStephen Hemminger stephen@networkplumber.orgstephen@networkplumber.org Limelight Networks May 2015
  • 3.
    BufferbloatBufferbloat ● What isthe 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
  • 4.
  • 5.
    How bad isit?How bad is it?
  • 6.
    Why is worsenow?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
  • 7.
    Head of LineblockingHead of Line blocking
  • 8.
    Queuing Theory BasicsQueuingTheory Basics averagetimeinqueue utilization servicerate 1 utilization Graphic courtesy Sprint, Apricot 2004 From Fred Baker: Bufferbloat!
  • 9.
  • 10.
  • 12.
    TCP throughput dynamicsTCPthroughput dynamicsIncreasingMeasurableThroughput Increasing TCP Window “knee” “cliff” Bottleneck Capacity Queue Depth meanthroughput effectivewindow meanroundtriptime From Fred Baker: Bufferbloat!
  • 13.
    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
  • 14.
    Blame the customerBlamethe customer ● Customers callCustomers call supportsupport ● Applications areApplications are using moreusing more bandwidthbandwidth ● Block and chargeBlock and charge
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
    Explicit Congestion NotificationExplicitCongestion Notification PACKETS
  • 22.
    Ideal Active QueueManagementIdeal 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
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
    Benchmark issuesBenchmark issues ●BadBad – Bytes/secBytes/sec – Packes/secPackes/sec – LatencyLatency ● GoodGood – Throughput + LatencyThroughput + Latency – Multiple connectionsMultiple connections – Real not simulatedReal not simulated
  • 29.
    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
  • 30.
  • 31.
    FIFO – thedefaultFIFO – the default Høiland-Jørgensen T., Battling Bufferbloat Ping 1sec! Upload Download
  • 32.
    Stochastic Fair QueueStochasticFair Queue Høiland-Jørgensen T., Battling Bufferbloat
  • 33.
    Controlled Delay -codelControlled Delay - codel Høiland-Jørgensen T., Battling Bufferbloat
  • 34.
    Fair Queue ControlledDelayFair Queue Controlled Delay Høiland-Jørgensen T., Battling Bufferbloat
  • 35.
  • 36.
    Bufferbloat: The GoodBufferbloat:The Good ● Industry awarenessIndustry awareness ● Standards progressStandards progress ● Active researchActive research ● Open Source SolutionsOpen Source Solutions
  • 37.
    Once you startlooking,Once you start looking, Bufferbloat can be everywhereBufferbloat can be everywhere ● EdgeEdge – Home routerHome router ● ProviderProvider ● NetworkNetwork ● AcceleratorsAccelerators – CachesCaches – Load balancers,...Load balancers,... ● ServersServers
  • 38.
    How is BufferbloatSolved on Linux?How is Bufferbloat Solved on Linux? ● Queuing disciplinesQueuing disciplines – Codel, PIE, ...Codel, PIE, ... ● Linux internalLinux internal – BQL, FQ, PacingBQL, FQ, Pacing ● Enable good defaultsEnable good defaults – ecnecn – fq_codelfq_codel
  • 39.
    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
  • 40.
    Bufferbloat: the UglyBufferbloat:the Ugly ● WirelessWireless – AggregationAggregation – MulticastMulticast – Bad benchmarksBad benchmarks – Proprietary firmwareProprietary firmware
  • 41.
  • 42.
  • 43.
    Bufferbloat resources Bufferbloat.net: http://bufferbloat.net EmailLists: 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

Editor's Notes

  • #5 Bufferbloat has been known about in the academic community but was not generally measured because many tests only measured one dimension
  • #6 150ms – VOIP 20ms – Desktop lag 100ms – DNS lookup fail ARP, ND – Can't find machine .5sec – User's give up 2 sec–scp copy fails DHCP – Machine falls off network
  • #8 Bufferbloat: The sometimes extreme delays in the Internet caused by excess queuing.
  • #9 As the utilization goes to 100% the delay goes to infinity. Green = T1 Blue = 10Mbit
  • #13 <number> Effective Window: the amount of data TCP sends each RTT Knee: the lowest window that makes throughput approximate capacity Cliff: the largest window that makes throughput approximate capacity Note that throughput is the same at knee and cliff. Increasing the window merely increases RTT, by increasing queue depth
  • #15 Split or use transistions?