[Samba] Probably a stupid question about smbfs and smb.conf.

Urban Widmark urban at teststation.com
Thu Sep 5 00:01:02 GMT 2002


On Wed, 4 Sep 2002, Kris Kelley wrote:

> So, really I have two questions.  1, does smbmount require smb.conf?  2,
> are there ways to tweak performance of an smbfs client, and if so, is
> there related documentation?

smb.conf is not required. I think your own test clearly shows that, no?

But smbmount does pick default values from it, for workgroup, socket
options, debug level and a few others. All the ones I know of also have
mount options to match, example from the smbmount manpage:

       sockopt=<arg>
              sets  the  TCP  socket  options.  See  the smb.conf
              socket options option.


Not sure what you are trying to optimise (read/write/latency/throughput). 

The 2.4 smbfs network code goes back a long time and is not the greatest.
It can be very unfair if you have multiple simultaneous users and because
it will only have one request active at any one time it degrades a lot
when round trip time increases.

If you are looking at raw transfer speed, here is a silly example on
2.4.19 on an otherwise idle switched 100Mbps network, win2k server,
700MHz PIII, reading a file that's probably in cache on the server:

$ ls -l /mnt/smb/TS122.0/DB2/NODE0000/CATN0000/20020607/104221.001
... 146833408 Jun  7 10:43 ...
$ time cp /mnt/smb/TS122.0/DB2/NODE0000/CATN0000/20020607/104221.001 /dev/null
0.030u 2.600s 0:23.71 11.0%     0+0k 0+0io 126pf+0w

146833408 / 23.71 = 6192889.4 byte/s, so I read at about 6MB/s.

My smb.conf includes this line:
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
(not sure why that is in there or if it does any good ...)


2.5 contains changes that make it more fair with multiple users. I have
also been playing with readahead support and merging adjacent read request
into larger ones. I don't have any numbers for that yet.

/Urban




More information about the samba mailing list