🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Michael Hucka Mon, 18 Nov 1996 00:00
Networking slow-down between Solaris 2.5 & SunOS 4.1.4
#12432
Author: Michael Hucka
Date: Mon, 18 Nov 1996 00:00
41 lines
2531 bytes
We're running a news server on a SunOS 4.1.4 based SS20, and we have been
experiencing a tremendous drop in throughput between us and peer servers that
are running Solaris.  This problem does not occur between news peers that are
both Solaris or both SunOS -- only the combination seems to be a problem.

Checking back through recent articles in comp.unix.solaris, I see that this
kind of problem has been reported before:

    From: mynhier@duff.cs.utk.edu (Chad Mynhier)
    Subject: TCP Performance SunOS4.x -> Solaris 2.5
    Date: 1996/11/04
    Message-Id: <MYNHIER.96Nov4094655@duff.cs.utk.edu>
    Newsgroups: comp.unix.solaris

    From: eggert@twinsun.com (Paul Eggert)
    Subject: Re: TCP Performance SunOS4.x -> Solaris 2.5
    Message-ID: <55lpr1$61v$1@shade.twinsun.com>
    References: <MYNHIER.96Nov4094655@duff.cs.utk.edu>
    Date: 4 Nov 1996 14:13:53 -0800

    From: eggert@twinsun.com (Paul Eggert)
    Subject: Re: TCP Performance SunOS4.x -> Solaris 2.5
    Newsgroups: comp.unix.solaris
    Message-ID: <56fss5$7fu$1@shade.twinsun.com>
    References: <MYNHIER.96Nov4094655@duff.cs.utk.edu> <55lpr1$61v$1@shade.twinsun.com> <casper.847984701@uk-usenet.uk.sun.com>
    Date: 14 Nov 1996 11:45:09 -0800

Can anyone tell me if there is now a patch or workaround for this?  Simply
upgrading our server to Solaris is not a real solution; it will likely only
move the problem to a different set of peer servers.

If this problem really exists, then this is an important issue for us.  I
would really appreciate any help in resolving this.

-- 
Mike Hucka        hucka@umich.edu        http://ai.eecs.umich.edu/people/hucka
 Ph.D. candidate, computational models of human visual processing, U-M AI Lab
     UNIX admin & programmer/analyst, EECS Dept., University of Michigan

[LONG] Analysis: Networking slow-down 2.5<->SunOS 4.1.4
#12493
Author: Christian Kuehnke
Date: Tue, 19 Nov 1996 00:00
332 lines
17955 bytes

Michael Hucka <hucka@eecs.umich.edu> writes:
> We're running a news server on a SunOS 4.1.4 based SS20, and we have been
> experiencing a tremendous drop in throughput between us and peer servers that
> are running Solaris.  This problem does not occur between news peers that are
> both Solaris or both SunOS -- only the combination seems to be a problem.
[...]
> Can anyone tell me if there is now a patch or workaround for this?  Simply
> upgrading our server to Solaris is not a real solution; it will likely only
> move the problem to a different set of peer servers.
> 
> If this problem really exists, then this is an important issue for us.  I
> would really appreciate any help in resolving this.

*SIGH*
I noticed this behaviour when doing backups from SunOS to Solaris via
rsh/rmt. The transfer rate varied about 120 kb/s, which is far too
less to continuously feed a DAT drive with data.

Your posting was an incentive to me to investigate this issue further.
I always used: time        dd if=/dev/zero bs=30k count=100 |\
               rsh <dest> "dd of=/dev/null bs=30k"
to test and measure things.

I compared tcpdump-traces of these sessions between Solaris-Solaris,
SunOS-SunOS, and SunOS-Solaris. DISCLAIMER: I am not a TCP/IP guru,
corrections are always welcome.

