Hi All, We are experiencing painfully slow performance when transferring many small files via Samba. We are currently running Samba 4.5.1, although based on my searches the version doesn't seem to make any difference and this is a long standing problem. The servers, both the primary file server and the testbed, have dual bonded 10Gb NICs and the client network is 1Gb. Using a test directory of about 6,700 files, totalling about 200MB, the speed starts off almost reasonable but quickly slows down, ending up at around 3.5MB per second, in either direction. Testing from both Windows and Linux clients shows no discernible difference. When using NFS, SFTP, rsync, etc. the transfer happens so fast that it's difficult to time. Large files also transfer quickly. Based on my searches I've been playing around with a number of settings. The testbed right now has the following options added to the basic smb.conf: socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=32768 SO_SNDBUF=32768 read raw = yes write raw = yes strict locking = no min receivefile size = 16384 use sendfile = yes aio read size = 16384 aio write size = 16384 strict allocate = yes None of these options have made even the slightest difference. Playing around with the numeric values has at times caused the performance to deteriorate but never improve on not using these parameters at all. Equally, some other settings being suggested as a solution in Google searches have made absolutely no difference. Is there anything else I can try that might actually improve performance? Perhaps something I missed in my searches? Or is this just a Samba issue that looks like never going away? regards, John
On Mon, Jan 09, 2017 at 09:39:31AM +1100, John Gardeniers via samba wrote:> We are experiencing painfully slow performance when transferring many small > files via Samba. We are currently running Samba 4.5.1, although based on my > searches the version doesn't seem to make any difference and this is a long > standing problem.SMB performance critically depends on the client. What client are you using?> Based on my searches I've been playing around with a number of settings. The > testbed right now has the following options added to the basic smb.conf: > > socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=32768 > SO_SNDBUF=32768 > read raw = yes > write raw = yes > strict locking = no > min receivefile size = 16384 > use sendfile = yes > aio read size = 16384 > aio write size = 16384 > strict allocate = yesJust get rid of all these options, in particular the socket options. Replace them with aio read size = 1 aio write size = 1 and that's it. What't your network latency (ping time)? That's a lot more critical than raw bandwidth. Volker
Hi Volker, Thanks for the response. The clients are Win 7, Win 10 and various flavours of Linux, with Samba client versions ranging from 3.6 to 4.5.3. There is no perceptible difference between any of them. Network latency is never above 0.2s and mostly sits at around 0.1s. If that's a problem it is so only for Samba. I did as you suggested with the smb options but that just made it worse. Using the same test environment and file set, the final speed dropped from average of around 3.5MB/s to an average of about 3.0MB/s over a series if test runs. Again, the OS, and therefore the client version, made no difference. I guess I won't be using those settings in production. regards, John On 09/01/17 18:00, Volker Lendecke wrote:> On Mon, Jan 09, 2017 at 09:39:31AM +1100, John Gardeniers via samba wrote: >> We are experiencing painfully slow performance when transferring many small >> files via Samba. We are currently running Samba 4.5.1, although based on my >> searches the version doesn't seem to make any difference and this is a long >> standing problem. > SMB performance critically depends on the client. What client are you > using? > >> Based on my searches I've been playing around with a number of settings. The >> testbed right now has the following options added to the basic smb.conf: >> >> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=32768 >> SO_SNDBUF=32768 >> read raw = yes >> write raw = yes >> strict locking = no >> min receivefile size = 16384 >> use sendfile = yes >> aio read size = 16384 >> aio write size = 16384 >> strict allocate = yes > Just get rid of all these options, in particular the socket options. > Replace them with > > aio read size = 1 > aio write size = 1 > > and that's it. > > What't your network latency (ping time)? That's a lot more critical > than raw bandwidth. > > Volker > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________