tcp on SUN computers.


Robert Allen (robert@sri-spam.arpa)
Thu, 5 Jun 86 14:18:12 PDT


Hello there,

        I have a question regarding the implementation of TCP
used on the SUN computers. Specifically the question concerns
version 2.2 of SUN UNIX, but will no doubt extend to their later
(and earlier) releases.

        The question follows;

        I have had occasion to use non-blocking sockets (TCP links)
as a link across the Internet between 2 or more SUNs. Empirically,
I have discovered that there is a limit of 2048 bytes which can
be written in a single non-blocking write. Anything more than
that and an error is returned "EMSGSIZE", which indicates that
the internal buffer is only 2048 bytes. Note that if I use
blocking sockets, the size is unlimited. There is also a limit
of 4096 bytes total which can be held "in the pipe", before the
receiving side of the socket must do a read to clear the internal
buffers.
        In a Client/Server relationship, the server will read
the bytes which the client writes into the socket. I've noticed
that with non-blocking sockets where greater than 2K bytes can
be written, that continuous calls to recv() or read() by the server
will return 2K byte chunks. This leads me to believe that the
SUN implementation can only handle a max of 2K byte transfers, and
with only two of these before a read must be done. I've talked
with SUN tech support and they tell me that this 'seems to be'
the case, although without talking directly to an engineer I could
not get a good idea of why this is.
        Finally, my question is this. Why is there a 2K limit, and
can it be changed, perhaps with a kernal reconfiguration? It seems
to me that putting such a limit on the sockets is a poor implementation
for that layer, which should not restrict data size. Shouldn't
such 'packetizing' be done at a lower layer than what sockets are
the entry point to? Or are sockets actually a lower layer interface
than I think?

        Any comments, pointers, or commiserations would be greatly
appreciated.

                                        Robert Allen

                                        (415) 859-2143,

                                        robert@sri-spam.ARPA



This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:36:34 GMT