I have a home network set up with ubuntu 8.04 as the gateway pc and a windows pc on the lan. When I try to upload a file to ubuntu I get slow speeds.

smbget from linux: 200kb/s
sftp put from windows: 100kb/s
pscp put from windows: 35 kb/s
ftp put from windows: 856.71Kbytes/s

I have no problems downloading from ubuntu to windows. I get 11.2 MB/s, which I'm quite happy about as the theoretical limit for a 100 Mbit connection is 12.5 MB/s. I get 11.2 MB/s with Windows File Sharing, sftp, pscp and ftp.

This is the result of sudo lshw for the card facing into my network.

*-network
                description: Ethernet interface
                product: RTL-8139/8139C/8139C+
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:03:00.0
                logical name: eth1
                version: 10
                serial: 00:08:54:dd:35:c4
                size: 100MB/s
                capacity: 100MB/s
                width: 32 bits
                clock: 33MHz
                capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=full ip=192.168.0.1 latency=64 link=yes maxlatency=64 mingnt=32 module
=8139too multicast=yes port=MII speed=100MB/s

Dani AI

Generated

This is a systematic, practical checklist to isolate and fix the upload bottleneck you describe. has already shown the obvious asymmetry (downloads fine, uploads slow) and was right to point at duplex/autoneg — start by proving whether the network or the application layer is at fault, then move to driver/hardware.

First, isolate raw TCP performance with iperf (don’t rely on SMB/SFTP/SCP numbers yet). On Ubuntu run a server, on Windows run the client:

# Ubuntu
sudo apt-get install iperf3
iperf3 -s

# Windows (iperf3 binary)
iperf3 -c 192.168.0.1 -t 30    # test client->server
iperf3 -c 192.168.0.1 -R      # test server->client (reverse)

If iperf shows good bidirectional throughput, the problem is at the protocol/server layer (Samba/SSH daemon). If iperf also shows poor upload, proceed to link/driver checks.

Check link, errors and offloads on the Ubuntu gateway:

sudo ethtool eth1            # shows link, speed, duplex
ip -s link show eth1         # rx/tx errors, drops
dmesg | egrep -i '8139|eth1|link|error|collision'
sudo ethtool -k eth1         # supported offloads

To test whether offloading or autoneg is the culprit, temporarily disable large offloads and try again:

sudo ethtool -K eth1 tso off gso off gro off
# (if you must force link—do it on both ends)
sudo ethtool -s eth1 speed 100 duplex full autoneg off

Cautions: forcing speed should be a temporary test only (both ends must match), and disabling offloads is for diagnosis.

Other practical checks: watch CPU/disk during transfers (top, iotop) because SCP/SFTP encrypt and can be CPU-bound; try scp -c aes128-ctr to test cipher impact (or a faster test cipher for diagnosis only). Swap the cable, try a direct PC-to-gateway link (or different switch port), and if possible test with another NIC or updated driver (8139too is old). Summary checklist: 1) iperf, 2) check ethtool stats, 3) disable offloads, 4) force-match duplex as a test, 5) check CPU/disk during encrypted transfers, 6) swap cable/NIC/switch.

Recommended Answers

All 3 Replies

Anyone have a problem like this before? I'm sort of stumped and don't know how to proceed. Maybe the Windows PC's onboard gigabit lan autonegotiated itself to 100Mbit/s down 10Mbit/s up? How do I determine the autonegotiated lan card duplex speed?

Here's a silly question... Have you tried forcing your NIC on the Windows box to run in 'full duplex' mode?

The speed problem is only when going up from the Windows box to the Linux box right? Everything's fine when going from the Windows box to the Linux box?

That sounds like the Windows box may be running at 'half-duplex'. If you check the NIC settings, it's probably set to 'auto-negotiate' or something. Try changing that to full duplex and see if you get different results.

Hope this helps!
-G

I looked around the net and couldn't find an easy way to determine how to get a Windows NIC to report what it's auto-negotiated speed was.

I found out you could check the event logs, Control Panel -> Administrative Tools -> Event Viewer -> System. I found events with source "yukonwxp" that said,

"Port A is up with 100 Mbps"
"Duplex State is Full Duplex"
"Pause Function is Rx and TX"

So my linux and windows machines are both configured with 100 Mbps Full Duplex. I'm not 100% convinced for windows, I need an app that tells me.

I'm beginning to think this is something weird like my $15 Dynex switch is somehow limiting data to the soure PC to 10 Mbps... but that doesn't sound realistic.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.