3c90x "overruns" causing severe network slowdown

3c90x "overruns" causing severe network slowdown

Post by Carl Pet » Fri, 06 Dec 2002 01:18:08



I've got an old PC (fast 486/slow pentium, unsure) that's had a new lease of life as our firewall, web server and SAMBA server.  Used 3com 3c905C-TX card as the LAN-facing NIC as it's
a fast 100Mb/s card and the hub and other PCs (Windoze boxes) are all 100Mb compatible.  Interface to rest of the teaching hospital and then on to the internet is via a bog-standard
NE2k compatible NIC that works fine (although only 10Mb/s of course but that's fine).

The setup basically works but saving files onto the box is crawlingly slow.  Rates of 500kb/s or less via SAMBA and even slower (50kb/s) via FTP (so I can be sure that the problem is
low-level networking, not Windoze or SAMBA).

Loading files from the server using any technology is very fast.

Looking at diagnostics the one thing that's obvious is that on "/sbin/ifconfig eth1"...

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

RX packets:1149326 errors:0 dropped:0 overruns:20921 frame:0

TX packets:1239052 errors:0 dropped:0 overruns:0 carrier:1

collisions:0 txqueuelen:100

RX bytes:398014948 (379.5 Mb)  TX bytes:778774691 (742.6 Mb)

Interrupt:9 Base address:0xfe80

..the "OVERRUNS" figure on the "RX" section keeps going up, it's about 2% of the total packets received.  If each time a packet is lost then the whole sequence of TCP packets has to
start from the beginning again (a RESET packet is sent? not much of a TCP expert!) then that means that potentially a 100-300k file (typical for my users) might get quite difficult to
save - this is what the samba logs reflect with several attempts to save files.

Have tried both Donald Becker's 3c5x9.o and 3c90x.o drivers as provided pre-compiled in my SuSE 7.2 distro exactly the same problem with both.  (Also I've tried downloading the driver
from 3Com's site and compiling it - that one worked well for about 20 seconds then disconnected from the network completely!!)

My limited understanding might suggest a problem with either a hardware conflict (?) or the driver or the card.  The card was fine in the previous machine it was in (Win2k Pro box),
the hardware is PCI and "bus mastering" which I understand means that the network traffic is saved directly into RAM so IRQs are needed less and even on a reasonably busy machine there
should be no overruns??

Have searched FAQs and net to no avail.  Can anyone help?
(real email address is carl then the at sign then bookmanassociates.com, no spam please!!!)

Carl Peto

 
 
 

3c90x "overruns" causing severe network slowdown

Post by William Par » Fri, 06 Dec 2002 06:39:37



> The setup basically works but saving files onto the box is crawlingly
> slow.  Rates of 500kb/s or less via SAMBA and even slower (50kb/s) via
> FTP (so I can be sure that the problem is low-level networking, not
> Windoze or SAMBA).

Hmm, 0.5MByte/s disk write is kind of slow, but not unrealistic for 486
with old IDE disk.  

- Check 'hdparm' of the harddisk to see if DMA is enabled, since that
  parameter will have the most impact.  

- Put the harddisk on its own cable.

--

Linux solution for data management and processing.

 
 
 

3c90x "overruns" causing severe network slowdown

Post by Carl Pet » Sun, 08 Dec 2002 03:12:24


William,

Interesting, thanks.

I have two disks in the server...

desdemona:/usr/src/linux/drivers/net # mount
/dev/hda3 on / type ext2 (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda1 on /home type ext2 (rw)
/dev/sda2 on /database type ext2 (rw)
/dev/hda1 on /boot type ext2 (rw)
shmfs on /dev/shm type shm (rw)

desdemona:/usr/src/linux/drivers/net # hdparm /dev/hda

/dev/hda:
 multcount    = 32 (on)
 I/O support  =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 nowerr       =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 1023/64/63, sectors = 4127760, start = 0

desdemona:/usr/src/linux/drivers/net # hdparm /dev/sda

/dev/sda:
 readonly     =  0 (off)
 geometry     = 1023/33/61, sectors = 2061108, start = 0

One of my users confirmed that network shares located on the IDE disk are
much slower to save than those on the SCSI disk which is what you'd expect
from what you've said.  Although even the SCSI disk is still noticably slow
on save (but not on read).  The SCSI disk shares a cable with a CD-ROM drive
that is virtually never used, by the way.

The IDE disk already has it's own cable but the harddisk controller is on an
expansion card that is plugged into an ISA slot, which can't be helping.

Also DMA is not enabled as you can see.

The only problem with this theory is that saving files to either hard disk
directly when in linux is virtually instantaneous (fraction of a second).
Guess it could be cacheing or something?  Although the sync command returns
instantly too.

Thanks,

Carl

(My real email is carl at bookmanassociates.com, no spam please - violators
will be reported to their ISPs!)



> > The setup basically works but saving files onto the box is crawlingly
> > slow.  Rates of 500kb/s or less via SAMBA and even slower (50kb/s) via
> > FTP (so I can be sure that the problem is low-level networking, not
> > Windoze or SAMBA).

> Hmm, 0.5MByte/s disk write is kind of slow, but not unrealistic for 486
> with old IDE disk.

> - Check 'hdparm' of the harddisk to see if DMA is enabled, since that
>   parameter will have the most impact.

> - Put the harddisk on its own cable.

> --

> Linux solution for data management and processing.

 
 
 

3c90x "overruns" causing severe network slowdown

Post by William Par » Sun, 08 Dec 2002 08:00:03



> /dev/hda:
> multcount    = 32 (on)
> I/O support  =  0 (default 16-bit)
> unmaskirq    =  0 (off)
> using_dma    =  0 (off)
> keepsettings =  0 (off)
> nowerr       =  0 (off)
> readonly     =  0 (off)
> readahead    =  8 (on)
> geometry     = 1023/64/63, sectors = 4127760, start = 0

First, try
    hdparm -d1 /dev/hd[ad]
    hdparm -t -T /dev/hda
Mine gives around 200MB/s and 30MB/s.  You can turn off/on the DMA
manually, but you should really let the kernel do it.  So, compile in
appropriate chipset support.

Quote:> /dev/sda:
> readonly     =  0 (off)
> geometry     = 1023/33/61, sectors = 2061108, start = 0

Well, 'hdparm' does not apply to SCSI.

Quote:> One of my users confirmed that network shares located on the IDE disk are
> much slower to save than those on the SCSI disk which is what you'd expect
> from what you've said.  Although even the SCSI disk is still noticably slow
> on save (but not on read).  The SCSI disk shares a cable with a CD-ROM drive
> that is virtually never used, by the way.

> The IDE disk already has it's own cable but the harddisk controller is on an
> expansion card that is plugged into an ISA slot, which can't be helping.

Old SCSI, old IDE, they are all slow.  ISA... well, there you go.  

Quote:

> Also DMA is not enabled as you can see.

> The only problem with this theory is that saving files to either hard disk
> directly when in linux is virtually instantaneous (fraction of a second).
> Guess it could be cacheing or something?  Although the sync command returns
> instantly too.

Solution:
    - replace IDE disk with another SCSI disk.
    - throw away the whole machine.

--

Linux solution for data management and processing.

 
 
 

3c90x "overruns" causing severe network slowdown

Post by Stuart Le » Tue, 10 Dec 2002 06:10:38



>I've got an old PC (fast 486/slow pentium, unsure) that's had a new
>lease of life as our firewall, web server and SAMBA server.  Used
>3com 3c905C-TX card as the LAN-facing NIC as it's a fast 100Mb/s card
>and the hub and other PCs (Windoze boxes) are all 100Mb compatible.
>Interface to rest of the teaching hospital and then on to the
>internet is via a bog-standard NE2k compatible NIC that works fine
>(although only 10Mb/s of course but that's fine).

>The setup basically works but saving files onto the box is crawlingly
>slow.  Rates of 500kb/s or less via SAMBA and even slower (50kb/s)
>via FTP (so I can be sure that the problem is low-level networking,
>not Windoze or SAMBA).

I've had mysterious problems with some 3c905 cards -- I think they
are mis-negotiating full/half duplex with the local switch.  The
user-level symptom is extremely poor throughput, probably because lots
of packets are being lost.  And the throughput might well be very
different when most of the data is flowing one way rather than the
other.

In some (not all) cases, using the 3Com 3c90x driver has helped, but I
see you've tried that.

Before doing something drastic like switching disks or scrapping your
PC, do try a different type of network card, even a cheap one.

   Stuart Levy