[SunOS->Solaris; S='Sender', R='Receiver', Time in Seconds]
20.408094 S.1022 > R.514: S 2059904000:2059904000(0) win 4096 <mss 1460>
20.409183 R.514 > S.1022: S 2403073228:2403073228(0) ack 2059904001 win 8760 <mss 1460> (DF)
20.409945 S.1022 > R.514: . ack 1 win 4096
20.410945 S.1022 > R.514: P 1:6(5) ack 1 win 4096
20.454437 R.514 > S.1022: . ack 6 win 8760 (DF)
20.537333 R.1020 > S.1021: S 2403203425:2403203425(0) win 8760 <mss 1460> (DF)
20.538296 S.1021 > R.1020: S 2059968000:2059968000(0) ack 2403203426 win 4096 <mss 1460>
20.538741 R.1020 > S.1021: . ack 1 win 8760 (DF)
20.539935 S.1022 > R.514: P 6:12(6) ack 1 win 4096
20.584213 R.514 > S.1022: . ack 12 win 8760 (DF)
20.584918 S.1022 > R.514: P 12:41(29) ack 1 win 4096
20.634564 R.514 > S.1022: . ack 41 win 8760 (DF)
20.817056 R.514 > S.1022: P 1:2(1) ack 41 win 8760 (DF)
20.832249 S.1022 > R.514: P 41:1065(1024) ack 2 win 4096
20.833921 S.1022 > R.514: . 1065:2525(1460) ack 2 win 4096
20.835146 S.1022 > R.514: . 2525:3985(1460) ack 2 win 4096
20.874581 R.514 > S.1022: . ack 2525 win 8760 (DF)
20.878990 S.1022 > R.514: . 3985:5445(1460) ack 2 win 4096
20.924502 R.514 > S.1022: . ack 5445 win 8760 (DF)
20.926544 S.1022 > R.514: P 5445:6621(1176) ack 2 win 4096
20.928474 S.1022 > R.514: . 6621:8081(1460) ack 2 win 4096
20.929750 S.1022 > R.514: P 8081:9541(1460) ack 2 win 4096
21.025013 R.514 > S.1022: . ack 9541 win 8760 (DF)
21.026748 S.1022 > R.514: P 9541:10281(740) ack 2 win 4096
21.029028 S.1022 > R.514: . 10281:11741(1460) ack 2 win 4096
21.030253 S.1022 > R.514: . 11741:13201(1460) ack 2 win 4096
21.061346 R.514 > S.1022: . ack 11741 win 8760 (DF)
21.064242 S.1022 > R.514: . 13201:14661(1460) ack 2 win 4096
21.086650 R.514 > S.1022: . ack 14661 win 8760 (DF)
21.088549 S.1022 > R.514: P 14661:15837(1176) ack 2 win 4096
21.089856 S.1022 > R.514: . 15837:17297(1460) ack 2 win 4096
21.091296 S.1022 > R.514: P 17297:18757(1460) ack 2 win 4096
21.134542 R.514 > S.1022: . ack 17297 win 6124 (DF)
21.138885 S.1022 > R.514: . 18757:20217(1460) ack 2 win 4096
21.184821 R.514 > S.1022: . ack 20217 win 3204 (DF)
21.186895 S.1022 > R.514: P 20217:21545(1328) ack 2 win 4096
21.188183 S.1022 > R.514: . 21545:23005(1460) ack 2 win 4096
21.188579 R.514 > S.1022: . ack 20217 win 8760 (DF)
21.190562 S.1022 > R.514: . 23005:24465(1460) ack 2 win 4096
21.190654 R.514 > S.1022: . ack 23005 win 8760 (DF)
21.195907 S.1022 > R.514: . 24465:25925(1460) ack 2 win 4096
21.196302 R.514 > S.1022: . ack 25925 win 8760 (DF)
21.198219 S.1022 > R.514: P 25925:27101(1176) ack 2 win 4096

Throughput=~120kb

Obviously, the SunOS machine sends Data with a TCP window size of 4096
bytes, although the Solaris machine offers a larger window (8760). The
Solaris machine does "delayed ACK" most of the time. The sender stops
sending early due to outstanding ACK's.

