Skip to contentSkip to conversation

Linux: do not change --txqueuelen OS default if not configured.

PATCH In review Gert Doering 2 participants 3 messages Jun 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Linux: do not change --txqueuelen OS default if not configured.

Remove default setting of "set txqueuelen to 100". This default dates back to the "pre git" times (before 2005) and might have been beneficial back then - nowadays, the Linux default is 500, and thus reducing(!) txqueuelen by-default can cause TX packet drops on the tun interface, and that's bad for throughput.

This is a similar change to commit f0b64e5dc (remove setting of the socket send/receive buffers by default) - similar vintage of the existing code, similar motivation.

Note: buffer length can be checked with "ip link show" (qlen NNN)

See also:
https://ivanvari.com/solving-openvpn-poor-throughput-and-packet-loss/

---
 src/openvpn/options.c | 3 ---
 1 file changed, 3 deletions(-)
src/openvpn/options.c +0 -3
index c21ef56d..a40efd68 100644
@@ -840,9 +840,6 @@ init_options(struct options *o, const bool init_gc)
 #ifdef ENABLE_FEATURE_TUN_PERSIST
     o->persist_mode = 1;
 #endif
-#ifdef TARGET_LINUX
-    o->tuntap_options.txqueuelen = 100;
-#endif
 #ifdef _WIN32
 #if 0
     o->tuntap_options.ip_win32_type = IPW32_SET_ADAPTIVE;
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw

Am 29.06.20 um 20:04 schrieb Gert Doering:

Quoted 6 lines

Remove default setting of "set txqueuelen to 100". This default dates back to the "pre git" times (before 2005) and might have been beneficial back then - nowadays, the Linux default is 500, and thus reducing(!) txqueuelen by-default can cause TX packet drops on the tun interface, and that's bad for throughput.

Quoted 6 lines

This is a similar change to commit f0b64e5dc (remove setting of the socket send/receive buffers by default) - similar vintage of the existing code, similar motivation.

Note: buffer length can be checked with "ip link show" (qlen NNN)

#2 lore raw
In reply to Gert Doering

Patch has been applied to the master branch.

(I claim to have tested this before sending to the list :-) )

commit 3ef858b3d63c61be2f473a8dc5f1f79fa09a85d8

Author: Gert Doering
Date:   Mon Jun 29 20:04:05 2020 +0200
     Linux: do not change --txqueuelen OS default if not configured.

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg20160.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering