Exact definition of SO_SNDLOWAT and SO_RCVLOWAT

Richard Sharpe sharpe at ns.aus.com
Sun May 14 06:38:01 GMT 2000


At 02:10 PM 5/14/00 +1000, Richard Sharpe wrote:
>Hi,
>
>I am seeing conflicting definitions of SO_SNDLOWAT and SO_RCVLOWAT, and
>would like some confirmation of these.
>
>>From some man pages I have found, it seems that the following might be true:
>
>On a write operation, the min of the write size and the value supplied in
>any SO_SNDLOWAT will be written to the protocol later, which will then
>segment this. However, SO_NODELAY will control whether that is sent as a
>segment immediately, or whether or not TCP will delay a short while to see
>if more data is available.
>
>Now, if you have set TCP_NODELAY, then it seems that a good size for
>SO_SNDLOWAT would be 1460. This would allow full ethernet packets ...

Hmmm, from some info I have found in a Solaris TCP/IP performance guide, it
seems that they think there is not much point in using SO_SNDLOWAT, and it
sets the min space in the snd buffer before select or poll will return
writable for the socket, while SO_RCVLOWAT seems to refer to the min amount
of data that must be in the socket buffer before select or poll will return
readable for the socket.

In addition, my Linux 2.2.9 kernel sets RCVLOWAT and SNDLOWAT to 1, so
these parameters would be irrelevant to Linux.

What seems to be more important to me is how much data TCP will stuff into
a segment, as this will control how many segments will be used when sending
a block of data. For example, if doing a 4kB read or write, the minimum
number of 1500-byte IP datagrams will be 3, but an implementation could
send four or even five, depending on how the data is given to the TCP layer
and whether or not TCP_NODELAY is set.

>Comments please.
>
>
>Regards
>-------
>Richard Sharpe, sharpe at ns.aus.com
>Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
>Co-author, SAMS Teach Yourself Samba in 24 Hours
>Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
>Author: First Australian 2-day, intensive, hands-on Samba course
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
Author: First Australian 2-day, intensive, hands-on Samba course



More information about the samba-technical mailing list