[SunOS-SunOS]
10.883066 S.1023 > R.514: S 1071744000:1071744000(0) win 4096 <mss 1460>
10.884056 R.514 > S.1023: S 2029504000:2029504000(0) ack 1071744001 win 4096 <mss 1460>
10.884693 S.1023 > R.514: . ack 1 win 4096
10.885818 S.1023 > R.514: P 1:6(5) ack 1 win 4096
10.984635 R.1023 > S.1022: S 2029632000:2029632000(0) win 4096 <mss 1460>
10.985485 S.1022 > R.1023: S 1071808000:1071808000(0) ack 2029632001 win 4096 <mss 1460>
10.986277 R.1023 > S.1022: . ack 1 win 4096
11.044551 R.514 > S.1023: . ack 6 win 4096
11.045157 S.1023 > R.514: P 6:41(35) ack 1 win 4096
11.080439 R.514 > S.1023: P 1:2(1) ack 41 win 4096
11.099516 S.1023 > R.514: P 41:1065(1024) ack 2 win 4096
11.101752 S.1023 > R.514: . 1065:2525(1460) ack 2 win 4096
11.103655 S.1023 > R.514: . 2525:3985(1460) ack 2 win 4096
11.244628 R.514 > S.1023: . ack 3985 win 152
11.245704 S.1023 > R.514: P 3985:4137(152) ack 2 win 4096
11.383004 R.514 > S.1023: . ack 4137 win 4096
11.384954 S.1023 > R.514: . 4137:5597(1460) ack 2 win 4096
11.386220 S.1023 > R.514: . 5597:7057(1460) ack 2 win 4096
11.387218 S.1023 > R.514: P 7057:8233(1176) ack 2 win 4096
11.387294 R.514 > S.1023: . ack 5597 win 4096
11.388328 R.514 > S.1023: . ack 8233 win 4096
11.389770 S.1023 > R.514: P 8233:9257(1024) ack 2 win 4096
11.391645 S.1023 > R.514: . 9257:10717(1460) ack 2 win 4096
11.392673 R.514 > S.1023: . ack 10717 win 4096
11.393771 S.1023 > R.514: P 10717:11305(588) ack 2 win 4096
11.397056 S.1023 > R.514: . 11305:12765(1460) ack 2 win 4096
11.398334 S.1023 > R.514: . 12765:14225(1460) ack 2 win 4096
11.398420 R.514 > S.1023: . ack 12765 win 4096
11.399373 R.514 > S.1023: . ack 14225 win 4096
11.401094 S.1023 > R.514: P 14225:15401(1176) ack 2 win 4096
11.403554 S.1023 > R.514: . 15401:16861(1460) ack 2 win 4096
11.404783 S.1023 > R.514: . 16861:18321(1460) ack 2 win 4096
11.404864 R.514 > S.1023: . ack 16861 win 4096
11.405957 R.514 > S.1023: . ack 18321 win 4096
11.407591 S.1023 > R.514: P 18321:19497(1176) ack 2 win 4096
11.409936 S.1023 > R.514: . 19497:20957(1460) ack 2 win 4096
11.411172 S.1023 > R.514: . 20957:22417(1460) ack 2 win 4096
11.411257 R.514 > S.1023: . ack 20957 win 4096
11.412318 R.514 > S.1023: . ack 22417 win 4096
11.413914 S.1023 > R.514: P 22417:23593(1176) ack 2 win 4096
11.415961 S.1023 > R.514: . 23593:25053(1460) ack 2 win 4096
11.417197 S.1023 > R.514: . 25053:26513(1460) ack 2 win 4096
11.417295 R.514 > S.1023: . ack 25053 win 4096
11.418382 R.514 > S.1023: . ack 26513 win 4096

Throughput=~500kb

Both machines offer window sizes of 4096 bytes. The receiver sends
out the ACK's quickly enough to not let the sender wait for them
a significant amout of time.

