Bufferbloat
apenwarr.ca
apenwarr.ca
The reduced burstiness seems more relevant: suppose your bandwidth hog session is only using 10x more packets than your interactive one overall, but it's using them in bursts; then "when there's been too much data lately" that's probably because you're in a burst of bandwidth-hoggery, so there's much less than a 1/10 chance that the next packet is from your interactive session.
Only, that doesn't quite make sense, because for the bandwidth hog to be hurting your interactive session the latter needs to be trying to send/receive packets while the bandwidth hog is being a bandwidth hog, or at least soon enough after that the buffers are still full of hogswill. In which case, that next packet is surely quite likely to be from your interactive session after all.
Network experts: What am I missing here?
[Edited to add: My best guess is that what I'm missing is that "soon enough after that" may be quite a long time after. In any case, I don't see any way for what apenwarr wrote to be right.]
Generally, I've never run _just_ TBF/HTB + SFQ. I've always run them hierarchically, HTB on the top interface, then several HTBs feeding into that one. Each of the lower HTB queues has a different amount of "flow" allowed to it.
Once you approach it this way, it all works rather nicely. As the multiple queues allow you to spread bandwidth, but also priority into the higher level queue. I can run telnet/ssh sessions during a torrent swarm with no issues.
This approach is "better" because it is analytically proven that for a number of fair TCP stacks competing on an ECN enabled link, the average buffer occupancy can be controlled "around" a certain operating value, which puts a bound on the latency contributed by a particular link.
Also, I wonder if the bufferbloat problem becomes significant only in really small RTT networks. i.e., where the RTT is at least the same order of magnitude compared to queuing delays. On long distance links, my guess is that the propagation delays might dominate latencies.
I disagree with the point that a solution to bufferbloat is purely end-to-end, if that's what the author implied (Apologies if the author didn't mean this). Even if you have perfectly shaped end hosts, if they share a bottleneck link that's deep buffered, they both will suffer the latency problems.
Queuing/buffering in networks is a very nice research area. "How much buffering do we need in a network?" "What if I run a network with as small a buffer as possible?" There are some people who believe that there should just be O(1) buffering in the network. It has been theoretically and experimentally shown that TCP loses only 30% of the throughput if the bottleneck link in the network has a buffer size of just ONE PACKET! So the question here is: is 30% thput loss acceptable? If latency matters, then perhaps yes.
Where does the author say that? And why would it? ECN wasn't designed to screw non-ECN hosts; it's supposed to be incrementally deployable. AFAIK, the only reason it hasn't been deployed is because a small percentage of home gateways are buggy WRT ECN.
(This isn't cheating; you aren't hurting anybody else's performance by turning on ECN for only one machine. Like magic, ECN is just always an improvement, and always fair. Nowadays, chances are that the reasons ECN is off by default don't apply to you anymore; try turning it on and feel the love.)
I didn't want to say your solution won't work. But it's not going to solve all problems - it will work if you / your direct link is the bottleneck.
This is really a more frustrating problem that won't easily be solved. I suggest you all read Jim's original posts on the matter as they are enlightening and explain how TCP windows work and how your ISP configuration can mess it all up.
At the time I could get a huge improvement in interactive response and concurrency on my 512Kbps/128Kbps DSL connection. Without it it was impossible for be to be playing some online game while another computer in the house was downloading something.
The benefits diminish as bandwidth increases, as concurrency gets much better without any measures. So, the black art of traffic shaping becomes much more difficult.