macOS Unix socket send buffer defaults to 8 KiB; raise it per connection
FactVerified 15 Oct 2026Holds anywhere
Fact. A statement and the evidence for it.
Statement#
On macOS the default send buffer of a Unix domain socket is 8 KiB. Any output burst larger than that is split into many small writes. In a tokio daemon that fans out PTY output, set SO_SNDBUF to 256 KiB or more on each accepted connection, and write shared Bytes with vectored writes of fewer than 512 slices per call.
Evidence#
Found by a research report for the rmaestro daemon change (fan out, attach and flow control). The report was not measured in this session. Verify with a burst benchmark on macOS before relying on the exact numbers.