[Solaris-Solaris]
32.527678 S.1022 > R.514: S 3129074009:3129074009(0) win 8760 <mss 1460> (DF)
32.528822 R.514 > S.1022: S 2141756587:2141756587(0) ack 3129074010 win 8760 <mss 1460> (DF)
32.529347 S.1022 > R.514: . ack 1 win 8760 (DF)
32.531434 S.1022 > R.514: P 1:6(5) ack 1 win 8760 (DF)
32.574667 R.514 > S.1022: . ack 6 win 8760 (DF)
32.781728 R.1019 > S.1021: S 2141938452:2141938452(0) win 8760 <mss 1460> (DF)
32.782400 S.1021 > R.1019: S 3129254008:3129254008(0) ack 2141938453 win 8760 <mss 1460> (DF)
32.782912 R.1019 > S.1021: . ack 1 win 8760 (DF)
32.787228 S.1022 > R.514: P 6:12(6) ack 1 win 8760 (DF)
32.834273 R.514 > S.1022: . ack 12 win 8760 (DF)
32.834606 S.1022 > R.514: P 12:41(29) ack 1 win 8760 (DF)
32.884683 R.514 > S.1022: . ack 41 win 8760 (DF)
33.230289 R.514 > S.1022: P 1:2(1) ack 41 win 8760 (DF)
33.242257 S.1022 > R.514: P 41:1065(1024) ack 2 win 8760 (DF)
33.243141 S.1022 > R.514: . 1065:2089(1024) ack 2 win 8760 (DF)
33.244022 S.1022 > R.514: P 2089:3113(1024) ack 2 win 8760 (DF)
33.244910 S.1022 > R.514: . 3113:4137(1024) ack 2 win 8760 (DF)
33.245796 S.1022 > R.514: P 4137:5161(1024) ack 2 win 8760 (DF)
33.285281 R.514 > S.1022: . ack 2089 win 8760 (DF)
33.286403 S.1022 > R.514: . 5161:6185(1024) ack 2 win 8760 (DF)
33.287286 S.1022 > R.514: . 6185:7209(1024) ack 2 win 8760 (DF)
33.288175 S.1022 > R.514: . 7209:8233(1024) ack 2 win 8760 (DF)
33.288238 R.514 > S.1022: . ack 4137 win 8760 (DF)
33.289284 S.1022 > R.514: . 8233:9257(1024) ack 2 win 8760 (DF)
33.290179 S.1022 > R.514: . 9257:10281(1024) ack 2 win 8760 (DF)
33.291059 S.1022 > R.514: . 10281:11305(1024) ack 2 win 8760 (DF)
33.291940 S.1022 > R.514: . 11305:12329(1024) ack 2 win 8760 (DF)
33.334696 R.514 > S.1022: . ack 6185 win 8760 (DF)
33.335802 S.1022 > R.514: . 12329:13353(1024) ack 2 win 8760 (DF)
33.336693 S.1022 > R.514: . 13353:14377(1024) ack 2 win 8760 (DF)
33.336772 R.514 > S.1022: . ack 8233 win 8760 (DF)
33.336828 R.514 > S.1022: . ack 10281 win 8760 (DF)
33.336888 R.514 > S.1022: . ack 12329 win 8760 (DF)
33.337986 S.1022 > R.514: . 14377:15401(1024) ack 2 win 8760 (DF)
33.338884 S.1022 > R.514: . 15401:16425(1024) ack 2 win 8760 (DF)
33.339767 S.1022 > R.514: . 16425:17449(1024) ack 2 win 8760 (DF)
33.340645 S.1022 > R.514: . 17449:18473(1024) ack 2 win 8760 (DF)
33.341532 S.1022 > R.514: . 18473:19497(1024) ack 2 win 8760 (DF)
33.342411 S.1022 > R.514: P 19497:20521(1024) ack 2 win 8760 (DF)
33.385102 R.514 > S.1022: . ack 14377 win 8760 (DF)
33.386246 S.1022 > R.514: . 20521:21545(1024) ack 2 win 8760 (DF)
33.387142 S.1022 > R.514: . 21545:22569(1024) ack 2 win 8760 (DF)
33.387230 R.514 > S.1022: . ack 16425 win 8760 (DF)
33.387306 R.514 > S.1022: . ack 18473 win 8760 (DF)
33.387369 R.514 > S.1022: . ack 20521 win 8760 (DF)

Throughput=~600kb

Both machines offer window sizes of 8760 bytes. Although the receiver
sends out the ACK's delayed, the sender is able to send data most of
the time due to the window size.

I was able to do only measurements with faster machines, not dumps,
and you can get up to 900kb/s with an Ultra1 on the receiving and a
SS5/110 on the sending side, both running Solaris. However, sending
from SunOS not even an Ultra1 on the receiving side makes a difference
(throughput at 120kb/s as stated above)!

Reducing the "delayed ACK" interval down from 50ms to 1ms with
"ndd -set /dev/tcp tcp_deferred_ack_interval 1" gave the following
results:

