ZFS + Samba performance

Jan Dušátko jan at dusatko.org
Sun Jan 15 20:11:19 CET 2012


Zdravim,
Omlouvam se za pochybeni, nalezen duvod problemu.
Pricinou byl vadny switch, ktery "se stal asymetrickym". V jednom smeru sla
komunikace 1Gb/s, v opacnem 10Mb/s. Jednalo se o hw problem, switch vymenen.

Kazdopadne, prikladam konfiguraci samby, nastaveni kernelu a interface, o
ktere jsem byl pozadan. Zde jsou dosahovane rychlosti:

TTCP:
	obousmerne mezi 123-124MB/s
FTP: (v zavislosti na zatizeni, duvodem degradace zapisu je dle meho RAID5)
	cteni mezi 123-124MB/s
	zapis mezi 90-100MB/s
SMB: (v zavislosti na zatizeni, duvodem degradace zapisu je dle meho RAID5)
	download 80-100MB/s
	upload 60-80MB/s

HW konfigurace:
	Atom (deska supermicro), 4GB RAM
	Onboard 2x Intel 82574L Gigabit Ethernet
	Areca PCIe, RAID 50 nad 16 disky.

/etc/sysctl.conf
...
	kern.corefile=/var/crash/%N.core
	kern.module_path=/boot/kernel;/boot/modules;/usr/local/modules
	kern.ipc.maxsockbuf=16777216
	kern.ipc.maxsockets=131072
	kern.ipc.nmbclusters=32768
	kern.ipc.shmall=8388608
	kern.ipc.shmmax=67108864
	kern.ipc.somaxconn=8192
	kern.maxfiles=131072
	kern.maxfilesperproc=16384
	kern.maxfilesperproc=65536
	kern.maxproc=16384
	kern.maxvnodes=262144
	kern.threads.max_threads_per_proc=4096
	net.inet.flowtable.enable=1
	net.inet.flowtable.nmbflows=65535
	net.inet.ip.fastforwarding=1
	net.inet.ip.forwarding=1
	net.inet.ip.intr_queue_maxlen=4096
	net.inet.tcp.blackhole=2
	net.inet.tcp.delacktime=100
	net.inet.tcp.delayed_ack=0
	net.inet.tcp.ecn.enable=1
	net.inet.tcp.fast_finwait2_recycle=1
	net.inet.tcp.hostcache.expire=3900
	net.inet.tcp.inflight.debug=0
	net.inet.tcp.inflight.enable=1
	net.inet.tcp.inflight.min=6144
	net.inet.tcp.inflight.min=8192
	net.inet.tcp.local_slowstart_flightsize=10
	net.inet.tcp.local_slowstart_flightsize=128
	net.inet.tcp.local_slowstart_flightsize=16
	net.inet.tcp.maxtcptw=131072
	net.inet.tcp.mssdflt=1460
	net.inet.tcp.nolocaltimewait=1
	net.inet.tcp.path_mtu_discovery=0
	net.inet.tcp.path_mtu_discovery=1
	net.inet.tcp.recvbuf_inc=65536
	net.inet.tcp.recvbuf_max=16777216
	net.inet.tcp.recvspace=131072
	net.inet.tcp.recvspace=16384
	net.inet.tcp.rfc1323=1
	net.inet.tcp.sendbuf_inc=65536
	net.inet.tcp.sendbuf_max=16777216
	net.inet.tcp.sendspace=131072
	net.inet.tcp.sendspace=16384
	net.inet.tcp.slowstart_flightsize=128
	net.inet.tcp.slowstart_flightsize=54
	net.inet.udp.blackhole=1
	net.inet.udp.maxdgram=8192
	net.inet.udp.recvspace=131072
	net.inet.udp.recvspace=16384
	net.inet.udp.sendspace=131072
	net.inet6.icmp6.nodeinfo=0
	net.inet6.icmp6.rediraccept=0
	net.inet6.ip6.accept_rtadv=0
	net.inet6.ip6.auto_linklocal=0
	net.inet6.ip6.prefer_tempaddr=1
	net.inet6.ip6.use_tempaddr=1
	net.local.stream.recvspace=134144
	net.local.stream.recvspace=16384
	net.local.stream.sendspace=134144
	net.local.stream.sendspace=16384
	vfs.read_max=1024
	vfs.zfs.prefetch_disable=0
...

/usr/local/etc/smb.conf
[global]
        workgroup = WORKGROUP
        netbios aliases = SERVER
        server string = SERVER description
        interfaces = em1, lo0
        bind interfaces only = Yes
        null passwords = Yes
        send spnego principal = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        max protocol = SMB2
        max mux = 256
        min receivefile size = 16384
        aio read size = 65536
        aio write size = 65536
        aio write behind = true
        read raw = yes
        write raw = yes
        use sendfile = true
        name resolve order = host wins lmhosts bcast
        time server = Yes
        socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY
IPTOS_THROUGHPUT SO_SNDBUF=131072 SO_RCVBUF=131072
        printcap name = /etc/printcap
        logon script = netlogon.bat
        logon path = \\%N\netlogon
        logon drive = h:
        domain logons = Yes
        os level = 255
        preferred master = Yes
        domain master = Yes
        wins support = Yes
        ldap ssl = no
        default service = netlogon
        remote announce = REMOTE.IP.ADD.RESS/SERVER2
        idmap config * : range =
        idmap config * : backend = tdb
        path = /var/spool/samba
        admin users = @ntadmin
        write list = root, @ntadmin
        inherit acls = Yes
        aio write behind = no
        max print jobs = 256
        locking = No
        oplocks = No
        level2 oplocks = No
...


/etc/rc.conf
...
	ifconfig_em0="DHCP"
	ifconfig_em1="PRIVATE.IP.ADDRESS.RANK-C/24"
	ipv6_enable="YES"
	tcp_extensions="YES"
...

/etc/start_if.em0, /etc/start_if.em1
	/sbin/ifconfig em0 rxcsum txcsum tso lro

/boot/loader.conf
...
	#ZFS Tunning
	vm.kmem_size="512M"
	vm.kmem_size_max="1G"
	vm.kmem_size_min="256M"
	vfs.zfs.prefetch.disable=0
	#NET
	net.inet.tcp.tcbhashsize="4096"
	net.inet.tcp.hostcache.hashsize="1024"
	kern.ipc.nsfbufs="16384"
	#Kernel
	kern.hz=1000
...

Honza



More information about the Users-l mailing list