Subject: Strange Nagle effect on 1.6.2
To: None <tech-net@netbsd.org>
From: Stuart Brooks <stuartb@cat.co.za>
List: tech-net
Date: 05/30/2005 14:11:57
I have been doing some network testing between 2 Netbsd 1.6.2 systems
and started seeing occasional 200ms(+-10ms) delays. The traffic usually
consists of a number of closely spaced blocks of data (~30kB) roughly
every 1/2 second. It seems to me (looking at the tcp dump) like the
Nagle algorithm is kicking in, but I can't work out why.

1  642.651606 SRC.30010 > DEST.63394: . 389586:391034(1448) ack 1 win
17520 <...>
2  642.651878 SRC.30010 > DEST.63394: . 391034:392482(1448) ack 1 win
17520 <...>
3  642.653052 DEST.63394 > SRC.30010: . ack 389586 win 5936 <...>
4  642.653428 DEST.63394 > SRC.30010: . ack 392482 win 3040 <...>
5  642.653453 SRC.30010 > DEST.63394: P 392482:392878(396) ack 1 win
17520 <...>
6  642.654174 DEST.63394 > SRC.30010: . ack 392482 win 17520 <...>
7  642.658572 SRC.30010 > DEST.63394: . 392878:394326(1448) ack 1 win
17520 <...>
8  642.658598 SRC.30010 > DEST.63394: . 394326:395774(1448) ack 1 win
17520 <...>
9  642.658655 SRC.30010 > DEST.63394: . 395774:397222(1448) ack 1 win
17520 <...>
10 642.658910 DEST.63394 > SRC.30010: . ack 394326 win 16072 <...>
11 642.659195 DEST.63394 > SRC.30010: . ack 395774 win 17520 <...>
12 642.856448 DEST.63394 > SRC.30010: . ack 397222 win 17520 <...>
13 642.856484 SRC.30010 > DEST.63394: P 397222:398512(1290) ack 1 win
17520 <...>
14 643.056432 DEST.63394 > SRC.30010: . ack 398512 win 17520 <...>

Line 5 puts a small packet onto the network as it is the end of a
transmission block which, as I understand it, gets acked implicitly in
Line 10 (although there is not a specific ack for that packet).

The next block then starts and is a little over 5kB, but the last packet
(Line 13) only gets sent 200ms after the original small packet? This
doesn't make sense to me, as I understand it, it should have sent
immediately after Line 9.

I haven't had the chance to test this on Netbsd 2 but my current test
systems are as follows:

- P4 2.8 with 512MB RAM
- Netbsd 1.6.2_STABLE
- i386
- Intel fxp0 100Mbps network card

Is this the correct operation or is it maybe a known problem? Any help
would be appreciated,

Regards
 Stuart