[SunOS->Solaris, with tcp_deferred_ack_interval=1]
00.770983 S.1023 > R.514: S 2065280000:2065280000(0) win 4096 <mss 1460>
00.772173 R.514 > S.1023: S 2408619211:2408619211(0) ack 2065280001 win 8760 <mss 1460> (DF)
00.772909 S.1023 > R.514: . ack 1 win 4096
00.773991 S.1023 > R.514: P 1:6(5) ack 1 win 4096
00.777171 R.514 > S.1023: . ack 6 win 8755 (DF)
00.904211 R.1019 > S.1021: S 2408840837:2408840837(0) win 8760 <mss 1460> (DF)
00.905324 S.1021 > R.1019: S 2065408000:2065408000(0) ack 2408840838 win 4096 <mss 1460>
00.905757 R.1019 > S.1021: . ack 1 win 8760 (DF)
00.907190 S.1023 > R.514: P 6:12(6) ack 1 win 4096
00.917363 R.514 > S.1023: . ack 12 win 8760 (DF)
00.918083 S.1023 > R.514: P 12:41(29) ack 1 win 4096
00.927551 R.514 > S.1023: . ack 41 win 8760 (DF)
01.223953 R.514 > S.1023: P 1:2(1) ack 41 win 8760 (DF)
01.244748 S.1023 > R.514: P 41:1065(1024) ack 2 win 4096
01.246405 S.1023 > R.514: . 1065:2525(1460) ack 2 win 4096
01.247636 S.1023 > R.514: . 2525:3985(1460) ack 2 win 4096
01.257849 R.514 > S.1023: . ack 2525 win 8760 (DF)
01.261563 S.1023 > R.514: . 3985:5445(1460) ack 2 win 4096
01.267429 R.514 > S.1023: . ack 5445 win 8760 (DF)
01.269269 S.1023 > R.514: P 5445:6621(1176) ack 2 win 4096
01.271054 S.1023 > R.514: . 6621:8081(1460) ack 2 win 4096
01.272358 S.1023 > R.514: P 8081:9541(1460) ack 2 win 4096
01.289064 R.514 > S.1023: . ack 9541 win 8760 (DF)
01.291045 S.1023 > R.514: P 9541:10281(740) ack 2 win 4096
01.293409 S.1023 > R.514: . 10281:11741(1460) ack 2 win 4096
01.294641 S.1023 > R.514: . 11741:13201(1460) ack 2 win 4096
01.297384 R.514 > S.1023: . ack 11741 win 8760 (DF)
01.301901 S.1023 > R.514: . 13201:14661(1460) ack 2 win 4096
01.308669 R.514 > S.1023: . ack 14661 win 8760 (DF)
01.310578 S.1023 > R.514: P 14661:15837(1176) ack 2 win 4096
01.311993 S.1023 > R.514: . 15837:17297(1460) ack 2 win 4096
01.313365 S.1023 > R.514: P 17297:18757(1460) ack 2 win 4096
01.317505 R.514 > S.1023: . ack 17297 win 6124 (DF)
01.327410 R.514 > S.1023: . ack 18757 win 4664 (DF)
01.328973 S.1023 > R.514: P 18757:19497(740) ack 2 win 4096
01.331472 S.1023 > R.514: . 19497:20957(1460) ack 2 win 4096
01.332694 S.1023 > R.514: . 20957:22417(1460) ack 2 win 4096
01.337486 R.514 > S.1023: . ack 20957 win 2464 (DF)
01.347305 R.514 > S.1023: . ack 22417 win 1004 (DF)

Throughput=~420kb

The ACK's are sent out much quicker, performance has much improved,
although the window gets completely 'emptied' often.

Probably reducing this "delayed ACK" interval can have adverse effects
in other situations. And it increases network traffic, of course.

A hint from our local guru about using "setsockopt" with "SO_SNDBUF"
and "SO_RCVBUF" and its possible effect on window sizes on SunOS let
me to the following experiment: I grabbed the "rsh" sources from
FreeBSD, modified them to compile on SunOS [only replacing some error
handling functions by fprintf/perror was necessary], and inserted the
following code:

  rem = rcmd(&host, sp->s_port, pw->pw_name, user, args, &rfd2);
  [...]
+ {
+  int value=16384;
+  if (setsockopt(rem, SOL_SOCKET, SO_SNDBUF, &value,
+      sizeof(value)) < 0)
+          perror("setsockopt");
+ }

