macOS 27 beta (26A5378n): kernel clamps TCP receive window to 5,440 bytes & doubles it once per second on USB Ethernet; Wi-Fi on the same Mac unaffected

Filed as FB23904785 with pcaps, a mid-episode sysdiagnose, & a userspace test harness. Posting here because the behavior localizes to the receive-window computation in xnu & I'd value a sanity check from anyone who knows what changed in this area for 27.

On 26A5378n (MacBook Air M2, RTL8156B 2.5GbE via the in-kernel AppleUSBNCM driver), TCP downloads on the wired interface intermittently drop to 6-10 Mbps for stretches of minutes to 40 minutes, then recover on their own. Wi-Fi on the same machine pulls 50-70 Mbps from the same servers in the same seconds. Packet captures show why: during these stretches the kernel advertises a 5,440-byte receive window from the first post-handshake ACK & doubles it on 1.000 s ± 0.01 s wall-clock boundaries, seven doublings in a row, in two separate connections started 6.5 minutes apart, while bytes-per-interval varied 16x. Byte-count triggers can't produce byte-rate-invariant timing; that's a clock.

What I ruled out inside a live occurrence: SO_RCVBUF of 4 MB (getsockopt-verified; identical staircase, so it isn't autotuning), ECN on/off (three toggles, no change), both link_heuristics sysctls, the WAN (during one occurrence ICMP loss was WORSE on Wi-Fi, 20% vs 10%, yet Wi-Fi ran 5x faster), & the wire itself (0.1% retransmissions, ACK timestamp-echo p50 43 ms, zero zero-window advertisements). TCP_CONNECTION_INFO confirms the on-wire numbers: tcpi_rcv_wnd 10,880 at t=2 s against a 4 MB buffer that stays 97% empty, tcpi_srtt 41 ms. The throttled flow itself hit 32.7 Mbps at t=7 s once the staircase reached 347 KB, so path capacity was there the whole time.

The signature resembles a receiver-side LEDBAT governor (RFC 9840 describes exposing a reduced window through the receive window; tcp_rledbat.c in published xnu clamps recwin for sockets flagged receive-background). Two things don't add up though. First, I ported the published tcp_rledbat.c to userspace & drove it with the exact packet timeline from my capture: no parameterization reproduces constant 2x steps on one-second boundaries, because every growth law in that file counts bytes or RTTs, not seconds. Second, kern.ipc.throttle_best_effort reads 1 on a clean boot of this beta with no sysctl.conf, no profiles, & no third-party launch items, while published xnu initializes it to 0. That switch arms the demotion of best-effort sockets to receive-background on interfaces that recently carried realtime-marked traffic.

Questions: did the receive-window governor change in 27, & did the throttle_best_effort default flip intentionally? And is there a supported way to see which sockets carry SOF1_TRAFFIC_MGT_TCP_RECVBG at runtime, to pin down what's marking these flows? Happy to attach anything from the evidence set to the FB or run diagnostics on request; the fault reproduces several times a day here.

Answered by DTS Engineer in 898486022

I’m presuming that this problem reproduces with built-in system components, like Safari or curl, doing the download. If so then:

Filed as FB23904785

is the best path for this report. Our primary focus here on the forums is helping developers with code-level questions, and if you can reproduce it without any of your code involved then that’s clearly Apple’s issue to investigate.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

macOS 27 ships tcp_rbbr, a receiver-side BBR governor with no counterpart in published xnu, and makes it the default receive-background algorithm (net.inet.tcp.recv_bg_algo=2). The constants read straight out of the binary explain the packet trace exactly: initial window = rbbr_rtt_probe_rwnd_mss (4) x MSS = 5,440 bytes, rbbr_startup_gain = 200 (2x per cycle), rbbr_probe_cycle_duration = 1000 ms. So the "5,440 bytes doubling every second" I posted is tcp_rbbr stuck in startup. It gets applied to normal downloads because net_io_policy_throttle_best_effort defaults to 1 here (0 in published source), which demotes best-effort sockets to receive-background on any interface that recently sent realtime-marked traffic. Filed the disassembly and constants with the FB. Question for anyone from the networking team: is recv_bg_algo=2 the intended default for 27, and is tcp_rbbr supposed to govern foreground best-effort downloads at all?

I’m presuming that this problem reproduces with built-in system components, like Safari or curl, doing the download. If so then:

Filed as FB23904785

is the best path for this report. Our primary focus here on the forums is helping developers with code-level questions, and if you can reproduce it without any of your code involved then that’s clearly Apple’s issue to investigate.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

macOS 27 beta (26A5378n): kernel clamps TCP receive window to 5,440 bytes & doubles it once per second on USB Ethernet; Wi-Fi on the same Mac unaffected
 
 
Q