Author
Message
Per Yngve Berg DD-WRT Guru Joined: 13 Aug 2013 Posts: 6870 Location: Romerike, Norway
Posted: Thu Jun 08, 2023 15:16 Post subject:
Increase the Interface Buffers. Some dd-wrt builds are as lowercase as 1000
Back to top
Sponsor
jtbr DD-WRT User Joined: 09 Mar 2017 Posts: 100
Posted: Fri Jun 09, 2023 12:00 Post subject:
Per Yngve Berg wrote: Increase the Interface Buffers. Some dd-wrt builds are as lowercase as 1000
Hmm. Can't seem to fund a setting for interface buffers. How to do that?
Back to top
Per Yngve Berg DD-WRT Guru Joined: 13 Aug 2013 Posts: 6870 Location: Romerike, Norway
Posted: Fri Jun 09, 2023 13:10 Post subject:
On each interface in the Networking tab
Back to top
jtbr DD-WRT User Joined: 09 Mar 2017 Posts: 100
Posted: Fri Jun 09, 2023 14:39 Post subject:
Per Yngve Berg wrote: On each interface in the Networking tab
Thanks, you mean the TX Queue Length setting? For most network interfaces it is 1000 now (2000 for a couple bridges). What setting do you recommend?
Back to top
Per Yngve Berg DD-WRT Guru Joined: 13 Aug 2013 Posts: 6870 Location: Romerike, Norway
Posted: Fri Jun 09, 2023 18:43 Post subject:
Check with ifconfig, if there is any dropped packages.
Back to top
jtbr DD-WRT User Joined: 09 Mar 2017 Posts: 100
Posted: Mon Jun 12, 2023 14:47 Post subject:
Per Yngve Berg wrote: Check with ifconfig, if there is any dropped packages.
Very interesting. Thank you very much. So I find that the VPN tunnels have txqueuelen of 500(!) and lots of dropped packets for TX. I added "txqueuelen 4000" in the dd-wrt side openvpn configs, and so far that seems to have fixed the issue.
There are also significant but lower numbers of dropped RX packets on the bridges and eth0. I guess txqueuelen won't help with this but I wanted to increase them anyway to be sure. However even when I change this to 2000 in the GUI, the change is not reflected in what ifconfig shows. .. (even after a reboot). Any ideas what might help reduce the dropped packets on the RX side?
I did notice that /proc/sys/net/core/rmem_max and wmem_max are the same as the _default: 262144, which seems quite low these days (especially the max). Should/could that perhaps be changed?
Many thanks. My ifconfig follows:
Code: br0 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
inet addr:192.168.9.1 Bcast:192.168.9.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17746818 errors:0 dropped:83481 overruns:0 frame:0
TX packets:30192772 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7130695899 (6.6 GiB) TX bytes:30428393331 (28.3 GiB)
br0.11 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
br1 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29906807 errors:0 dropped:64582 overruns:0 frame:0
TX packets:66492828 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4881822914 (4.5 GiB) TX bytes:75313555278 (70.1 GiB)
br1.12 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
br2 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
inet addr:192.168.250.1 Bcast:192.168.250.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45877201 errors:0 dropped:89454 overruns:0 frame:0
TX packets:23349463 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44726368240 (41.6 GiB) TX bytes:1920485601 (1.7 GiB)
br2.13 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
br3 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
inet addr:192.168.11.1 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:46129880 errors:0 dropped:6741 overruns:0 frame:0
TX packets:60691384 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:83348463759 (77.6 GiB) TX bytes:31844013991 (29.6 GiB)
br3.14 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 38:94:ED:15:78:AC
inet addr:192.168.178.22 Bcast:192.168.178.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107858513 errors:0 dropped:985051 overruns:0 frame:0
TX packets:91044787 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2768966639 (2.5 GiB) TX bytes:1997987882 (1.8 GiB)
Interrupt:100
eth1 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:155039146 errors:0 dropped:187 overruns:0 frame:0
TX packets:156071125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:170126409 (162.2 MiB) TX bytes:2381757574 (2.2 GiB)
Interrupt:101
imq0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:30707615 errors:0 dropped:0 overruns:0 frame:0
TX packets:30706590 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
RX bytes:2829804233 (2.6 GiB) TX bytes:2812487066 (2.6 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:65536 Metric:1
RX packets:184665 errors:0 dropped:8 overruns:0 frame:0
TX packets:184665 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:17222594 (16.4 MiB) TX bytes:17222594 (16.4 MiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:77.109.102.128 P-t-P:213.219.132.31 Mask:255.255.255.255
UP POINTOPOINT RUNNING MULTICAST MTU:1492 Metric:1
RX packets:106762912 errors:0 dropped:34 overruns:0 frame:0
TX packets:90950593 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:81937402536 (76.3 GiB) TX bytes:81597097914 (75.9 GiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.7.0.1 P-t-P:10.7.0.1 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.4 P-t-P:10.8.0.4 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1481 Metric:1
RX packets:15665238 errors:0 dropped:0 overruns:0 frame:0
TX packets:9432170 errors:0 dropped:26740 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:18102812538 (16.8 GiB) TX bytes:1353162027 (1.2 GiB)
tun2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.4.110.109 P-t-P:10.4.110.109 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:56522256 errors:0 dropped:5 overruns:0 frame:0
TX packets:58646788 errors:0 dropped:990797 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:29119838649 (27.1 GiB) TX bytes:67803973383 (63.1 GiB)
vlan1 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:307528 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:57064200 (54.4 MiB)
vlan11 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9929124 errors:0 dropped:11 overruns:0 frame:0
TX packets:18891742 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4501413289 (4.1 GiB) TX bytes:20265084085 (18.8 GiB)
vlan12 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27522729 errors:0 dropped:21 overruns:0 frame:0
TX packets:60907873 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4629098402 (4.3 GiB) TX bytes:65730225218 (61.2 GiB)
vlan13 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43059359 errors:0 dropped:0 overruns:0 frame:0
TX packets:54097533 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:83042569286 (77.3 GiB) TX bytes:25635188239 (23.8 GiB)
vlan14 Link encap:Ethernet HWaddr 38:94:ED:15:78:AB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42208129 errors:0 dropped:7 overruns:0 frame:0
TX packets:21559104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41104680743 (38.2 GiB) TX bytes:1683266537 (1.5 GiB)
wlan0 Link encap:Ethernet HWaddr 38:94:ED:15:78:AD
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7839860 errors:0 dropped:23 overruns:0 frame:0
TX packets:11541928 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2067451946 (1.9 GiB) TX bytes:8085275843 (7.5 GiB)
wlan0.1 Link encap:Ethernet HWaddr 3A:94:ED:15:78:AD
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:436789 errors:0 dropped:0 overruns:0 frame:0
TX packets:1864636 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:84342932 (80.4 MiB) TX bytes:1185729392 (1.1 GiB)
wlan0.2 Link encap:Ethernet HWaddr 3E:94:ED:15:78:AD
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2164750 errors:0 dropped:2 overruns:0 frame:0
TX packets:3633342 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2996987491 (2.7 GiB) TX bytes:496954493 (473.9 MiB)
wlan0.3 Link encap:Ethernet HWaddr 32:94:ED:15:78:AD
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1458047 errors:0 dropped:6 overruns:0 frame:0
TX packets:6258199 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:165774802 (158.0 MiB) TX bytes:6150305458 (5.7 GiB)
wlan1 Link encap:Ethernet HWaddr 38:94:ED:15:78:AD
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3253854 errors:0 dropped:48 overruns:0 frame:0
TX packets:4454811 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:945854417 (902.0 MiB) TX bytes:2844136879 (2.6 GiB)
wlan1.1 Link encap:Ethernet HWaddr 3A:94:ED:15:78:AE
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1512093 errors:0 dropped:7 overruns:0 frame:0
TX packets:2363159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:147757812 (140.9 MiB) TX bytes:2090479786 (1.9 GiB)
wlan1.2 Link encap:Ethernet HWaddr 3E:94:ED:15:78:AE
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1039131 errors:0 dropped:10 overruns:0 frame:0
TX packets:977662 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:569920772 (543.5 MiB) TX bytes:273303897 (260.6 MiB)
wlan1.3 Link encap:Ethernet HWaddr 32:94:ED:15:78:AE
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:835689 errors:0 dropped:2 overruns:0 frame:0
TX packets:1717773 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:98889064 (94.3 MiB) TX bytes:921725481 (879.0 MiB)
Back to top
jtbr DD-WRT User Joined: 09 Mar 2017 Posts: 100
Posted: Tue Jun 13, 2023 14:16 Post subject:
Anybody know how to set txqueuelen if the networking page setting is not working? (I want to change it to >=2000 on the bridges and eth0, and that shows on the GUI, but doesn't take effect - r52569).
Also, does anyone know how to fix dropped packets on the RX side?
Many thanks
Back to top
hw112 DD-WRT Novice Joined: 27 May 2023 Posts: 16
Posted: Tue Jun 13, 2023 14:33 Post subject:
ip link set qlen 2000 dev eth0 up
OR
ifconfig eth0 txqueuelen 2000 up
As I think it only applies to TCP, setting a higher qlen on OpenVPN (TUN) interface is only useful if you use TCP instead of the preferred UDP, but even then 500 should be plenty for OpenVPN.
Problems with dropped packet might possible be more related to MTU being too high (that is why DDWRT already lowered MTU to 1400).
The VPN troubleshooting guide has a paragraph about this.
Back to top
jtbr DD-WRT User Joined: 09 Mar 2017 Posts: 100
Posted: Mon Jun 19, 2023 14:48 Post subject:
hw112 wrote: As I think it only applies to TCP, setting a higher qlen on OpenVPN (TUN) interface is only useful if you use TCP instead of the preferred UDP, but even then 500 should be plenty for OpenVPN.
Thanks for these commands. I dug into it a bit, and it looks like the txqueuelen is the buffer size in ethernet frames for the kernel's network scheduler (where things wait to be put on the network interface card). So it affects all higher-layer protocols. In any case, increasing this has basically solved my TX dropped packets for the OpenVPN tunnels (I'm pretty sure I have the MTU sorted out for OpenVPN).
Back to top