summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2025-02-27 19:54:20 -0500
committerArmin Kuster <akuster808@gmail.com>2025-03-03 08:07:54 -0500
commitc204166dac6e9ee3c008b0983a66491de077793b (patch)
tree0f9c74b649d8a74109f6c433ad69edcf73117451
parent48980f26fe804e50c41d76decfc06492eb0f7b1c (diff)
downloadmeta-openembedded-c204166dac6e9ee3c008b0983a66491de077793b.tar.gz
iperf3: throughput fix
This is a backport of a fix to iperf3. The author saw a 40% improvement in their network throughput, we've seen around a 55% improvement in our tests. Link: https://github.com/esnet/iperf/pull/1708/commits/ac6b9f7fd335ddebc5212eed40083ef4cd3cb86d Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-benchmark/iperf3/iperf3/do-not-listen-to-old-udp-prot-listener.patch30
-rw-r--r--meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3/do-not-listen-to-old-udp-prot-listener.patch b/meta-oe/recipes-benchmark/iperf3/iperf3/do-not-listen-to-old-udp-prot-listener.patch
new file mode 100644
index 0000000000..da1664ddcf
--- /dev/null
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3/do-not-listen-to-old-udp-prot-listener.patch
@@ -0,0 +1,30 @@
1From ac6b9f7fd335ddebc5212eed40083ef4cd3cb86d Mon Sep 17 00:00:00 2001
2From: David Bar-On <david.cdb004@gmail.com>
3Date: Sun, 2 Jun 2024 11:52:03 +0300
4Subject: [PATCH] Do not listen to old pro_listener
5
6Clear old UDP prot_listener from read_set, as currently the server's select()
7always return when data (that is relevant only to the worker thread) is
8received. This makes the main thread consume a lot of unnecessary CPU, which
9reduces the total throughput - especially when only one stream is used.
10
11In my single machine environment, with the this fix the throughput is
12increased by about 40% for one stream test.
13---
14Upstream-Status: Backport [3.18]
15
16 src/iperf_udp.c | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/src/iperf_udp.c b/src/iperf_udp.c
20index a603236df..40f2b1ca7 100644
21--- a/src/iperf_udp.c
22+++ b/src/iperf_udp.c
23@@ -446,6 +446,7 @@ iperf_udp_accept(struct iperf_test *test)
24 /*
25 * Create a new "listening" socket to replace the one we were using before.
26 */
27+ FD_CLR(test->prot_listener, &test->read_set); // No control messages from old listener
28 test->prot_listener = netannounce(test->settings->domain, Pudp, test->bind_address, test->bind_dev, test->server_port);
29 if (test->prot_listener < 0) {
30 i_errno = IESTREAMLISTEN;
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb b/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb
index 5cec4c6874..a2cb903562 100644
--- a/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3_3.16.bb
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=dc6301c8256ceb8f71c9e3c2ae9096b9"
15SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \ 15SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \
16 file://0002-Remove-pg-from-profile_CFLAGS.patch \ 16 file://0002-Remove-pg-from-profile_CFLAGS.patch \
17 file://0001-configure.ac-check-for-CPP-prog.patch \ 17 file://0001-configure.ac-check-for-CPP-prog.patch \
18 file://do-not-listen-to-old-udp-prot-listener.patch \
18 " 19 "
19 20
20SRCREV = "f9481e1cd35159929458513692e4a8f9fdd1bd6f" 21SRCREV = "f9481e1cd35159929458513692e4a8f9fdd1bd6f"