[Samba] Samba -> WinXP: slow transfers, partial solution

Alexander Tsvyashchenko lists at ndl.kiev.ua
Mon Apr 16 20:27:45 GMT 2007


Hello Charles,

>> file transfers from Samba to WinXP SP2 clients: the speed is   
>> varying, but is about 1-2Mb/s at best.
>
> I'm assuming for the rest of this that you mean MB/sec not Mb/sec when
> referencing transfer speeds...

Yes, that is correct, sorry for confusion.

>> b) Transfering to/from Samba server from Gentoo Linux on the same   
>> PC where WinXP is installed (so, completely the same hardware and   
>> connection) is also at normal speed.
>
> So, you are running something in a VM?

No, I just have both WinXP and Gentoo Linux installed on client,  
booted first in WinXP and then in Gentoo and tested for each of them  
transfer speeds
to Samba on server.

>> c) Transferring to/from WinXP to the server where Samba is   
>> installed using any other protocol (such as HTTPS or SCP) is also   
>> at normal speed.
>
> Define 'normal'...

More or equal to 10 MB/s, see trace logs in my original letter, SCP  
speed is listed in the last trace log.

>> 3) If there is any other network activity, transfer speed is   
>> increased up to normal level: f.e. doing two simulteneous transfers  
>>  from Samba server to WinXP client gives 5Mb/s at each transfer, as  
>>  expected.
>
> Again, define 'normal'?
> 100Mb network connections should give @ 12MB/sec transfer speeds, no?
> So 5MB/sec speeds are certainly not 'normal'.

They are, as 5+5=10, transfers are done _simultaneously_. 10MB/s is of  
course less than 12MB/s, but I do not consider 10MB/s speed, including  
protocol
overhead, to be particularly slow.

> TCP dumps are fine, but you neglected to provide the most important
> thing for initial troubleshooting assistance: where is your config?

As I've experimented a lot with different config options, I do not  
really think that there's still left smth related to speed I missed to  
try, and also it doesn't look like misconfiguration issue, as I've  
used as the basis default smb.conf provided in Gentoo distribution,  
but you're right - I cannot be sure as I'm not really experienced with  
Samba, sorry about that. My config is attached in the end of e-mail.

>> 5) Playing with "socket options" does not give any results.
>
> Modern linux kernels (2.6+) do *not* need to have these values tuned,
> so it is recommended to not set them *at* *all*. Just delete these
> entries.

Yes, I read these options should not be needed, but if you read my  
original e-mail till the end, you should have noticed there options  
*did* play role in my setup.

>> Specifically, using advices from the article   
>> http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html   
>> about SO_SNDBUF does not improve situation (but read below).
>
> Well, since this article is dated from 2000, I don't think I'd trust it much.

That's correct, but this is the only information I was able to find  
initially that seemd to be more or less relevant to my problem :-(

>> 7) I've tested several WinXP clients with different hardware, all   
>> with the same results.
>
> What about the NIC on the Samba server? If all clients are affected the
> same, then that is the NIC you should focus on (if it is indeed a
> hardware issue).

Theorecitally, this *could* be the possibility, but I doubt this is  
hardware issue, as the problem seems to happen in very particular  
environment - if there were problems with NIC, I would expect at least  
some sign of it in other applications, but there is none. I did not  
state it in the original e-mail, but "hardware" statistic, listed by  
ifconfig for the interface is fine - no collisions, errors, or  
whatever. The NIC on server is on-board Realtek RTL8111B (Gigabit),  
using default Linux Realtek 8169 driver, all options are by default,  
communication with clients happens through BCM5325e switch (100 Mbit),  
which is part of Asus Wl-500g Deluxe router, also no problems noted  
there.

> I think you need to go back to square one, and start over, but with up
> to date references - like the excellent 'Samba-3 By Example' and/or
> 'The Official Samba-3 HOWTO and Reference Guide'.

While I can agree that everyhing is possible, I do not think I was  
lucky enough to screw the default config that much ;-) As you can see  
from my config, the main changes there were authentication-related, to  
use LDAP server, and changes related to PDC. I cannot be 100% sure,  
but I do not see the way how use of LDAP server or PDC-related options  
could lead to particularly high number of TCP packets retransmissions  
in communication between client and Samba ...

Here's the config. LDAP user/group managing scripts are not specified  
in config as I've configured all users/groups once and there should be  
no changes in foreseeable future. ***text*** denotes my specific site  
information.

============smb.conf=================
[global]
workgroup = ***WORKGROUP-NAME***
netbios name = ***SERVER-NAME***
server string =  PDC [on Gentoo :: Samba server %v]

printcap name =
load printers = no
printing =

log file = /var/log/samba/log.%m
max log size = 50
log level = 3

hosts allow = 192.168.1. 127.

map to guest = bad user

security = user
encrypt passwords = yes


# !!!!!!!!!!!!!!!!!!!!
# Working range for SO_SNDBUF with WinXP registry patches is 1404 - 1872
# !!!!!!!!!!!!!!!!!!!!
#socket options = TCP_NODELAY SO_SNDBUF=1500

interfaces = eth0 lo

local master = yes
os level = 65
domain master = yes
preferred master = yes

domain logons = yes
logon script = login.bat
logon path =
logon home =

passdb backend = ldapsam:ldaps://localhost
ldap admin dn = cn=Manager,dc=***my-site-dc-specification***
ldap suffix = dc=***my-site-dc-specification***
ldap machine suffix = ou=computers
ldap user suffix = ou=accounts
ldap group suffix = ou=groups

name resolve order = host bcast

wins support = yes

dns proxy = no

dos charset = 866
unix charset = KOI8-U

[homes]
    comment = Home Directories
    path = /home/%U
    browseable = no
    valid users = %S
    guest ok = no
    inherit permissions = yes
    writable = yes

[btg]
   comment = BTG working place
   path=/usr/share/btg
   browsable = yes
   guest ok = no
   writable = yes

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = no
writable = no
browseable = no
============smb.conf=================

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the samba mailing list