RES: RES: Very Slow Samba

Michael Powell nightrecon at verizon.net
Fri Aug 15 18:05:42 UTC 2008


Mauro Ribeiro - Class Consultoria e Assessoria wrote:

> Hi Derek,
> 
> I didn't have any Intel boards here for spare, but i Found a HP
> PCI-Express 1x Giga Ethernet here.
> 
> It's a broadcom chipset, I did replace the card but still with the same
> problem. I also did a very deep research in google and found more people
> with the same problem and everyone of them without a solution.
> 
> I guess that it's a issue between Samba and FreeBSD. I do say that 'cuz on
> Linux+Samba (Debian Kernel+Samba.deb) this issue does not appear.
> 
> Anyway, If you have another idea.
> 
[snip]

Yes - don't use the Realtek. They are OK for low end things like home ADSL,
but when stressed will generally only give you about half the throughput of
a real NIC.

Don't know if this will help, but I believe the default buffer sizes to be
way too small. This, for example purposes, from my smb.conf:

max xmit = 65535
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=65535 SO_RCVBUF=65535

This was also in conjunction with some tuning in /etc/sysctl.conf. If the
above changes the behavior, you might also look at some tuning numbers like
below and see if adjusting them helps. YMMV.

kern.ipc.maxsockbuf=2097152
kern.ipc.nmbclusters=32768
kern.ipc.somaxconn=4096
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768

These should only be used as "food for thought" examples. What values may be
of benefit to you will most likely be specific to your situation.

Also I have/use:        use sendfile = Yes

I have never had Samba perform exactly the same as Windows Server 2003, it
has always been just a tad slower. One thing to figure out though, is if it
is disk limited, network limited, or some combination of both. IF the disk
subsystem is just way too slow it won't matter what you fiddle with in
network land. You may find what you really need is a faster disk subsystem.

-Mike




More information about the freebsd-questions mailing list