Skip to content

iperf_sctp: disable delayed-SACK by default to fix slow single-flow SCTP throughput#2042

Open
nshopik wants to merge 1 commit into
esnet:masterfrom
nshopik:issue-1815-sctp-delayed-sack
Open

iperf_sctp: disable delayed-SACK by default to fix slow single-flow SCTP throughput#2042
nshopik wants to merge 1 commit into
esnet:masterfrom
nshopik:issue-1815-sctp-delayed-sack

Conversation

@nshopik

@nshopik nshopik commented May 24, 2026

Copy link
Copy Markdown
Contributor

Single-flow SCTP throughput collapses to a few Mbits/sec on Linux (~300× slower than TCP on the same loopback) because the receiver's delayed-SACK timer (sack_delay=200 ms, sack_freq=2) waits for a second DATA chunk that the blocked sender will not produce — each iperf3 64 KB block lands as one DATA chunk and stalls 200 ms per I/O cycle. Reproducible on both arm64 and x86_64; not architecture-specific.

iperf3 is a throughput benchmark, so disable delayed-SACK by setting SCTP_DELAYED_SACK with sack_delay=0, sack_freq=1
on all three SCTP socket entry points:

  • iperf_sctp_listen — endpoint default (FreeBSD-style SCTP_FUTURE_ASSOC)
  • iperf_sctp_accept — required on Linux; the listener-side setting does not propagate to accepted associations
  • iperf_sctp_connect — covers --reverse where the client becomes the receiver

Also propagate SCTP_NODELAY to both the server's listen and accepted sockets when -N is given, closing a pre-existing asymmetry with iperf_tcp_listen's handling of TCP_NODELAY.

configure gains an AC_CHECK_TYPES probe for struct sctp_sack_info; new code is guarded by HAVE_STRUCT_SCTP_SACK_INFO and ENOPROTOOPT is treated as non-fatal, so platforms without support are silently unaffected.

master and fix performance

SCTP iperf3 -c localhost --sctp -t 10 │ 2.67 Mbits/sec │ 1.42 Gbits/sec

PLEASE NOTE the following text from the iperf3 license. Submitting a
pull request to the iperf3 repository constitutes "[making]
Enhancements available...publicly":

You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to Lawrence Berkeley National
Laboratory, without imposing a separate written license agreement for such
Enhancements, then you hereby grant the following license: a non-exclusive,
royalty-free perpetual license to install, use, modify, prepare derivative
works, incorporate into other computer software, distribute, and sublicense
such enhancements or derivative works thereof, in binary and source code form.

The complete iperf3 license is available in the LICENSE file in the
top directory of the iperf3 source tree.

@bmah888

bmah888 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants