Link to home
Avatar of blokeman
blokemanFlag for Australia

asked on

What is the most optimal samba config for speed and browsing?

I've read some experts advise (IT4SOHO at EE included) that mention if you have a samba network with Win 2000 clients or later then you can use this in your smb.conf file.
smb ports = 445
Apparently this is more efficient (faster?) because the packets don't have the NetBIOS encapsulation overhead, and has helped some people minimise lag when accessing network shares.  Though some users reported setting smb ports to 139 helped too.

?Confused?
HERE IS MY SCENARIO
A single samba server (samba-3.0.36-0.5.5) environment which is a dns server as well, 2 x Win XP Pro, 2 x Vista and 2 x Win 7 Pro pc's....what is the most optimal setup for speed.
Is it recommended to disable netbios on all the pc's?
Should I bother with a WINS server (wins support = yes in smb.conf) at all?
If the server has an entry in dns then all the pc's can still access by name right, so why bother with WINS?
For performance, set smb ports = 445 in smb.conf. Right?

If I did have WINS turned on at the samba server, then to populate the WINS database, netbios needs to be enabled and all pc's pointed to it.  But in this case can I still use "smb ports = 445", or will that break browsing?



SOLUTION
Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of blokeman

ASKER

Those links are pretty good, but none of them mention ports = 445.

So maybe the best way so far is to disable NetBIOS (and browsing), and use 'ports' on the server
In smb.conf:
disable netbios = yes
# we do not need netbios broadcasts for the windows shares so we can disable it. Our clients will be
# told where the share is located. Clients that only support netbios won't be able to see your samba
# server when netbios support is disabled.
ports = 445

and then also disable Netbios (and lmhosts lookup) on the Win pc's as well.  So then the only way they can resolve names is by DNS.

I suppose if netbios is disabled on Windows pc's then the netbios nodetype becomes irrelevant as well.

Anyone else with specific thoughts on the merit of using
ports 445

Please read the article:

https://www.experts-exchange.com/A_3545.html

which explains some SAMBA settings to improve performance for Windows Vista/7 environments.

Dan
IT4SOHO
Hi Dan
I had read that fantastic article previously.  You are a very concise and articulate writer!
I've now read it again, and have a question...

TURNING OFF THE OLD NETBIOS PORTS.
Is this best achieved just at the server with :
ports = 445
disable netbios = ye
s  <--- Is this even necessary if already using ports = 445?
Is it recommended to also disable NetBIOS on all the Windows pcs in their network control panel (under TCP/IP properties)?

With no netBIOS on the server or pc's then network browsing is not possible. Right?
So will this cause any problems?

ASKER CERTIFIED SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Thanks Dan.  You experience and knowledge on this is excellent.

So a Samba upgrade is on the cards for sure with ports = 445.

Dan, just one last query re your statement:
The SMB protocol (that uses port 445) retains all of the same functionality as NetBIOS [...] -- INCLUDING retaining the Microsoft "Browsing" functionality.
With NetBIOS, I did assume that it alone was responsible for enabling browsing, because of  the way that it allows broadcasts or the use of WINS servers to obtain a list of NetBIOS hosts on the network.  By this I mean the list of PCs and servers which can be viewed in Network Neighborhood from a Windows PC.  Yet since Win 2000, Netbios is not needed because of Active Directory (AD) and it's integrated DNS.  So without an AD  server, how do PCs in a samba (SMB2) network obtain a list of computers in their domain (and Network Neighborhood)?
Further to my last comment...Thinking a bit more, maybe in a SMB2 Samba 3.5+ network, this browse list functionality is all coming with Samba 4 and it's AD capabilities.  So for now, do Windows clients (on Samba SMB2) need to know the host name (as opposed to Network Neighborhood) to browse shared resources on that host?  For example by using \\hostname in Windows Explorer.
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
No particular security issue in mind, I just want to optimising Samba for speed and browsing.  

As it looks like using port 445 (SMB2) will provide both speed improvements and browsing functionality, then that is the configuration I'll implement.  I will just read up a bit more on the WINS side of things and enable that on the server.

Thanks again!