[ale] to speed up your internet connection, slow it down (buffer bloat)

James Sumners james.sumners at gmail.com
Sat Jul 7 00:10:17 EDT 2012


Yep. A home Internet connect without QoS rules applied is totally unusable
in my opinion. The main problem being that when the uplink gets saturated
the whole thing goes to hell.

If you want to get a little more hands on with your QoS setup, you can take
a look at the scripts I wrote for my old P2 based router at [1] and [2].
The rules are CBQ based, and could use some tweaking, but they worked great
when I was using them.

I have since moved on to using the Tomato firmware with a Linksys router. I
prefer Tomato over DD-WRT because it uses the same algorithm for QoS as my
rules, but is much easier to configure.

As an aside, I was using Tomato on a WRT-54GL before moving to an E3000
(dual band 802.11n router). I had to use DD-WRT on the E3000 for a while
because Tomato was unavailable for it. The QoS rules in DD-WRT _sucked_,
and I couldn't figure out how to change them. It's the QoS implementation
that makes or breaks a firmware/router for me.

Finally, if you want to read a very well written article this topic, check
out [3] (referenced in [1] with an old link).

[1] -- http://db.tt/NdAg1nm5
[2] -- http://db.tt/8qZn7ykE
[3] -- http://foswiki.kot-begemot.co.uk/foswiki/bin/view/Net/SMEQoS

On Friday, July 6, 2012, Ron Frazier (ALE) wrote:

> Hi all,
>
> I want to share some information about a phenomenon which can dramatically
> slow down your internet connection, or connections within a LAN some times.
> It's called buffer bloat. I first heard about it over on the NTP questions
> list. I don't remember why that came up, probably related to network
> latencies for NTP servers. Then, later, Steve Gibson discussed it on the
> Security Now podcast. I've provided several links below for those who wish
> to research it.
>
> For those not familiar, buffer refers to a memory queue in a router or
> other networking gear. The problem occurs when you go from a large
> bandwidth pipe to a smaller bandwidth pipe, such as the transition from
> your LAN to the internet WAN. At this point, you might go from 100 Mbps or
> 1 Gbps bandwidth to something like 3 Mbps or 20 Mbps or 50 Mbps or
> whatever. The point is, that it is a dramatic reduction in bandwidth.
>
> So, if you're trying to transmit to the internet at 100 Mbps and it can
> only take 20 Mbps, the link will become saturated. Without buffers or
> queues, about 4/5 of the packets will be dropped. The system will rapidly
> recognize that it cannot go that fast and it will scale down to something
> which the link can support.
>
> However, with large buffers, which many routers have, the problem becomes
> much worse. Let's say the router has a 4 M Byte or approximately 40 M bit
> ram buffer on it's outbound transmission channel. Your computer fills that
> buffer in about 4/10 sec, but, that buffer is going to take 2 sec to empty
> out sending the data to the internet. While I don't understand all the
> technical magic that happens, I do understand that the normal automatic
> throttling systems no longer work. So, your computer might be seeing a 2
> sec delay to get packets out on the internet while they meander through the
> buffer on a first in first out basis.
>
> There is a new intelligent packet dropping algorithm called CODEL that may
> be the solution. The bufferbloat site mentions it, and Steve did a podcast
> talking about it. It shows great promise, however, most routers don't
> implement the algorithm, and many probably never will get upgraded,
> including many home routers.
>
> So, here, as I understand it, is a way you can work around the problem.
>
> My wife works from home sometimes and uses a VPN back to work. Sometimes,
> here system locks up and says the connection is lost. I have as many as 7
> devices sharing the same internet connection, so her system may be
> experiencing congestion. I suspect that many times, the problem is on the
> other end at her office, but just in case, I decided to tweak the router. I
> turned on a QOS (quality of service) setting and told it to prioritize her
> data traffic over mine. I also made some changes to avoid any possible
> buffer bloat problem.
>
> The buffer bloat problem only shows up when the buffer fills. By the way,
> a clogged upstream buffer can shut down downloads too, since, during
> downloads, all tcp packets have to be acknowledged, and those
> acknowledgements must go upstream. A clogged buffer can essentially make
> your Internet connection almost unusable. I think this is what happens at
> many coffee shops. If you can't run CODEL or something like it, one way to
> prevent the problem is to make sure the buffer never fills up. One way to
> do that is to limit your upstream bandwidth to something less than what
> it's possible to do. In my case, the QOS menu of the router allows me to
> limit upstream bandwidth. I used speedtest.net to test the system. I was
> able to get a peak upstream bandwidth of 5.6 Mbps. So, I set the QOS
> controls on the router to limit the upstream bandwidth to 5 Mbps.
> Theoretically, this should mean that the outbound buffer on my router never
> will fill up because it's always emptying out faster than I'm putting data
> in. Theoretically, that should prevent the buffer bloat problem on my LAN.
> This, combined with prioritization of my wife's data, will hopefully solve
> her data problems.
>
> If you've had experience with this problem, please share what you learned
> and what you did about it.
>
> If you need info on the down and dirty operation of TCP/IP, ask some of
> the other wizards on the list.
>
> Hope this is helpful.
>
> Sincerely,
>
> Ron
>
> links below
>
> ----------------------
>
>
> http://en.wikipedia.org/wiki/Buffer_bloat
>
> http://www.bufferbloat.net/
>
> Steve Gibson discusses buffer bloat on the Security Now podcast episode
> 345.
> He introduces a potential solution, CODEL, developed by industry
> researchers, in episode 359.
>
> http://www.grc.com/securitynow.htm - Reference episodes 345 and 359.
>
> http://twit.tv/show/security-now/345
> http://media.grc.com/sn/sn-345.mp3
>
> http://twit.tv/show/security-now/359
> http://media.grc.com/sn/sn-359.mp3
>
>
>
> --
>
> Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.
> Please excuse my potential brevity.
>
> (To whom it may concern. My email address has changed. Replying to former
> messages prior to 03/31/12 with my personal address will go to the wrong
> address. Please send all personal correspondence to the new address.)
>
> (PS - If you email me and don't get a quick response, you might want to
> call on the phone. I get about 300 emails per day from alternate energy
> mailing lists and such. I don't always see new email messages very
> quickly.)
>
> Ron Frazier
> 770-205-9422 (O) Leave a message.
> linuxdude AT techstarship.com
>


-- 
James Sumners
http://james.roomfullofmirrors.com/

"All governments suffer a recurring problem: Power attracts pathological
personalities. It is not that power corrupts but that it is magnetic to the
corruptible. Such people have a tendency to become drunk on violence, a
condition to which they are quickly addicted."

Missionaria Protectiva, Text QIV (decto)
CH:D 59
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120707/e750c651/attachment-0001.html 


More information about the Ale mailing list