OpenWrt- Low Latency Build

Hello there! I'm not very practical with Linux but i can usually search it up.
I'm trying to get as much as low latency processing as possible here is what i did:

  • Set obviously the SQM (i pretty much used the interface, however if there are parameters that can be set to lower latency like buffers or stuff like that please let me know!
  • I've set the writeback and workqueue affinity to cpu 0 (/sys/bus/workqueue/devices/writeback/cpumask,
    /sys/devices/virtual/workqueue/cpumask)
  • I've set affinities for Tx and Rx IRQs since my router by default set them to cpu 0 (and it has 4 cpus in total)
  • This is currently my sysctl (if there are things i can tweak more for low latency let me know!)
    net.core.default_qdisc=cake
    net.ipv4.tcp_congestion_control=bbr
    vm.dirty_ratio=10
    vm.dirty_background_ratio=3
    vm.swappiness=10
    vm.stat_interval=10
    net.ipv4.ip_local_port_range=1024 65000
    net.ipv4.conf.all.log_martians=0
    net.core.netdev_max_backlog=10000
    net.core.busy_read=50 (no idea if works on router)
    net.core.busy_poll=50 (no idea if works on router)
    net.ipv6.conf.all.disable_ipv6=1
    net.ipv6.conf.default.disable_ipv6=1
    net.ipv4.tcp_timestamps=1 (i play mainly games that use UDP so more TCP lattency should not be a problem)
    net.ipv4.tcp_sack=1
  • I would like to try a preemptive kernel but i have no idea where to start since i'm completly new to this world
  • Build an idle tickless (again no idea on how to do that )
  • Disable CPU idle? (if that's possible at all)
    If there are other stuff i missed please share ! thanks very much :slight_smile:

Don't buy a new Linksys AC router, their wireless drivers are dead in the water (well, blame Marvell really). For 200 USD you can find more future-proof stuff.

The 1900, etc are fine as long as you are wired into the router. If you want to use Wifi avoid them! The hardware is decent, but the closed firmware is buggy, abandoned, and will give you extremely high latency under certain conditions. e.g. How to write a meaningful mt76 lag bug? - #16 by dana44 shows hundreds of ms latency with one of that family of devices.

If you want low latency you need something running ath9k, mt76, or ath10k. The best choice today is likely the ath10k powered r7800. You can then look into AQL and further tweeks like the ath10k-ct small buffers firmware.

The mt76 is a big umbrella, but apparently the newer mt7615 stuff is decent while the older mt7603 2.4GHz is buggy on current releases.

Thanks everyone for their tips!
Also i've made another thread to discuss what router i should buy for latency so the topic in this discussion is very clear