Arno Schäfer
2007-Jul-04 22:48 UTC
[Samba] Miserable read performance (factor ~60 too slow)
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 ;-) Best Regards, Arno Here is my smb.conf: [global] workgroup = MSHEIMNETZ printing = cups printcap name = cups printcap cache time = 750 cups options = raw map to guest = Bad User include = /etc/samba/dhcp.conf logon path = \\%L\profiles\.msprofile logon home = \\%L\%U\.9xprofile logon drive = P: usershare allow guests = Yes add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$ domain logons = No domain master = No security = share netbios name = FILESERVER2 [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @ntadmin root force group = ntadmin create mask = 0664 directory mask = 0775 [share] comment = share path = /share read only = No guest ok = Yes browsable = Yes -- Arno Sch?fer IT-Beratung & Softwareentwicklung PHP - Java - Web-Anwendungen Linux/Unix - MySQL - Hochverf?gbarkeit - Security Hainer Trift 38 - 63303 Dreieich mailto: arno_schaefer@gmx.de Tel. +49-6103-699967 | Mobil +49-171-7939236
Steve Platt
2007-Jul-05 08:17 UTC
[Samba] Miserable read performance (factor ~60 too slow)
I'm curious - do you see an unusually high TCP retransmission rate during these slow transfers? You may need to look on the "Server" first ... I think the command is something like "netstat -s" and look in the TCP section. Steve
Denis Vlasenko
2007-Jul-05 10:14 UTC
[Samba] Miserable read performance (factor ~60 too slow)
On Thursday 05 July 2007 00:48, Arno Sch?fer wrote:> - 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.Run tcpdump and watch what is going on the wire. This very likely to give more info: you will see retransmits, or data being sent in very small packets, or big spans of nothing being sent... strace -p <smbd process pid> can also be useful. -- vda
Oliver Schulze L.
2007-Jul-05 16:21 UTC
[Samba] Miserable read performance (factor ~60 too slow)
Could it be the disk? Can you do a: hdparm -t /dev/sda Then benchmark your XP disk with www.hdtune.com HTH Oliver 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 ;-) > > Best Regards, > > Arno > > > Here is my smb.conf: > > [global] > workgroup = MSHEIMNETZ > printing = cups > printcap name = cups > printcap cache time = 750 > cups options = raw > map to guest = Bad User > include = /etc/samba/dhcp.conf > logon path = \\%L\profiles\.msprofile > logon home = \\%L\%U\.9xprofile > logon drive = P: > usershare allow guests = Yes > add machine script = /usr/sbin/useradd -c Machine -d > /var/lib/nobody -s /bin/false %m$ > domain logons = No > domain master = No > security = share > netbios name = FILESERVER2 > > [printers] > comment = All Printers > path = /var/tmp > printable = Yes > create mask = 0600 > browseable = No > [print$] > comment = Printer Drivers > path = /var/lib/samba/drivers > write list = @ntadmin root > force group = ntadmin > create mask = 0664 > directory mask = 0775 > > [share] > comment = share > path = /share > read only = No > guest ok = Yes > browsable = Yes >-- Oliver Schulze L. | http://tinymailto.com/oliver Asuncion - Paraguay | http://www.solojuegos.mobi
Andrew Morgan
2007-Jul-05 17:47 UTC
[Samba] Miserable read performance (factor ~60 too slow)
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