[openwrt/openwrt] dropbear: increase default receive window size
LEDE Commits
lede-commits at lists.infradead.org
Wed Jan 3 07:37:35 PST 2024
blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/5cc1918a7a0bed42eaf8a26afff6091336c62af5
commit 5cc1918a7a0bed42eaf8a26afff6091336c62af5
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Dec 28 23:16:02 2023 +0100
dropbear: increase default receive window size
Increasing the receive window size improves throughout on higher-latency
links such as WAN connections. The current default of 24KB caps out at
around 500 KB/s.
Increasing the receive buffer to 256KB increases the throughput to at
least 11 MB/s.
Signed-off-by: David Bauer <mail at david-bauer.net>
(cherry picked from commit f95eecfb21ff08662e022accd30e8254028ff63b)
---
package/network/services/dropbear/files/dropbear.init | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index b82e967cbc..a40b5f7bae 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -155,6 +155,12 @@ dropbear_instance()
PIDCOUNT="$(( ${PIDCOUNT} + 1))"
local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+ # Increase default receive window size to increase
+ # throughput on high latency links
+ if [ "${RecvWindowSize}" -eq "0" ]; then
+ RecvWindowSize="262144"
+ fi
+
procd_open_instance
procd_set_param command "$PROG" -F -P "$pid_file"
[ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
More information about the lede-commits
mailing list