Bug 251052

Summary: [sctp] Throughput becomes extremely low under load
Product: Base System Reporter: Paul Reynolds <paul.reynolds>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: In Progress ---    
Severity: Affects Many People CC: markj, tuexen
Priority: ---    
Version: 11.4-STABLE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Test program to simulate high SCTP load none

Description Paul Reynolds 2020-11-11 16:26:37 UTC
Given a service using SCTP, when it receives a spike in traffic, it becomes extremely slow to respond. A given block of traffic that takes seconds if spaced out in time, instead takes upwards of 15-20 minutes if received in a burst. I suspect some sub-optimal behavior when receive buffers are full, but that is just a wild guess. This behavior is reproducible on both 11.4-RELEASE and 12.2-RELEASE. I will attach a test program.
Comment 1 Paul Reynolds 2020-11-11 16:47:08 UTC
Created attachment 219565 [details]
Test program to simulate high SCTP load

The test program forks a few processes to generate traffic directed at a single process to simulate a high load. It should run to completion in a short matter of time, but in both 11.4-RELEASE and 12.2-RELEASE it runs for a bit, then slows way down. It does eventually complete, but only after a significant amount of time has passed.
Comment 2 Michael Tuexen freebsd_committer 2020-11-14 08:49:06 UTC
I can reproduce the issue also in head on a VM. The receiver announces a window of 1, which slows down the connection. I haven't seen this on 1-to-1 style sockets, so it might be related using 1-to-many style sockets. Will do further testing.