Subject: kern/5742: Using a DEC 21140-AC card in non-promiscuous mode gives awful throughput
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sparud@cs.chalmers.se>
List: netbsd-bugs
Date: 07/12/1998 00:13:48
>Number:         5742
>Category:       kern
>Synopsis:       Using a DEC 21140-AC card in non-promiscuous mode gives awful throughput
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 11 15:20:01 1998
>Last-Modified:
>Originator:     Jan Sparud
>Organization:
	DoCS, Chalmers University, Gothenburg Sweden
>Release:        July 10 1998
>Environment:

System: NetBSD dogbert.cs.chalmers.se 1.3F NetBSD 1.3F (DOGBERT) #0: Fri Jul 10 14:33:45 CEST 1998 sparud@dogbert.cs.chalmers.se:/usr/src/sys/arch/i386/compile/DOGBERT i386


>Description:

Below is a transcript from three different runs of ttcp from dogbert
(a PPRO-200 running current) to butthead (a PII-266 running
current). Both hosts have noname ethernet cards (de0) with DEC
21140-AC running in 100baseTX mode (see dmesg messages from both hosts
at the bottom of this mail).

The first run gives a throughput of ~160 kB/s. Not very
impressive. Then I start and suspend a tcpdump and try with ttcp
again. Now I get ~9.3MB/s. That's more like it. I kill the tcpdump and
restart it with -p (non-promiscuous mode) then run ttcp a third
time. Again, the throughput is down to ~150kB/s. It seems like
something is really weird when the card is not in promiscuous mode.

The results are consistently reproducible.

dogbert# ifconfig de0
de0: flags=8c63<UP,BROADCAST,NOTRAILERS,RUNNING,OACTIVE,SIMPLEX,MULTICAST> mtu 1500
        media: 100baseTX status: active
        inet 129.16.225.50 netmask 0xffff0000 broadcast 129.16.255.255
dogbert# ttcp -t butthead
ttcp-t: buflen=8192, nbuf=2048, port=5001 tcp  -> butthead
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 98.92 real seconds = 165.63 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 49.46, calls/sec = 20.70
ttcp-t: -1.9user 0.7sys 1:38real 0% 0i+0d 0maxrss 0+1pf 2796+17csw
dogbert# tcpdump src host 255.255.255.255
tcpdump: listening on de0
^Z
Suspended
dogbert# ttcp -t butthead
ttcp-t: buflen=8192, nbuf=2048, port=5001 tcp  -> butthead
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 1.75 real seconds = 9340.13 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 0.88, calls/sec = 1167.52
ttcp-t: -1.9user 0.8sys 0:01real 47% 0i+0d 0maxrss 0+1pf 2356+6csw
dogbert# jobs
[1]  + Suspended              tcpdump src host 255.255.255.255
dogbert# kill %1

19453 packets received by filter
0 packets dropped by kernel

[1]    Done                   tcpdump src host 255.255.255.255
dogbert# tcpdump -p src host 255.255.255.255
tcpdump: listening on de0
^Z
Suspended
dogbert# ttcp -t butthead
ttcp-t: buflen=8192, nbuf=2048, port=5001 tcp  -> butthead
ttcp-t: socket
ttcp-t: connect
ttcp-t: 16777216 bytes in 109.75 real seconds = 149.28 KB/sec +++
ttcp-t: 2048 I/O calls, msec/call = 54.88, calls/sec = 18.66
ttcp-t: 0.0user 0.7sys 1:49real 0% 0i+0d 0maxrss 0+1pf 2574+106csw
dogbert# 

If I examine the output of 'ttcp -p src port 5001 or dst port 5001'
there are some very interesting delays. Most packages are sent/arrive
with a very short time interval. But at some times there are
significant delays of ~1 second when no packages are
received/sent at all. I have included two snips from the tcpdump
output below. In the first case there is suddenly a delay of 0.61
seconds when nothing happens. In the second case the delay is 1.73
seconds. Very odd. It is these gaps that lead to the extremely low
throghput. Running tcpdump without -p gives the expected throughput
and there are no delays.

