From: Stefano Brivio <sbrivio@redhat.com>
To: Yumei Huang <yuhuang@redhat.com>
Cc: passt-dev@passt.top, david@gibson.dropbear.id.au
Subject: Re: [RFC PATCH] tcp: Replace send buffer boost with EPOLLOUT monitoring
Date: Tue, 21 Apr 2026 00:33:16 +0200 (CEST) [thread overview]
Message-ID: <20260421003315.39b5edde@elisabeth> (raw)
In-Reply-To: <20260320103214.99320-1-yuhuang@redhat.com>
On Fri, 20 Mar 2026 18:32:14 +0800
Yumei Huang <yuhuang@redhat.com> wrote:
> Currently we use the SNDBUF boost mechanism to force TCP auto-tuning.
> However, it doesn't always work, and sometimes causes a lot of
> retransmissions. As a result, the throughput suffers.
>
> This patch replaces it with monitoring EPOLLOUT when sendmsg() failure
> (with EAGAIN and EWOULDBLOCK) and partial sends occur.
>
> Tested with iperf3 inside pasta: throughput is now comparable to running
> iperf3 directly on the host without pasta. However, retransmissions can
> still be elevated when RTT >= 50ms. For example, when RTT is between
> 200ms and 500ms, retransmission count varies from 30 to 120 in roughly
> 80% of test runs.
>
> Link: https://bugs.passt.top/show_bug.cgi?id=138
> Suggested-by: Stefano Brivio <sbrivio@redhat.com>
> Signed-off-by: Yumei Huang <yuhuang@redhat.com>
> ---
> tcp.c | 57 +++++++++++++++++----------------------------------------
> 1 file changed, 17 insertions(+), 40 deletions(-)
Thanks a lot! This is definitely a massive improvement, and a much
needed simplification over the original, so I applied this as it is (I
also tested it quite thoroughly).
I'm still looking into how we can replace the 75% to 100% linearly
scaled usage factor from tcp_get_sndbuf() with a more accurate
calculation (assuming it's doable), as a follow-up change, but even
once/if we do that, properly reacting on EPOLLOUT as this patch adds is
something we'll need anyway.
--
Stefano
prev parent reply other threads:[~2026-04-20 22:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 10:32 Yumei Huang
2026-04-20 22:33 ` Stefano Brivio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260421003315.39b5edde@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=yuhuang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).