Bug 1643 - Samba 3.0.6 is very very slow in file transfert
Samba 3.0.6 is very very slow in file transfert
Product: Samba 3.0
Classification: Unclassified
Component: File Services
All Windows XP
: P3 normal
: none
Assigned To: Jeremy Allison
Samba QA Contact
: 1942 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2004-08-21 07:49 UTC by Laurent PELLISSIER
Modified: 2005-08-24 10:18 UTC (History)
2 users (show)

See Also:

lgo from samba server for short file (52.29 KB, text/plain)
2004-08-25 01:15 UTC, Peter Bodnar
no flags Details
debug from samba server for long file (>16k) (52.21 KB, text/plain)
2004-08-25 01:16 UTC, Peter Bodnar
no flags Details
log from samba server v3.0.5 - long file (over 16k) (206.01 KB, text/plain)
2004-08-31 05:36 UTC, Peter Bodnar
no flags Details
log from samba server v3.0.5 - short file (41.49 KB, text/plain)
2004-08-31 05:39 UTC, Peter Bodnar
no flags Details
tcpdump capture of 3.0.5, "ls; get mirror" (8.90 KB, application/octet-stream)
2004-09-01 09:05 UTC, Christoffer Hammarström
no flags Details
tcpdump capture of 3.0.6, "ls; get mirror", hang, ctrl-c (8.72 KB, application/octet-stream)
2004-09-01 09:06 UTC, Christoffer Hammarström
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent PELLISSIER 2004-08-21 07:49:25 UTC
I use Samba 2 and then 3.0.1 ... 3.0.6 on a server for years. Everything works
fine until I upgrade from 3.0.5 to 3.0.6. I've compiled Samba 3.0.6 as I do
usually : ./configure --with-nis --with-smbmount && make && make install
Nothing else has changed on the server (neither smb.conf). When I transfer files
from a WinXP computer to the Linux samba server the transfert is very very slow
(at least ten times slower than with Samba 3.0.5 with the same WinXP PC). I
downgrade Samba back to 3.0.5  and everything works fine again. The server is a
Dell PowerEdge 2300 running Linux Mandrake 9.1 with nss_ldap, NIS ypbind and LVM
on ext2fs filesystems.
I have the same problem on another Dell PowerEdge 2400 server with roughtly the
same Linux and Samba config.
Both servers use Linux Trustees ACL (http://trustees.sf.net) without change for
Comment 1 Peter Bodnar 2004-08-25 00:18:14 UTC
I install new samba 3.0.6, and cannot read (resp reading is time-outed) from 
WinXP (win98 works fine) from samba shared disks. 
I cannot downgrade back to 3.0.5 because samba generate error: 
[2004/08/25 08:57:02, 0] passdb/pdb_tdb.c:tdbsam_tdbopen(201) 
  TDBSAM version unknown: 2 
[2004/08/25 08:57:02, 0] passdb/pdb_tdb.c:tdbsam_getsampwnam(427) 
  pdb_getsampwnam: Unable to open TDB passwd (/var/lib/samba/passdb.tdb)! 
samba is unusable for normal work 
Comment 2 Peter Bodnar 2004-08-25 00:51:54 UTC
same problem occurred, when accessing samba 3.0.6 from linux box via smbfs and 
smbclient, transfer stop after receiving 16k of data, sending working fine 
directory listing working form small directories (I think it is related with 
16k limit) 
Comment 3 Peter Bodnar 2004-08-25 01:14:32 UTC
next testing (with samba log level=9): 
when copying short file (shorter then 16k), file is transfered, but connection 
is not closed - client is still waiting, connection must be closed 
(interrupted) manually (debug-short_file.log) 
when copying long file (>16k), transfer stopped after 16k, must be interrupted 
Comment 4 Peter Bodnar 2004-08-25 01:15:44 UTC
Created attachment 618 [details]
lgo from samba server for short file
Comment 5 Peter Bodnar 2004-08-25 01:16:42 UTC
Created attachment 619 [details]
debug from samba server for long file (>16k)
Comment 6 Brad Spencer 2004-08-30 17:34:04 UTC
I can confirm the same basic problem.  samba-3.0.6 is terrbly broken when 
talking to XP SP1.  I use debian and had to downgrade to samba-3.0.5.  I'm using 
debian unstable, and I was able to downgrade because I only have a minimal 
setup, so I blew away all my .tdb files and remade them as necessary.

The symptoms are obvious: XP just hangs in blocking network calls for minutes; 
it seems to be waiting for some samba response that never comes.  The same 
happens in XP command consoles.  Again, no configuration changes at all.  Simply 
switching to the 3.0.5 packages fixed all the problems I was experiencing.

The following debian bug id seems related:

Comment 7 Volker Lendecke 2004-08-30 21:55:22 UTC
Could you add sniffs of 3.0.5 compared to 3.0.6 for the same operations? The log
file does not really show any reason why the client disconnects.

Comment 8 Peter Bodnar 2004-08-31 05:36:42 UTC
Created attachment 623 [details]
log from samba server v3.0.5 - long file (over 16k)

ok, here is log from 3.0.5 version samba server with same log level (level 5)
same operation (pruduction system, same configuration like in buggy 3.0.6
Comment 9 Peter Bodnar 2004-08-31 05:39:31 UTC
Created attachment 624 [details]
log from samba server v3.0.5 - short file
Comment 10 Volker Lendecke 2004-08-31 05:50:10 UTC
Sorry, but I did not mean 'log file' but 'sniff'. To take a sniff you need to
install the tcpdump program and run:

tcpdump -i <eth0> -n -s 1500 -w /tmp/sniff.cap host <client-ip>

Replace <eth0> with the interface name your client comes via, and replace
<client-ip> with the client's IP address. Then restart Samba, retry the
operation that fails. Then stop the tcpdump program. /tmp/sniff.cap should
contain the data we need.

Comment 11 Peter Bodnar 2004-08-31 05:59:13 UTC
ok, but I must install samba 3.0.6 to other server (i can't break work in 
office), so it take some time... 
Comment 12 Christoffer Hammarström 2004-09-01 09:05:13 UTC
Created attachment 631 [details]
tcpdump capture of 3.0.5, "ls; get mirror"
Comment 13 Christoffer Hammarström 2004-09-01 09:06:13 UTC
Created attachment 632 [details]
tcpdump capture of 3.0.6, "ls; get mirror", hang, ctrl-c
Comment 14 Peter Bodnar 2004-09-16 00:42:13 UTC
from debian bugs 
all reported problems was spoted on servers running kernel 2.4.20 (vanilla or 
patched) - me too. 
after upgrading to 2.4.27, resp. 2.6.8 kernel, all working fine, without any 
problem. I think, this problem is kernel related (resp. networking in kernel 
Comment 15 Volker Lendecke 2004-09-16 01:08:28 UTC
Your last comment triggers something: Could you do us a favor and try 2.4.20
with 'use sendfile = no'?

Comment 16 Peter Bodnar 2004-09-16 01:47:25 UTC
ok, but i have 2.4.20 only on main server, so i can restart it after workhours 
(approx. 19:00 CEST  - 8 hours from now) 
(I can't install it on other machine, it is compiled directly for server hw, 
but i try to found 2.4.20 kernel from archives) 
Comment 17 Peter Bodnar 2004-09-16 03:36:46 UTC
last news: I was installed 2.4.20 kernel on my laptop with samba 3.0.6 - 
problem appeared as was expected 
with parameter use sendfile = no , all working fine 
do you need tcpdump captures ? 
Comment 18 Gerald (Jerry) Carter 2004-09-16 05:38:15 UTC
Jeremy, please add the necessary tests to configure.in to black 
list sendfile on 2.4.20.  Thanks.
Comment 19 Björn Jacke 2004-10-16 15:55:21 UTC
*** Bug 1942 has been marked as a duplicate of this bug. ***
Comment 20 Gerald (Jerry) Carter 2005-02-08 08:01:35 UTC
fixed.  please test 3.0.11
Comment 21 Gerald (Jerry) Carter 2005-08-24 10:18:18 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.