[Codel] Using fq_codel with a WiFi uplink to the Internet

Phineas Gage phineas919 at gmail.com
Fri Sep 23 06:23:38 EDT 2016


> On Sep 21, 2016, at 12:28 PM, Loganaden Velvindron <loganaden at gmail.com> wrote:
> On Wed, Sep 21, 2016 at 1:59 PM, Phineas Gage <phineas919 at gmail.com <mailto:phineas919 at gmail.com>> wrote:
>> I have two questions about using fq_codel on an edge router when the
>> Internet uplink is through point-to-point WiFi:
>> 
>> Question #1: Is it still effective to run fq_codel on our edge router when I
>> have a WiFi uplink to the Internet, instead of a cabled connection like
>> ADSL? And related to that, is a high quality point-to-point WiFi connection
>> indistinguishable from a cabled connection as far as fq_codel is concerned?
> Yes, it is effective to a small extent. However, I would highly
> recommend that you look into make-wifi-fast, and start testing the
> firmware that Toke uploaded.
> 
> See this: http://blog.cerowrt.org/post/crypto_fq_bug/ <http://blog.cerowrt.org/post/crypto_fq_bug/>

Thanks, this looks great. I’ll see if my WISP is willing to experiment on our point-to-point connection, but it would require driver support for an Atheros AR9300 on a Mikrotik 911-5HnD (firmware 3.30). That’s on our side. There’s another Mikrotik on the other side, but I don’t know its specs yet.

>> Question #2: Assuming the answer to Question #1 is an overall "yes", is it
>> then better to have a guaranteed speed from the ISP, instead of having a
>> variable but potentially higher speed, so that I can control the queue and
>> have fq_codel and HTB prioritization work effectively?
> Guaranteed speed, or at least minimum guaranteed speed for both upload
> and download is a good idea. You don't have to login and tweak each
> time.

Ok, that’s along the lines of what I’m thinking also. I may ask them for flexibility in the contract and try the aggregated connection to save money, then switch to guaranteed depending on the actual conditions on their network.

>> LAN <=> Linux bridge with fq_codel <=> ADSL Modem 0.4 / 5.0 Mbps <=> DSLAM …
> I have a similar configuration: LAN <=> fq_codel (tp-link archer c7 v2
> with pppoe) <=> FTTH modem (bridge mode)
> 
> May I ask why put the ADSL modem in bridge mode, and let the fq_codel
> box handle pope ?

This way, if the bridge ever fails, I can tell someone even if I’m off-site to just “plug in the red cable”, bypassing the bridge. The modem does PPPoE, DHCP and DNS caching. The bridge provides better DNS caching, an NTP server, and HTB+fq_codel, but if it’s replaced with a cable, the network continues working without any configuration changes.

Is there a benefit to running PPPoE on the bridge, other than possibly a bit faster PPPoE encapsulation?

>> But now, we have a chance to improve our throughput problem by switching to
>> a point-to-point WiFi uplink that could hit speeds of 30-40 Mbit symmetric
>> (more on the speeds later). We have to decide on starting a contract with
>> them. At the same time, I’ll be switching the bridge to a Ubiquiti
>> EdgeRouter X, which has fq_codel in its kernel, but should have the same
>> effect. It would look something like:
>> 
> Does EdgeRouter X also implement BQL for its network drivers ?

I hadn’t heard of BQL actually, so I read this: https://www.bufferbloat.net/projects/bloat/wiki/BQL_enabled_drivers/ <https://www.bufferbloat.net/projects/bloat/wiki/BQL_enabled_drivers/>. I don’t think I currently have BQL in my setup, and it’s still effective, maybe because I’m doing rate limiting, but that makes me wonder what I might be missing. Also, I started this thread for an update on BQL support in the EdgeRouter X:

https://community.ubnt.com/t5/EdgeMAX/EdgeRouter-X-BQL-support-for-ethernet/m-p/1684788#U1684788 <https://community.ubnt.com/t5/EdgeMAX/EdgeRouter-X-BQL-support-for-ethernet/m-p/1684788#U1684788>

If it’s as easy to add BQL (4-8 lines of source) as this says: https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/ <https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/>, I could probably do it. I added a small ioctl for CDDA support to a Linux sound card driver some years ago, so have _very_ basic kernel development experience.

Q1: In what cases does BQL help, and is it like do be more useful or higher or lower bandwidths, or does that make a difference?

Q2: Is there a way I can tell in Linux if a given net driver supports BQL without looking at the source?

For the bridge, I’m repurposing an old Mac Mini with 1.25GHz PPC and am using its internal adapter (a Sun GEM 100Mbit adapter using the sungem driver) on the inside of our network. The outside, which has the fq_codel applied to it, is an Apple USB 100Mbit adapter.

Q3: Is it better to run fq_codel on an internal PCI based network adapter, or a USB ethernet adapter, or is there no difference?

In case it matters, the kernel has CONFIG_HZ=250. Also, I try to turn off any offloads in the interfaces file (to be honest, I don’t know if it makes a difference with the USB ethernet driver):

# eth1 interface to cable modem
auto eth1
iface eth1 inet manual
	pre-up /sbin/ethtool --offload eth1 gso off sg off gro off
	post-up /sbin/ifconfig eth1 mtu 1492

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bufferbloat.net/pipermail/codel/attachments/20160923/3239f5e2/attachment.html>


More information about the Codel mailing list