2004-03-29 18:22:23

by walt

[permalink] [raw]
Subject: Via-Rhine ethernet driver problem?

Hi, Roger et al,

ECS K7VTA3 motherboard with built-in ethernet chip:

00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
Subsystem: VIA Technologies, Inc. VT6102 [Rhine II] Embeded Ethernet Controller on VT8235
Flags: bus master, medium devsel, latency 32, IRQ 11
I/O ports at ec00 [size=256]
Memory at e9041000 (32-bit, non-prefetchable) [size=256]
Capabilities: [40] Power Management version 2

The problem is terrible performance -- I noticed that NFS file transfers grind
to a complete halt almost immediately on this machine.

I also discovered by using 'scp' to copy files between machines that the bad
performance is assymetrical: copying a file *to* this machine runs at about
half-speed (5 MB/sec) whereas copying a file *from* this machine runs at
45 KiloB/sec, about one percent of expected.

The reason I feel this is software and not hardware is that the same machine
running any of the BSD's runs full-speed in both directions.

The 2.4.x and 2.6.x drivers appear to be the same and they behave the same,
as you might expect.

I'd be happy to supply any other information that might be helpful.

Thanks!


2004-03-29 18:37:13

by Roger Luethi

[permalink] [raw]
Subject: Re: Via-Rhine ethernet driver problem?

On Mon, 29 Mar 2004 09:24:25 -0800, walt wrote:
> ECS K7VTA3 motherboard with built-in ethernet chip:
>
> 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev
> 74)
>
> [...]
>
> I also discovered by using 'scp' to copy files between machines that the bad
> performance is assymetrical: copying a file *to* this machine runs at about
> half-speed (5 MB/sec) whereas copying a file *from* this machine runs at
> 45 KiloB/sec, about one percent of expected.
>
> The reason I feel this is software and not hardware is that the same machine
> running any of the BSD's runs full-speed in both directions.

If you have ACPI and/or IO-APIC enabled, does the behavior change if
you turn them off? Any info in the kernel log? If not, what if you
change the driver's debug level to 3? Is the slow transfer rate
the result of short, fast bursts or actual sustained throughput at
45 KB/sec?

Roger

2004-03-29 18:40:53

by Janne Pikkarainen

[permalink] [raw]
Subject: Re: Via-Rhine ethernet driver problem?

On Mon, 2004-03-29 at 20:24, walt wrote:
> Hi, Roger et al,
>
> ECS K7VTA3 motherboard with built-in ethernet chip:
>
> 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
> Subsystem: VIA Technologies, Inc. VT6102 [Rhine II] Embeded Ethernet Controller on VT8235
> Flags: bus master, medium devsel, latency 32, IRQ 11
> I/O ports at ec00 [size=256]
> Memory at e9041000 (32-bit, non-prefetchable) [size=256]
> Capabilities: [40] Power Management version 2
>
> The problem is terrible performance -- I noticed that NFS file transfers grind
> to a complete halt almost immediately on this machine.
>
> I also discovered by using 'scp' to copy files between machines that the bad
> performance is assymetrical: copying a file *to* this machine runs at about
> half-speed (5 MB/sec) whereas copying a file *from* this machine runs at
> 45 KiloB/sec, about one percent of expected.
>
> The reason I feel this is software and not hardware is that the same machine
> running any of the BSD's runs full-speed in both directions.

Hello,

I'm trying to take some load off from actual kernel developers and doing
just a small check: is your NIC in full duplex mode while in Linux?
Please check it with mii-tool or ethtool. This sounds like a half-duplex
problem for me...


Best Regards,

Janne Pikkarainen

2004-03-30 14:02:16

by walt

[permalink] [raw]
Subject: Re: Via-Rhine ethernet driver problem?

Roger Luethi wrote:
> On Mon, 29 Mar 2004 09:24:25 -0800, walt wrote:
>
>>ECS K7VTA3 motherboard with built-in ethernet chip:
>>
>>00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev
>>74)
>>[...]
>>I also discovered by using 'scp' to copy files between machines that the bad
>>performance is assymetrical: copying a file *to* this machine runs at about
>>half-speed (5 MB/sec) whereas copying a file *from* this machine runs at
>>45 KiloB/sec, about one percent of expected.


