SUMMARY: poor performance for Sol2.4 to SunOS4.1.4

From: William J. Sproule (
Date: Mon Feb 19 1996 - 09:19:30 CST

>Original Problem:
>I am having performance problems going from a Solaris 2.4
>host to a Sun4.1.4 host, or hosts that use BSD based networking.

The answer came from Jan Brittenson (bson@caribe-86.Eng.Sun.COM)

There's a bug in SunOS 4.x that results in poor performance when its
SO_SNDBUF is smaller than the other end's advertised TCP receive
window. 4.x defaults to a smaller receive window, which is why this
bug only happens by default when connected to a different TCP
implementation. Generally, newer commercial implementations have a
strong preference for larger windows.

The easiest workaround, if you have the source, is to add the
following to the 4.x code, after the connection has been established:

        int sndbuf = 24*1024;

        if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&sndbuf,
            sizeof (sndbuf)) < 0)

You may wish to try something similar for SO_RCVBUF as well for the
opposite direction.

By the way, bug #1189147 is not a bug; the cause was that the
application logged things to the console as it transmitted data, and
so it illustrated the speed of printf() to the console, not a TCP
problem. Removing the printf() restored performance.

Hope this is of help!

                                                -- Jan Brittenson

Thanks to everyone who replied:

Eric Larson <>
Henry Katz <>
Bill Wyatt <>
Rick Jones <> (Bruce Barnett)
bson@caribe-86.Eng.Sun.COM (Jan Brittenson)

William J. Sproule, Computer Systems Manager sproule@astro.Princeton.EDU
Department of Astrophysical Sciences
126 Peyton Hall Phone: +1 609-258-6483
Princeton University Fax: +1 609-258-1020
Princeton, NJ 08544-1001 MIME, PGP Accepted

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:53 CDT