The effect was clearly visible:

[SunOS->Solaris with hacked "rsh"]
45.699178 S.1023 > R.514: S 2055296000:2055296000(0) win 4096 <mss 1460>
45.700174 R.514 > S.1023: S 2398395701:2398395701(0) ack 2055296001 win 8760 <mss 1460> (DF)
45.700943 S.1023 > R.514: . ack 1 win 4096
45.701966 S.1023 > R.514: P 1:6(5) ack 1 win 4096
45.751907 R.514 > S.1023: . ack 6 win 8760 (DF)
45.836060 R.1022 > S.1022: S 2398557698:2398557698(0) win 8760 <mss 1460> (DF)
45.836896 S.1022 > R.1022: S 2055360000:2055360000(0) ack 2398557699 win 4096 <mss 1460>
45.837304 R.1022 > S.1022: . ack 1 win 8760 (DF)
45.838504 S.1023 > R.514: P 6:12(6) ack 1 win 4096
45.881810 R.514 > S.1023: . ack 12 win 8760 (DF)
45.882677 S.1023 > R.514: P 12:41(29) ack 1 win 4096
45.931744 R.514 > S.1023: . ack 41 win 8760 (DF)
46.117595 R.514 > S.1023: P 1:2(1) ack 41 win 8760 (DF)
46.135546 S.1023 > R.514: P 41:1065(1024) ack 2 win 4096
46.137244 S.1023 > R.514: . 1065:2525(1460) ack 2 win 4096
46.138477 S.1023 > R.514: . 2525:3985(1460) ack 2 win 4096
46.139710 S.1023 > R.514: . 3985:5445(1460) ack 2 win 4096
46.140944 S.1023 > R.514: . 5445:6905(1460) ack 2 win 4096
46.142177 S.1023 > R.514: . 6905:8365(1460) ack 2 win 4096
46.182513 R.514 > S.1023: . ack 2525 win 8760 (DF)
46.182783 R.514 > S.1023: . ack 5445 win 8760 (DF)
46.184947 S.1023 > R.514: . 8365:9825(1460) ack 2 win 4096
46.186176 S.1023 > R.514: . 9825:11285(1460) ack 2 win 4096
46.187397 S.1023 > R.514: . 11285:12745(1460) ack 2 win 4096
46.188635 S.1023 > R.514: . 12745:14205(1460) ack 2 win 4096
46.232019 R.514 > S.1023: . ack 9825 win 8760 (DF)
46.232250 R.514 > S.1023: . ack 14205 win 8760 (DF)
46.234334 S.1023 > R.514: . 14205:15665(1460) ack 2 win 4096
46.235608 S.1023 > R.514: . 15665:17125(1460) ack 2 win 4096
46.236844 S.1023 > R.514: . 17125:18585(1460) ack 2 win 4096
46.238071 S.1023 > R.514: . 18585:20045(1460) ack 2 win 4096
46.239308 S.1023 > R.514: . 20045:21505(1460) ack 2 win 4096
46.240541 S.1023 > R.514: . 21505:22965(1460) ack 2 win 4096
46.281970 R.514 > S.1023: . ack 18585 win 8760 (DF)
46.282110 R.514 > S.1023: . ack 22965 win 8760 (DF)
46.285016 S.1023 > R.514: . 22965:24425(1460) ack 2 win 4096
46.286243 S.1023 > R.514: . 24425:25885(1460) ack 2 win 4096
46.287483 S.1023 > R.514: . 25885:27345(1460) ack 2 win 4096
46.288703 S.1023 > R.514: . 27345:28805(1460) ack 2 win 4096
46.289914 S.1023 > R.514: . 28805:30265(1460) ack 2 win 4096
46.291166 S.1023 > R.514: . 30265:31725(1460) ack 2 win 4096
46.332207 R.514 > S.1023: . ack 27345 win 8760 (DF)
46.332449 R.514 > S.1023: . ack 31725 win 4380 (DF)
46.334556 S.1023 > R.514: . 31725:33185(1460) ack 2 win 4096

Throughput=~650kb

The sending side (SunOS) is now using an increased send-window
size, and throughput is quite nice.

I repeat that these measeurements were taken on medium loaded
machines and a lightly to medium loaded 10MBit/s Ethernet, but
you should get the idea, and the results should be reproducible.

