Hi Scott!
As to my understanding the SO_RCVBUF/SO_SNDBUF options correspond to
the net.core.rmem_max/net.core.wmem_max parameters though socket
options are applied individually while sysctl are applied to the whole
system and to all socket types. These are maximum values. Regarding
the TCP sockets there are two more params
net.ipv4.tcp_rmem/net.ipv4.tcp_wmem - these control TCP buffer
behavior more precisely but the maximum here is limited by values in
SO_RCVBUF/SO_SNDBUF or net.core.rmem_max/net.core.wmem_max.
So, it is OK that the size of the buffer changes over time. These are
the maximum values that are used when there is a real need for such
big buffers, for example when you need a big throughput while having a
rather large RTT. They are hints for the kernel and no one can
explicitly control exact sizes from the userspace - no matter Java, C
or rust client.
сб, 18 окт. 2025 г. в 16:46, Scott Fauerbach <
sc...@synadia.com>:
>
> As it turns out, this "support" was recently added to the Java client. But notice I put support it in quotes. For Java at least, the api docs for the socket implementation say that the implementation will use this as a hint. Also we've noticed on linux machines running the client, that the size of the buffer changes/grows during runtime all by itself, and turns out that this support may not be of use. Someone else would have to speak to other clients and how their underlying socket implementations accept and use this type of configuration.
--
With best regards
Maksim Dmitrichenko