From a810b3b63b1c08bcbe774f777fe17a01890a2c7e Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Fri, 9 Feb 2024 14:13:16 -0800 Subject: [PATCH] Limit buffer size of iperf3 test to 1K (#1094) This is a workaround for a bug where iperf3 will just block randomly and no longer send data. It may effect the absolute performance measurements compared to the default buffer value although I didnt see that in my testing --- files/www/cgi-bin/iperf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/www/cgi-bin/iperf b/files/www/cgi-bin/iperf index 541a3180..ea5bd3a9 100755 --- a/files/www/cgi-bin/iperf +++ b/files/www/cgi-bin/iperf @@ -75,7 +75,7 @@ else f:close() end if status:match("running") then - print("SUCCESS
Client: " .. node .. "\nServer: " .. server .. "\n" .. io.popen("p=$$;setsid sh -c \"(sleep 20; kill $p)\" > /dev/null 2>&1 & /usr/bin/iperf3 --forceflush -b 0 -Z -c " .. server .. (protocol == "udp" and " -u" or "") .. " 2>&1"):read("*a") .. "
") + print("SUCCESS
Client: " .. node .. "\nServer: " .. server .. "\n" .. io.popen("p=$$;setsid sh -c \"(sleep 20; kill $p)\" > /dev/null 2>&1 & /usr/bin/iperf3 --forceflush -b 0 -Z -c " .. server .. (protocol == "udp" and " -u" or "") .. " -l 1K 2>&1"):read("*a") .. "
") elseif status:match("iperf is disabled") then print("SERVER DISABLED
iperf server is disabled
") else