Hi, I use a disk space inventory tool called TreeSizePro to scan file filesystems on windows and linux boxes. On Linux systems I export these shares via samba to scan them. TreeSizePro is multi-threaded (32 crawlers) and I run it on windows 7. I am scanning file systems that are local to the linux servers and also nfs mounts that are re-exported via samba. If I scan a windows 2008 server I can scan many millon files in about 1 hour, If I do the same thing with samba it takes more than 1 day. It takes longer to scan to re-exported nfs share than the local share but not a whole lot so I must assume the bottleneck lies within samba. (I can also crawl the nfs mount really fast) How can I make samba fly? How can I improve this metadata performance? I don't care about stability, I just want to maximize performance. We don't have a slow or a badly configured network. I compiled samba 3.6.9 on a plain ubuntu 12.04 box and searched the web for some performance improvement suggestions, not sure if the config below makes any sense. ./configure --with-aio-support --enable-pthreadpool --prefix=/opt/samba --with-ads /root # cat /opt/samba/lib/smb.conf [global] workgroup = FH netbios name = copycat min protocol = SMB2 max protocol = SMB2 #log level = 1 # performance enhancements strict locking = no max xmit = 65535 deadtime = 15 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 [tmp] path = /tmp read only = no [shared] path = /shared read only = yes follow symlinks = no wide links = no
On Fri, Nov 16, 2012 at 04:27:40PM -0800, Di Pe wrote:> > If I scan a windows 2008 server I can scan many millon files in about > 1 hour, If I do the same thing with samba it takes more than 1 day. It > takes longer to scan to re-exported nfs share than the local share but > not a whole lot so I must assume the bottleneck lies within samba. (I > can also crawl the nfs mount really fast) How can I make samba fly? > How can I improve this metadata performance? I don't care about > stability, I just want to maximize performance. We don't have a slow > or a badly configured network.Log a bug and upload a2 wireshark traces. One to Windows, one to Samba. Not promising we can fix anything but at least we can then see what the difference might be. Remove NFS from the equation completely, just upload local file traces please.> # performance enhancements > strict locking = noRemove the 2 settings below. They are smb.conf voodoo bullsh*t :-). Haven't been needed for about 10 years and removing them will almost certainly help. Don't try and tune TCP better than the kernel, it knows what it's doing.> max xmit = 65535 > socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536Jeremy.