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)
Feb 21 2024, 4:20 PM
Unknown Object (File)
Dec 22 2023, 11:56 PM
Unknown Object (File)
Dec 12 2023, 8:44 AM
Unknown Object (File)
Nov 11 2023, 1:56 AM
Unknown Object (File)
Nov 9 2023, 1:57 AM
Unknown Object (File)
Nov 8 2023, 5:53 AM
Unknown Object (File)
Oct 8 2023, 12:54 AM
Unknown Object (File)
Oct 7 2023, 4:51 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