> If you have ACPI and/or IO-APIC enabled, does the behavior change if
> you turn them off?

I did have both -- no difference when I turned them both off.

> Any info in the kernel log? If not, what if you
> change the driver's debug level to 3?

This is debug=4 since debug=3 didn't put out much:
Mar 30 04:27:58 k9 kernel: via-rhine.c:v1.10-LK1.1.19-2.5 July-12-2003 Written by Donald Becker
Mar 30 04:27:58 k9 kernel: http://www.scyld.com/network/via-rhine.html
Mar 30 04:27:58 k9 kernel: via-rhine: Reset succeeded.
Mar 30 04:27:58 k9 kernel: eth0: VIA VT6102 Rhine-II at 0xe9041000, 00:0d:87:a2:ce:02, IRQ 11.
Mar 30 04:27:58 k9 kernel: eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.
Mar 30 04:27:58 k9 kernel: eth0: MII PHY found at address 2, status 0x8000 advertising 0000 Link 8000.
Mar 30 04:27:58 k9 kernel: eth0: MII PHY found at address 3, status 0x8000 advertising 0000 Link 8000.
Mar 30 04:27:58 k9 kernel: eth0: MII PHY found at address 4, status 0x8000 advertising 0000 Link 8000.
Mar 30 04:28:37 k9 kernel: eth0: via_rhine_open() irq 11.
Mar 30 04:28:37 k9 kernel: eth0: Reset succeeded.
Mar 30 04:28:37 k9 kernel: eth0: Done via_rhine_open(), status 081a MII status: 786d.
Mar 30 04:28:37 k9 kernel: eth0: VIA Rhine monitor tick, status 0000.
Mar 30 04:29:17 k9 last message repeated 4 times
Mar 30 04:29:37 k9 last message repeated 2 times
Mar 30 04:29:44 k9 kernel: eth0: exiting interrupt, status=00000000.
Mar 30 04:29:44 k9 last message repeated 25 times
Mar 30 04:29:47 k9 kernel: eth0: VIA Rhine monitor tick, status 0000.
Mar 30 04:29:49 k9 kernel: eth0: exiting interrupt, status=00000000.
Mar 30 04:29:57 k9 last message repeated 543 times
[much more snipped]


> Is the slow transfer rate
> the result of short, fast bursts or actual sustained throughput at
> 45 KB/sec?

Just from watching the lights on the ethernet hub I would say that it
is bursting. Is there a more accurate way to tell?

Thanks for the quick response!

BTW, this is from ethtool:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Current message level: 0x00000004 (4)
Link detected: yes

2004-06-18 19:39:46

by Björn Schmidt

[permalink] [raw]
Subject: Re: Via-Rhine ethernet driver problem?

walt wrote:

[...]

> I also discovered by using 'scp' to copy files between machines that the
> bad
> performance is assymetrical: copying a file *to* this machine runs at
> about
> half-speed (5 MB/sec) whereas copying a file *from* this machine runs at
> 45 KiloB/sec, about one percent of expected.

I have exactly the same problem on a asrock k7vt2 with VIA's Rhine II:

megabyte:~# uname -a
Linux megabyte 2.6.7 #1 Fri Jun 18 20:37:37 CEST 2004 i686 GNU/Linux

=================================================================

megabyte:~# lspci -v
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102
[Rhine-II] (rev 74)
Subsystem: VIA Technologies, Inc. VT6102 [Rhine-II]
Flags: bus master, medium devsel, latency 64, IRQ 11
I/O ports at dc00
Memory at dffffe00 (32-bit, non-prefetchable) [size=256]
Capabilities: [40] Power Management version 2

==================================================================

up down
100baseTx-FD: ~45 kB/s ~100 MBit/s
100baseTx: ~45 kB/s ~100 MBit/s
10baseT-FD: ~45 kB/s ~10 MBit/s
10baseT: ~10 MBit/s ~10 MBit/s



--
Greetings
Bjoern Schmidt