Performance Tuning advice [just diag advices]

Jim Morris Jim at Morris.net
Sun Nov 15 04:01:17 GMT 1998


Jan Kratochvil wrote:
> 
>   Tried to increase them further? Maximum should be 32767/65535 depending
> on your 'IP: Allow large windows (not recommended if <16Mb of memory)'
> CONFIG_SKB_LARGE kernel configuration parameter.

Well... initially I thought that changing the SO_RCVBUF and SO_SNDBUF to
4096 helped the reads of server files. However,  I just spent some time
dong benchmarks with the SO_SNDBUF/RCVBUF set to values of 2048, 4096,
8192, 16384 and 32768.

I tried the tcpdump stuff you suggested - I've used tcpdump previously
to track down network problems.  I basically was able to confirm that
yes - there is a lot of netbios-ssn related data flowing back and forth,
and that a lot of the packets are ack'ed by the Win95 box...  Guess I
don't know what to look at to see if there's a problem, or what I would
do if there were...

It turns out the the best value that gives good all around performance
is around 8192 - which I think might be close to the default anyway. 
Here are my results with various buffer sizes:

SO_RCVBUF |   Samba   |   Samba 
SO_SNDBUF |   Reads   |   Writes
----------|-----------|------------
  2048    | 472 KB/s  |  314 KB/s
  4096    | 529 KB/s  |  282 KB/s
  8192    | 545 KB/s  |  451 KB/s
 16384    | 442 KB/s  |  416 KB/s
 32768    | 371 KB/s  |  472 KB/s

The numbers are for a copying a large directory tree from a Win95
client, using XCOPY32.  When you get down to it, these numbers are
actually a little lower than I had before I started messing with the
socket buffer options - at that point, I was getting about 529KB for
writes, and about 500KB for reads.  I get 800-900KB/sec for ftp
transfers between the same machines - I know a filesystem will not be as
fast as that, but I've read in the archives and docs where others claim
to get Samba performance within about 100KB/sec of FTP performance.

I've even tried changing to a copy of Samba 2.0.0 Beta 1, but didn't see
much difference. Since this is slated to be in a production environment
as of late Monday night (literally - a steel mill type production
environment), I decided to back off to the released version of Samba,
installed using the RPM - I don't expect this client to be doing much in
the way of source code compiles himself, although installing an RPM as
an upgrade won't be beyond reason.

I guess I just had higher hopes for throughput with Samba on a server
with this caliber of hardware under Linux.  I've been playing with the
tuning of Samba for more than a day now, and really haven't gotten
anywhere.

Guess I'll just hope the client doesn't complain that its slower than
the NT server I'm replacing with this Linux/Samba combo....

Thanks for the advice. Wish there were some magic wand I could wave over
Samba to make the performance as high as NT or Netware! ;-)  Or a Win95
box acting as a server for that matter.  Personally, I *know* that the
stability and reliability of a Samba on Unix solution far outweigh the
raw speed advantage of other servers options (NT anyway - Netware is a
good server solution).  Problem is always convincing users of that, when
all they care about day-to-day is how fast the server is...

Later...
-- 
/-------------------------------\
| Jim Morris  |  jim at morris.net |
\-------------------------------/


More information about the samba mailing list