[Samba] Miserable read performance (factor ~60 too slow)

Arno Schäfer arno_schaefer at gmx.de
Fri Jul 6 13:26:36 GMT 2007


Andy, you're a genius. I tried it with a different card (VIA Rhine 
VT86C100A), and sure enough, it works like a charm.

It appears that I am not the only one who has had this problem with the 
ASUS onboard ethernet controller (Realtek RTL8111/8168B PCI Express 
Gigabit Ethernet). By now, I have found several other reports with 
similar problems.

I get the feeling the autonegotiation of that chip is broken. I tried 
putting a switch between the router and the server, but even that does 
not help. Or maybe there is a bug in the Linux device driver.

For the record, here is what ethtool says:

/root> ethtool eth0
Settings for eth0:
         Supported ports: [ TP ]
         Supported link modes:   10baseT/Half 10baseT/Full
                                 100baseT/Half 100baseT/Full
                                 1000baseT/Full
         Supports auto-negotiation: Yes
         Advertised link modes:  10baseT/Half 10baseT/Full
                                 100baseT/Half 100baseT/Full
                                 1000baseT/Full
         Advertised auto-negotiation: Yes
         Speed: 100Mb/s
         Duplex: Full
         Port: Twisted Pair
         PHYAD: 0
         Transceiver: internal
         Auto-negotiation: on
         Supports Wake-on: pumbg
         Wake-on: g
         Current message level: 0x00000033 (51)
         Link detected: yes

Looks normal to me. The router unfortunately does not provide this 
information, and there is no option for changing the port speed.

thanks again for your help.

Best Regards,

Arno


Andrew Morgan wrote:
> On Thu, 5 Jul 2007, Arno Schäfer wrote:
> 
>> Hi,
>>
>> I am trying to migrate my files from a Windows XP Pro box to a new 
>> server running OpenSuSE 10.2/Linux 2.6.18 (x86_64) and Samba 3.0.25b.
>>
>> The Server is a new Athlon 64 X2 4000+/1GB with two 400GB SATA disks 
>> in a software RAID1 configuration. The share file system is reiserfs 
>> on a 350GB RAID1 partition.
>>
>> I have a small LAN with three PCs on 100MBit Ethernet and a Laptop on 
>> WLAN on a 4 Port Switch/WLAN/DSL router.
>>
>>
>> I am experiencing extremely (an I really mean EXTREMELY) bad 
>> performance. It is so bad that it can not have anything to do with 
>> performance "tuning", it must be a configuration error somewhere.
>>
>> Doing some comparisons, I find that
>>
>> - copying a 700MB file from the CIFS share of the Windows XP box to a 
>> different Windows PC starts immediately and takes about two minutes.
>>
>> - copying the same file via HTTP from the new Samba server takes a 
>> little more than one minute (10.5 MB/sec).
>>
>> - copying the file from the Samba share varies hugely. It can take 
>> between 90 seconds and literally hours (!).
>>
>> - sometimes it goes faster, but almost always the startup time is 
>> between 20 and 90 seconds, that is the time before the copying even 
>> begins.
>>
>> - I have found repeatedly that when I am copying a file from the Samba 
>> share, and it goes extremely slow (estimated time 90 minutes), and I 
>> start copying a second file (from the same or a different PC), 
>> suddenly the copying speeds up to "normal" speed.
>>
>> ifconfig does not show any collisions or errors, and as I said, 
>> copying via HTTP is extremely fast.
>>
>> The Linux installation is as barebones as I could make it, no X11, no 
>> firewall (for now), no ZENWorks or AppArmor or anything. I already 
>> once reinstalled everything from scratch, to no avail.
>>
>> Any ideas would be immensely appreciated, as I am seriously 
>> considering going back to Windows XP ;-)
> 
> You have an Ethernet duplex mismatch between your server and the switch 
> port.  Based on the symptoms you describe, your server is probably at 
> full duplex and the switch port is at half duplex.
> 
>     Andy

-- 
Arno Schäfer
IT-Beratung & Softwareentwicklung

PHP - Java - Web-Anwendungen
Linux/Unix - MySQL - Hochverfügbarkeit - Security

Hainer Trift 38 - 63303 Dreieich
mailto: arno_schaefer at gmx.de
Tel. +49-6103-699967 | Mobil +49-171-7939236


More information about the samba mailing list