All Solaris machines are running 2.5.1 with 103582-01 and
103630-01 applied. All SunOS machines are running 4.1.3_U1
with tons of patches applied.

Now the question is, whether there is a kernel hack to increase
the default window size for TCP in SunOS 4. Or what?

Christian
-- 
Christian.Kuehnke@Informatik.Uni-Oldenburg.DE|Tel.: +49 441 592 652  (private)
                                             |Tel.: +49 441 798 2978 (work)
Solaris keeps your CPU and Disk hot.         |Fax : +49 441 798 2980 (work)

Re: [LONG] Analysis: Networking slow-down 2.5<->SunOS 4.1.4
#12513
Author: Larry J. Blunk
Date: Wed, 20 Nov 1996 00:00
20 lines
1312 bytes
Christian Kuehnke (Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE) wrote:
: 
: 
: Now the question is, whether there is a kernel hack to increase
: the default window size for TCP in SunOS 4. Or what?
: 

   Just get the following:
     ftp://ftp.ucsd.edu/pub/csl/netconfig/netconfig2.2.tar.Z

   It provides a nice clean interface to the kernel parameters relating
to network performance (window sizes, default MSS, etc.).  

-- 
-------------------
Larry J. Blunk
Merit Network, Inc.

Re: [LONG] Analysis: Networking slow-down 2.5<->SunOS 4.1.4
#12532
Author: Don Lewis
Date: Thu, 21 Nov 1996 00:00
14 lines
1278 bytes
In article <56se3e$eic@news.Informatik.Uni-Oldenburg.DE>,
Christian Kuehnke <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE> wrote:
>
>Now the question is, whether there is a kernel hack to increase
>the default window size for TCP in SunOS 4. Or what?

Look at /usr/kvm/sys/netinet/in_proto.c
-- 
Don "Truck" Lewis                                       TDK Semiconductor
Internet: Don.Lewis@tsc.tdk.com                         138 New Mohawk Road
Phone: +1 916 478-8284       FAX: +1 916 478-8251       Nevada City, CA  95959

Re: [LONG] Analysis: Networking slow-down 2.5<->SunOS 4.1.4
#12613
Author: Casper H.S. Dik - Network Securi...
Date: Sun, 24 Nov 1996 00:00
26 lines
1772 bytes
"Christian Kuehnke" <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE> writes:


>Obviously, the SunOS machine sends Data with a TCP window size of 4096
>bytes, although the Solaris machine offers a larger window (8760). The
>Solaris machine does "delayed ACK" most of the time. The sender stops
>sending early due to outstanding ACK's.


Of course, the window size offered is the window size the other end can use,
so the SUnOS machine can send 8760 bytes and the Solaris machine can send only
4K.  So, IMHO, the question is: why does SUnOS stop sending when there's still
so much window left?

What are the rules for delaying acks and what are the rules for stopping to
send?

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Re: [LONG] Analysis: Networking slow-down 2.5<->SunOS 4.1.4
#12623
Author: Adam Morrison
Date: Sun, 24 Nov 1996 00:00
105 lines
5732 bytes
In article <56se3e$eic@news.Informatik.Uni-Oldenburg.DE>
"Christian Kuehnke" <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE> wrote:

> A hint from our local guru about using "setsockopt" with "SO_SNDBUF"
> and "SO_RCVBUF" and its possible effect on window sizes on SunOS let
> me to the following experiment: I grabbed the "rsh" sources from
> FreeBSD, modified them to compile on SunOS [only replacing some error
> handling functions by fprintf/perror was necessary], and inserted the
> following code:
                                  [...]
> Now the question is, whether there is a kernel hack to increase
> the default window size for TCP in SunOS 4. Or what?

Yes.  The default socket buffer sizes for TCP sockets are in
tcp_recvspace and tcp_sendspace in BSD stacks.

# adb -w /vmunix /dev/kmem
not core file = /dev/kmem
tcp_sendspace/D
_tcp_sendspace:
_tcp_sendspace: 4096
tcp_sendspace/W0t8192
_tcp_sendspace: 0x1000          =       0x2000
tcp_sendspace?W0t8192
_tcp_sendspace: 0x1000          =       0x2000

