Temat: Problem z wydajnością modemów LTE-A/5G na USB3
Siemanko,
Wiem, że temat w Naszych polskich realiach może wydawać się śmieszny i na wyrost (chyba każdy wie jak wolny mamy internet mobilny), ale wraz z pojawieniem się modemów LTE-A/5G coraz więcej użytkowników zgłasza drastyczne różnice w osiąganych prędkościach między oprogramowaniem producenta, a OpenWrt. Na forum OpenWrt pojawiło się kilka tematów z tym problemem.
Help with increase speed for 5G modem
https://forum.openwrt.org/t/help-with-i … dem/168785
Zyxel NR7101 low performance
https://forum.openwrt.org/t/zyxel-nr710 … nce/174991
Low USB3 speed
https://forum.openwrt.org/t/low-usb3-speed/174044
We are facing this issue in Arcadyan AW1000 also which uses IPQ807x soc.
We can see through htop, every time we run ookla speedtest, the core0 will spike to 100% meanwhile the other 3 cores are like doing nothing which we believe what causes the bottleneck. The speed can't go beyond 700mbps.
To check what processes are maxing out the core0, we looked at /proc/interrupts and found that xhci-hcd:usb3 is the culprit.
To verify this, we set the irq of xhci-hcd:usb3 to run in the other cores, for exampe, core1 as so:
echo 2 > "/proc/irq/$(grep usb3 /proc/interrupts | awk -F: '{print $1}' | sed 's/^ //')/smp_affinity"Indeed, core1 maxes out to 100% of usage each time we run ookla speedtest. Interestingly, even if we echo f in the command above which means to be run in all cores, xhci-hcd:usb3 still running in only 1 core.
In conclusion, we believe that the usb3 driver (we are not sure if this is the right term) doesn't support multithreading which causes the speed being capped below 700mbps.
As a workaround, we write this script to increase the speed until somebody can fix the usb3 driver at the kernel level.
#!/bin/sh
#script by Abi Darwish
INTERRUPT=$(ls /proc/irq/ | sed '/default/d')
USB3_NUMBER=$(grep usb3 /proc/interrupts | awk -F: '{print $1}' | sed 's/^ //')
for I in ${INTERRUPT}; do
if [[ ${I} = ${USB3_NUMBER} ]]; then
echo 2 > /proc/irq/${I}/smp_affinity 2>/dev/null
else
echo 1 > /proc/irq/${I}/smp_affinity 2>/dev/null
fi
printf "%-10s" ${I}:
cat /proc/irq/${I}/smp_affinity
doneW tym ostatnim temacie pojawił się skrypt, który miałby wpływać na lepsze osiągi, ale nie wiem czy można go uniwersalnie przenieść, czy nie zależy od danej platformy. Cezary co o tym myślisz?