slow samba performance even after tuning
Radu Coroi
coroi_test at yahoo.com
Wed Feb 26 23:41:04 UTC 2014
Hi all,
My home server is a HP Microserver N40L (spec at http://n40l.wikia.com/wiki/Base_Hardware_N40L) with 6GB of RAM running freebsd 10.0 installed on a flash drive.
Unfortunately the samba performance is quite bad sitting at 40MBps where NFS is at 70MBps and 106MBps for FTP on the same test file at 1.5GB on top of one ZFS file. The poor performance doesn't allow for a full hd playback.
I've tried both samba36 and samba41 and AIO and applied the recommendations from the http://lists.freebsd.org/pipermail/freebsd-stable/2011-February/061642.html but still the same results.
In the same time smbd process cpu usage never goes above 15% like it is somehow not getting enough priority and not sure if this is due to a missing parameter or the fact that is running from the flash drive.
I have the following additions :
[radu at hp ~]$ cat /boot/loader.conf
# We use Samba built with AIO support; we need this module!
aio_load="yes"
geom_journal_load="YES"
kern.maxfiles="25000"
# Set TXG write limit to a lower threshold. This helps "level out"
# the throughput rate (see "zpool iostat"). A value of 256MB works well
# for systems with 4 GB of RAM, while 1 GB works well for us w/ 8 GB on
# disks which have 64 MB cache. <<BR>>
# NOTE: in <v28, this tunable is called 'vfs.zfs.txg.write_limit_override'.
vfs.zfs.write_limit_override=792723456
$ cat /etc/sysctl.conf
# $FreeBSD: release/10.0.0/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
vfs.zfs.prefetch_disable=1
# Increase send/receive buffer maximums from 256KB to 16MB.
# FreeBSD 7.x and later will auto-tune the size, but only up to the max.
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
# Double send/receive TCP datagram memory allocation. This defines the
# amount of memory taken up by default *per socket*.
net.inet.tcp.sendspace=65536
net.inet.tcp.recvspace=131072
In /usr/local/etc/smb.conf
....
socket options = TCP_NODELAY SO_SNDBUF=131072 SO_RCVBUF=131072
use sendfile = no
min receivefile size = 16384
aio read size = 16384
aio write size = 16384
aio write behind = yes
Please help me tune the samba so I can match most of the NFS performance so I can use it for watching full hd movies.
Thank you very much,
Radu
More information about the freebsd-questions
mailing list