snip 1:
20:39:29.240758 dogbert.62701 > butthead.5001: . 176413:177873(1460) ack 1 win 17520
20:39:29.240896 dogbert.62701 > butthead.5001: . 177873:179333(1460) ack 1 win 17520
20:39:29.241080 dogbert.62701 > butthead.5001: . 179333:180793(1460) ack 1 win 17520
20:39:29.241209 dogbert.62701 > butthead.5001: . 180793:182253(1460) ack 1 win 17520
20:39:29.241374 dogbert.62701 > butthead.5001: . 182253:183713(1460) ack 1 win 17520
20:39:29.241503 dogbert.62701 > butthead.5001: . 183713:185173(1460) ack 1 win 17520
20:39:29.241779 butthead.5001 > dogbert.62701: . ack 173493 win 16060
20:39:29.241793 butthead.5001 > dogbert.62701: . ack 174953 win 17520
20:39:29.241804 butthead.5001 > dogbert.62701: . ack 177873 win 16060
20:39:29.241814 butthead.5001 > dogbert.62701: . ack 179333 win 17520
20:39:29.241825 butthead.5001 > dogbert.62701: . ack 182253 win 16060
20:39:29.241836 butthead.5001 > dogbert.62701: . ack 183713 win 17520
20:39:29.241853 butthead.5001 > dogbert.62701: . ack 186633 win 16060
20:39:29.858749 dogbert.62701 > butthead.5001: . 185173:186633(1460) ack 1 win 17520
20:39:29.858986 dogbert.62701 > butthead.5001: . 186633:188093(1460) ack 1 win 17520
20:39:29.859139 dogbert.62701 > butthead.5001: . 188093:189553(1460) ack 1 win 17520
20:39:29.859258 dogbert.62701 > butthead.5001: . 189553:191013(1460) ack 1 win 17520
20:39:29.859385 dogbert.62701 > butthead.5001: . 191013:192473(1460) ack 1 win 17520

snip 2:
20:39:29.986820 dogbert.62701 > butthead.5001: . 516121:517581(1460) ack 1 win 17520
20:39:29.986847 butthead.5001 > dogbert.62701: . ack 513201 win 16060
20:39:29.986867 butthead.5001 > dogbert.62701: . ack 514661 win 17520
20:39:29.986959 dogbert.62701 > butthead.5001: . 517581:519041(1460) ack 1 win 17520
20:39:29.987079 dogbert.62701 > butthead.5001: . 519041:520501(1460) ack 1 win 17520
20:39:29.987209 butthead.5001 > dogbert.62701: . ack 517581 win 16060
20:39:29.987361 butthead.5001 > dogbert.62701: . ack 519041 win 17520
20:39:29.987602 butthead.5001 > dogbert.62701: . ack 521961 win 16060
20:39:29.987682 butthead.5001 > dogbert.62701: . ack 523421 win 17520
20:39:31.717309 dogbert.62701 > butthead.5001: . 520501:521961(1460) ack 1 win 17520
20:39:31.717329 dogbert.62701 > butthead.5001: P 521961:523421(1460) ack 1 win 17520
20:39:31.717492 dogbert.62701 > butthead.5001: P 523421:524289(868) ack 1 win 17520
20:39:31.717629 dogbert.62701 > butthead.5001: . 524289:525749(1460) ack 1 win 17520
20:39:31.717752 dogbert.62701 > butthead.5001: . 525749:527209(1460) ack 1 win 17520

Does anyone knows what might be wrong?

/Jan Sparud

dmesg for dogbert:

NetBSD 1.3F (DOGBERT) #0: Fri Jul 10 14:33:45 CEST 1998
    sparud@dogbert.cs.chalmers.se:/usr/src/sys/arch/i386/compile/DOGBERT
cpu0: family 6 model 1 step 6
cpu0: Intel Pentium Pro (686-class)
real mem  = 133824512
avail mem = 122982400
using 1659 buffers containing 6795264 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82441FX PCI and Memory Controller (PMC) (rev. 0x02)
pcib0 at pci0 dev 1 function 0
pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x01)
Intel 82371SB IDE Interface (PIIX3) (IDE mass storage, interface 0x80) at pci0 dev 1 function 1 not configured
Intel 82371SB USB Host Controller (PIIX3) (USB serial bus, revision 0x01) at pci0 dev 1 function 2 not configured
de0 at pci0 dev 10 function 0
de0: interrupting at irq 10
de0: 21140A [10-100Mb/s] pass 2.0
de0: address 00:a0:cc:6a:0c:a1
ahc0 at pci0 dev 11 function 0
ahc0: interrupting at irq 11
ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs
scsibus0 at ahc0 channel 0: 16 targets
ahc0: target 0 using 16Bit transfers
ahc0: target 0 synchronous at 10.0MHz, offset = 0x8
ahc0: target 0 Tagged Queuing Device
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST15150W, 0023> SCSI2 0/direct fixed
sd0: 4095MB, 3712 cyl, 21 head, 107 sec, 512 bytes/sect x 8388315 sectors
ahc0: target 5 using 16Bit transfers
ahc0: target 5 synchronous at 10.0MHz, offset = 0x8
ahc0: target 5 Tagged Queuing Device
sd1 at scsibus0 targ 5 lun 0: <FUJITSU, MAB3091SP, 0106> SCSI2 0/direct fixed
sd1: 8703MB, 8491 cyl, 10 head, 209 sec, 512 bytes/sect x 17824700 sectors
Cirrus Logic CL-GD5434-8 (VGA display, revision 0xf9) at pci0 dev 12 function 0 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
npx0 at isa0 port 0xf0-0xff: using exception 16
pc0 at isa0 port 0x60-0x6f irq 1: color
pc0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
biomask 840 netmask c40 ttymask c42
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
de0: enabling 100baseTX port

