Skip to content

Instantly share code, notes, and snippets.

@LennyLip
Created February 23, 2026 17:12
Show Gist options
  • Select an option

  • Save LennyLip/bd264113c5a5e93c4f50eb439e0285d8 to your computer and use it in GitHub Desktop.

Select an option

Save LennyLip/bd264113c5a5e93c4f50eb439e0285d8 to your computer and use it in GitHub Desktop.
OpenWrt 24.10: Low-Latency IPTV Optimization & Multicast Freeze Fix ( /etc/rc.local )
# 1. CPU Performance - remove frequency switching latencies
for x in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do [ -f $x ] && echo "performance" > $x; done
# 2. Network queues and kernel buffers
sysctl -w net.core.netdev_max_backlog=10000
sysctl -w net.core.rmem_max=2097152
sysctl -w net.core.rmem_default=2097152
sysctl -w net.ipv4.udp_rmem_min=16384
# 3. IGMP configuration (v2 is usually more stable for ISPs)
echo 2 > /proc/sys/net/ipv4/conf/all/force_igmp_version
echo 2 > /proc/sys/net/ipv4/conf/wan/force_igmp_version
# 4. Disable GRO/GSO - prevent packet "clumping" (critical for IPTV!)
ethtool -K wan gro off gso off 2>/dev/null
ethtool -K br-lan gro off gso off 2>/dev/null
# 5. Bridge in "dumb hub" mode for multicast (reduces CPU load)
echo 0 > /sys/devices/virtual/net/br-lan/bridge/multicast_snooping
# 6. Priority settings via tc (push IPTV ahead of everything else)
tc qdisc del dev br-lan root 2>/dev/null
tc qdisc add dev br-lan root handle 1: prio bands 3
tc filter add dev br-lan protocol ip parent 1: prio 1 u32 match ip dst 224.0.0.0/4 flowid 1:1
# 7. Set igmpproxy process priority
renice -n -20 -p $(pidof igmpproxy) 2>/dev/null
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment