Page MenuHomeFreeBSD

sockets: add SO_RCVBUFFORCE to allow maxsockbuf value bypassing.
AbandonedPublic

Authored by melifaro on Aug 24 2022, 12:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 1:16 PM
Unknown Object (File)
Oct 9 2024, 2:21 AM
Unknown Object (File)
Sep 27 2024, 1:14 PM
Unknown Object (File)
Sep 25 2024, 5:56 PM
Unknown Object (File)
Sep 22 2024, 6:36 AM
Unknown Object (File)
Sep 9 2024, 8:16 PM
Unknown Object (File)
Sep 7 2024, 10:25 AM
Unknown Object (File)
Sep 6 2024, 11:16 AM
Subscribers

Details

Reviewers
None
Group Reviewers
transport
network
Summary

Certain socket-based workloads in the system may require significantly
more socket buffers than the rest of the sockets. To accomodate these
workloads and avoid bumping the system-wide limit, weaking the system
protection, allow an easy override. A special socket option,
SO_RCVBUFFORCE, requiring newly-added PRIV_NETINET_RCVBUFFORCE priviledge, sets the maximum
socket buffer size, ignoring sb_max (kern.ipc.maxsockbuf) value.

This option exists on Linux since 2.6.18.
The primary use case (for us) are netlink sockets, which can receive large dumps from kernel. Current full-view IPv4 dump for a single fib is about ~40 megabytes, but it can notable increase with wide-multi path is set. Large-scale customers set the buffer to ~128M.

Questions:

  • Should there be an absolute maximum on the buffer size (e.g. another sysctl set to, say, 1 gigabytes or an number correlated to the total amount of mbufs?

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47106
Build 43993: arc lint + arc unit