dmesg for butthead:

NetBSD 1.3F (BUTTHEAD) #0: Sat Jul 11 17:32:21 CEST 1998
    sparud@dogbert.cs.chalmers.se:/usr/src/sys/arch/i386/compile/BUTTHEAD
cpu0: family 6 model 3 step 3
cpu0: Intel Pentium II (686-class)
real mem  = 133824512
avail mem = 122105856
using 1659 buffers containing 6795264 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443LX PCI AGP Controller (PAC) (rev. 0x03)
Intel 82443LX AGP Device (PAC) (PCI bridge, revision 0x03) at pci0 dev 1 function 0 not configured
pcib0 at pci0 dev 4 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x01)
Intel 82371AB IDE controller (PIIX4) (IDE mass storage, interface 0x80, revision 0x01) at pci0 dev 4 function 1 not configured
Intel 82371AB USB Host Controller (PIIX4) (USB serial bus, revision 0x01) at pci0 dev 4 function 2 not configured
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x01) at pci0 dev 4 function 3 not configured
ncr0 at pci0 dev 10 function 0: ncr 53c875 fast20 wide scsi
ncr0: interrupting at irq 10
ncr0: minsync=12, maxsync=137, maxoffs=16, 128 dwords burst, large dma fifo
ncr0: single-ended, open drain IRQ driver, using on-chip SRAM
ncr0: restart (scsi reset).
scsibus0 at ncr0: 16 targets
cd0 at scsibus0 targ 5 lun 0: <NEC, CD-ROM DRIVE:464, 1.04> SCSI2 5/cdrom removable
probe(ncr0:5:1): 20.0 MB/s (50 ns, offset 16)
sd0 at scsibus0 targ 6 lun 0: <IBM, DCAS-34330W, S61A> SCSI2 0/direct fixed
sd0(ncr0:6:0): WIDE SCSI (16 bit) enabled
sd0(ncr0:6:0): 40.0 MB/s (50 ns, offset 15)
sd0: 4134MB, 8205 cyl, 6 head, 171 sec, 512 bytes/sect x 8467200 sectors
de0 at pci0 dev 11 function 0
de0: interrupting at irq 11
de0: 21140A [10-100Mb/s] pass 2.0
de0: address 00:a0:cc:6a:0c:a4
ATI Technologies product 0x4755 (VGA display, revision 0x9a) at pci0 dev 12 function 0 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atapibus0 at wdc0
wd0 at wdc0 drive 0: <ST31220A>
wd0: using 16-sector 16-bit pio transfers, lba mode
wd0: 1033MB, 2116296 sec, 512 bytes/sec
npx0 at isa0 port 0xf0-0xff: using exception 16
vt0 at isa0 port 0x60-0x6f irq 1
vt0: generic, 80 col, color, 4 scr, mf2-kbd, [R3.32]
vt0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0 at isa0 port 0x279: read port 0x203
sb1 at isapnp0 port 0x220/16,0x330/2,0x388/4 irq 5 drq 1,5
sb1: Creative SB AWE64 PnP Audio: dsp v4.16
audio0 at sb1
isapnp0: <Creative SB AWE64 PnP, CTL7002, PNPB02F, Game> port 0x200/8 not configured
isapnp0: <Creative SB AWE64 PnP, CTL0022, , WaveTable> port 0x620/4 not configured
apm0 at mainbus0: Power Management spec V1.1
apm0: A/C state: on
apm0: battery charge state: no battery
biomask 4440 netmask 4c40 ttymask 4cc2
boot device: sd0
root on sd0a dumps on sd0b
WARNING: old BSD partition ID!
WARNING: old BSD partition ID!
uvm_swap: allocated 256 swap buffer headers
de0: enabling 10baseT port
de0: enabling 100baseTX port
wd0: no disk label

>How-To-Repeat:
	See above
>Fix:
	Unknown



>Audit-Trail:
>Unformatted: