RTL-8139 100Mb ethernet NICs do <1.5MB/s

Discussion in 'Linux Networking' started by A. Netizen, Jul 21, 2005.

  1. A. Netizen

    A. Netizen Guest

    I have 2 boxes connected with a crossover ethernet cable, an RTL-8139D at
    each end. I get < 1.5 MB/s transfer rate (using wget or scp).
    The same boxes were previously connected with 10Mb/s cards, and got 1.0MB/s.
    How can I improve the performance? What do you get?

    dmesg:
    Linux version 2.6.12.2
    eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

    lspci:
    0000:00:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
    Subsystem: Lite-On Communications Inc: Unknown device 3104
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 32 (8000ns min, 16000ns max)
    Interrupt: pin A routed to IRQ 10
    Region 0: I/O ports at a000
    Region 1: Memory at e0100000 (32-bit, non-prefetchable)

    ifconfig:
    RX packets:62518 errors:0 dropped:0 overruns:0 frame:0
    TX packets:43032 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
     
    A. Netizen, Jul 21, 2005
    #1
    1. Advertisements

  2. ["Followup-To:" header set to comp.os.linux.networking.]
    The last time I saw something like this was either a) a dodgy
    network card or connection (cable ok?) b) a b0rken kernel module.
    Use mii-tool to be sure that the nic is running at 100.

    Davide
     
    Davide Bianchi, Jul 21, 2005
    #2
    1. Advertisements

  3. Try forcing the cards to use the same connection speed (100Mbit, full
    duplex) using mii-tool. I've seen terrible performance (worse than what
    you're seeing, even) when cards failed to autonegotiate properly.
     
    John-Paul Stewart, Jul 21, 2005
    #3
  4. Which nic module? I have had occasional problems with packet loss when
    using Dlink DFE-530TX+ nics with 8139too (they would not work at all with
    rtl8139 module which the system picked by default). The only solution I
    found was to slow them down with: mii-tool -A 10baseT-FD,10baseT-HD eth0
    (or whichever interface),
     
    David Efflandt, Jul 21, 2005
    #4
  5. A. Netizen

    A. Netizen Guest

    2 boxes connected with a crossover ethernet cable, an RTL-8139D at
    8139too 0.9.27, as included with linux-2.6.12.2

    Thanks for all the responses so far...


    I've messed with mii-tool, mii-diag, rtl8139-diag, ethtool, and
    dos utils (RSET8139.EXE network tests of both initiator & responder
    were error free).

    mii-tool eth0
    eth0: negotiated 100baseTx-FD flow-control, link ok

    ../mii-diag eth0
    Basic registers of MII PHY #32: 1100 782d 0000 0000 05e1 45e1 0001 0000.
    The autonegotiated capability is 01e0.
    The autonegotiated media type is 100baseTx-FD.
    Basic mode control register 0x1100: Auto-negotiation enabled.
    You have link beat, and everything is working OK.
    Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.
    End of basic transceiver information.

    ../rtl8139-diag says
    Receiver configuration: Normal unicast and hashed multicast
    Rx FIFO threshold 2048 bytes, maximum burst 2048 bytes, 32KB ring
    Transmitter enabled with NONSTANDARD! settings, maximum burst 1024 bytes.
    Tx entry #0 status 0008a072 complete, 114 bytes.
    Tx entry #1 status 0008a062 complete, 98 bytes.
    Tx entry #2 status 0008a062 complete, 98 bytes.
    Tx entry #3 status 0008a1a2 complete, 418 bytes.
    Flow control: Tx enabled Rx enabled.
    The chip configuration is 0x10 0xcc, MII full-duplex mode.
    No interrupt sources are pending.
    ...
    The RTL8139 does not use a MII transceiver.
    It does have internal MII-compatible registers:
    Basic mode control register 0x1100.
    Basic mode status register 0x782d.
    Autonegotiation Advertisement 0x05e1.
    Link Partner Ability register 0x45e1.
    Autonegotiation expansion 0x0001.
    Disconnects 0x0000.
    False carrier sense counter 0x0000.
    NWay test register 0x0704.
    Receive frame error count 0x0000.


    Is the "NONSTANDARD! settings" line significant? I haven't changed any
    settings from default since most recent boot.

    /var/log/debug
    20:31:01 bx1 kernel: rtl8139_init_board: PIO region size == 0x100
    20:31:01 bx1 kernel: rtl8139_init_board: MMIO region size == 0x100
    20:31:01 bx1 kernel: rtl8139_init_board: chipset id (1950351360) == index 8, 'RTL-8100B/8139D'
    20:31:01 bx1 kernel: rtl8139_init_board: PCI PM wakeup
    20:31:01 bx1 kernel: rtl8139_init_one: about to register device named eth%%d (cd594400)...
    20:31:01 bx1 kernel: eth0: Identified 8139 chip type 'RTL-8100B/8139D'
    20:31:01 bx1 kernel: PCI: Setting latency timer of device 0000:00:11.5 to 64
    20:31:01 bx1 kernel: rtl8139_hw_start: init buffer addresses
    20:31:01 bx1 kernel: __set_rx_mode: eth0: rtl8139_set_rx_mode(1002) done -- Rx config 0000f78a.
    20:31:01 bx1 kernel: __set_rx_mode: eth0: rtl8139_set_rx_mode(1003) done -- Rx config 0000f78a.
    20:31:01 bx1 kernel: __set_rx_mode: eth0: rtl8139_set_rx_mode(1003) done -- Rx config 0000f78a.
    20:31:01 bx1 kernel: __set_rx_mode: eth0: rtl8139_set_rx_mode(1003) done -- Rx config 0000f78e.
    20:31:02 bx1 last message repeated 4 times
    20:31:02 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:31:02 bx1 last message repeated 2 times
    20:31:02 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:31:02 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current 0000 BufAddr 0044, free to fff0, Cmd 0c.
    20:31:02 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:31:02 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:31:02 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current 0044 BufAddr 00b0, free to 0034, Cmd 0c.
    20:31:03 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:31:07 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:31:07 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:31:07 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current 00b0 BufAddr 00f4, free to 00a0, Cmd 0c.

    during transfer of bzip'd file:
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current b99c BufAddr b9e8, free to b98c, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 2 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current b9e8 BufAddr ba34, free to b9d8, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current ba34 BufAddr ba80, free to ba24, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 4 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current ba80 BufAddr bacc, free to ba70, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 5 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bacc BufAddr bb18, free to babc, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 4 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bb18 BufAddr bb64, free to bb08, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 5 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bb64 BufAddr bbb0, free to bb54, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 4 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bbb0 BufAddr bbfc, free to bba0, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 6 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bbfc BufAddr bc48, free to bbec, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 10 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bc48 BufAddr bc94, free to bc38, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 11 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bc94 BufAddr bce0, free to bc84, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 12 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bce0 BufAddr bd2c, free to bcd0, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 4 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bd2c BufAddr bda8, free to bd1c, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 11 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bda8 BufAddr bdf4, free to bd98, Cmd 0c.
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0000.
    20:44:46 bx1 last message repeated 14 times
    20:44:46 bx1 kernel: rtl8139_interrupt: eth0: exiting interrupt, intr_status=0x0001.
    20:44:46 bx1 kernel: rtl8139_rx: eth0: In rtl8139_rx(), current bdf4 BufAddr be40, free to bde4, Cmd 0c.
     
    A. Netizen, Jul 22, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.