[Samba] Supporting multiple clients -- per machine/os config?

Matt Staroscik matt at wrongcrowd.com
Tue Nov 18 08:06:13 GMT 2003


Short version: Different clients need different socket options to perform 
well. Can I point to a different smb.conf file as a function of the client 
name or OS?

Long version follows for the masochists!

At home I run a mixed-client network, and I am having problems configuring 
my smb.conf to support them all equally well. I am able to create shares, 
and I can browse them, but file transfers can be very slow depending on my 
SO_SNDBUF and SO_RCVBUF settings. Unfortunately the magic numbers fall into 
2 categories for different clients!

My server is FreeBSD 4.9, with Samba 2.2.8 (compiled from the ports 
collection). I have fiddled with smb.conf and figured out this pattern:

Client 1: WinXP. Best RCV/SNDBUF = 8192.
Client 2: PocketPC over 802.11b. Likes the same settings as WinXP.
Client 3: Mac OS X 10.3 over 802.11g, Best with RCV/SENDBUF left out of 
config. (what is the default anyway?)
Client 4: Xbox (which USED to work and now it is very slow -- go figure...)

Note 1: I have determined that TCP_NODELAY and IPTOS_LOWDELAY at least 
cause no harm, and they are always set.

Note 2: The wireless is not a factor, I have conducted tests with the Mac 
wired as well and the results are the same.

Note 3: Browsing is always fast even if transfers suck.

If there is something I can do to make all my clients happy that would be 
great. But if I could set up a config file per machine name or OS, that 
would work too. I think I have seen tangential references to this but I 
haven't been able to Google up any solid examples. Am I on the right track?

Or, is there something I can do to the Samba conf on the Mac that will make 
it talk to Samba on FreeBSD better? (On the client, is smb.conf even used? 
Where can I set client buffers?)

Oh, I cranked the log up to 10, and didn't see anything that looked relevant.

I have attached my global config w/ the irrelevant comments stripped.

Thanks for any pointers!

- Matt

--------------------------

[global]

workgroup = SHADOW

netbios name = SERVER

# related to Master Browser
domain master = no
local master = no
preferred master = no
os level = 0

#Other Stuff
dead time = 15
keepalive = 30
getwd cache = yes


    server string = Samba server

    hosts allow = 192.168.1. 127.

interfaces = 192.168.1.1 127.0.0.1
bind interfaces only = true

   guest account = matt

    log file = /var/log/smblog.%m
    log level = 2

# Put a capping on the size of the log files (in Kb).
    max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
    security = share

   encrypt passwords = yes

# BUF 8192 better than 65536. 16384 sucks too. 4096 sucks. 8192 best so far
# TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192: PC OK, poor Mac speed
# TCP_NODELAY only - best for mac
# 16384 - tolerable for mac bad for pc

# this is best for windows clients
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192

### holding ###
#IPTOS_LOWDELAY IPTOS_THROUGHPUT
# SO_RCVBUF=65536 SO_SNDBUF=65536
# SO_RCVBUF=8192 SO_SNDBUF=8192 IPTOS_LOWDELAY IPTOS_THROUGHPUT
###############

    dns proxy = no 




More information about the samba mailing list