Increasing the send buffer size certainly increases throughput
in bulk data transfers, between SunOS boxes too.  (Just remember
to kill and restart inetd for the changes to effect your daemons.)

But I've seen something more subtle going on.  Here's my trace
of this test.

In this trace, snd is a SunOS 4.1.4 box with tcp_sendspace==4096,
and rcv is a Solaris 2.5 box, untouched.

13.356785 snd.1023 > rcv.shell: S 796736000:796736000(0) win 4096
        <mss 1460>
13.357498 rcv.shell > snd.1023: S 768441916:768441916(0) ack 796736001 win
        8760 <mss 1460> (DF)
                                [...]
14.146136 snd.1023 > rcv.shell: P 93507:94683(1176) ack 2 win 4096
14.147414 snd.1023 > rcv.shell: . 94683:96143(1460) ack 2 win 4096
14.148865 snd.1023 > rcv.shell: P 96143:97603(1460) ack 2 win 4096
14.149104 rcv.shell > snd.1023: . ack 96143 win 8760 (DF)
14.150921 snd.1023 > rcv.shell: . 97603:99063(1460) ack 2 win 4096
14.174849 rcv.shell > snd.1023: . ack 99063 win 8760 (DF)
                                [...]
14.416214 snd.1023 > rcv.shell: P 138563:139739(1176) ack 2 win 4096
14.417445 snd.1023 > rcv.shell: . 139739:141199(1460) ack 2 win 4096
14.418666 snd.1023 > rcv.shell: P 141199:142659(1460) ack 2 win 4096
14.419006 rcv.shell > snd.1023: . ack 141199 win 8760 (DF)
14.420698 snd.1023 > rcv.shell: . 142659:144119(1460) ack 2 win 4096
14.445729 rcv.shell > snd.1023: . ack 144119 win 8760 (DF)

The exact same thing happens all over the trace; snd sends its entire
4096 byte buffer.  Rcv processes the first segment, and marks the
connection for a delayed ack.  Then it processes the second segment,
and since there's a previous, unacked segment, it acks them both.
Now it processes the third segment, and again, marks the connection for
a delayed ack.  (That's the flow of events under BSD, anyway --
can anyone who has read the Solaris stack sources say if Solaris is
behaves differently?)

Meanwhile, the receiver sends another segment, and now something
peculiar happens.  Rcv doesn't ack this segment immediately
(like it did before, when there was a preceding segment that hasn't
been acked).  Instead it waits 25ms and then acks it.  (The
tcp_deferred_ack_interval variable was 50ms.)  I'm really
not sure why it's doing this.

Compare this to the following trace, in which rcv is a SunOS box
with tcp_recvspace==8760.  Throughput wasn't nearly as bad --
~5 sec compared to ~17 sec in the SunOS -> Solaris case.

36.371889 snd.1021 > rcv.shell: S 661888000:661888000(0) win 4096
        <mss 1460>
36.372245 rcv.shell > snd.1021: S 639744000:639744000(0) ack 661888001
        win 8760 <mss 1460>
                                [...]
36.875527 snd.1021 > rcv.shell: P 130959:132135(1176) ack 2 win 4096
36.876780 snd.1021 > rcv.shell: . 132135:133595(1460) ack 2 win 4096
36.878016 snd.1021 > rcv.shell: . 133595:135055(1460) ack 2 win 4096
36.878291 rcv.shell > snd.1021: . ack 135055 win 8760
                                [...]
37.045803 snd.1021 > rcv.shell: P 247695:247847(152) ack 2 win 4096
37.047165 snd.1021 > rcv.shell: . 247847:249307(1460) ack 2 win 4096
37.048490 snd.1021 > rcv.shell: . 249307:250767(1460) ack 2 win 4096
37.048794 rcv.shell > snd.1021: . ack 250767 win 8760

First of all, none of that 25ms stuff.  And a nice play of the
BSD algorithm for delayed acks.  BSD doesn't ack every other
packet; it tests for when its receive window has changed by
more than 2*MSS.  Snd sends it entire buffer (1176+1460+1460), but
even if rcv reads the first two segments and not the third,
the window will have changed by less than 2*MSS, so the ack is sent
only after the third segment, and you get exactly one ack for each three
segments (most of the time).


                                        adam?


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads