Samba – FreeBSD: Samba performance over GBit-Ethernet

freebsdperformancesamba

I'm using a FreeBSD NAS with RAID-Z.

I can read ~300MB/s from the ZFS disks to /dev/null on the box, but only get about 50MB/s over GBit-Ethernet with SMB to Windows 7 (Samba 3.5.6). Both systems have Intel-PCIe-NICs and are connected directly.

Samba is configured to use AIO and I already tried to tune TCP/IP:

kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=1048576
net.inet.tcp.recvspace=1048576
net.inet.tcp.sendbuf_max=8388608
net.inet.tcp.recvbuf_max=8388608
net.inet.tcp.delayed_ack=0

Any ideas what's causing the bottleneck? I think the link should handle 100 MB/s easily.

Best Answer

Okay, there actually were two problems:

  1. Jumbo frames weren't so irrelevant after all. That gave me a huge performance boost.
  2. My SSD disk can easily write 100 MB/s, but I recently turned on NTFS compression which created problems (second long stalls while writing). A TRIM optimization resolved that.