[Samba] No increased throughput with SMB Multichannel and two NICs

L.P.H. van Belle belle at bazuin.nl
Wed Sep 7 08:14:13 UTC 2016

Hai Daniel, 

Did you think about partitioning and block sizes and alignments of the partition which is very important also. 

For example, i use better partition sized to match the use of the files
Like : 
ISO files on a 4MB block sized partition. 
MP3 files go on a 1MB block sized partition.
Normal offices documents on a 4kb blocksize sized partition.

The effect if this ( and i tested this ) 
I can read/write with 110MiB/s ( full 1Gb speed )
I get that when i copy from/to linux/windows with iso files on optimzed partition. 

The same file on a 1Mb blocksized, does about the same 90-105 MiB/s 
The same file on a 4Kb blocksized, does about the same 80-90 MiB/s
These partitions are on a soft raid 1 setup, 5.4RPM HDD's. 
The disk have a max of about 160-180Mb/s 
The os is on a SSD. 
Tested with samba 4.4.5 with as simple setup (stand alone server)

Checking if the partition is aligned with blocksize helps also a lot. 
So before you continue changing things in samba, i suggest you the most important thing first. 

Check you partition alignments on linux and windows.
A good reference for linux 

and a handy free windows tool to check. 



> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens Daniel
> Vogelbacher via samba
> Verzonden: woensdag 7 september 2016 1:10
> Aan: samba at lists.samba.org
> Onderwerp: Re: [Samba] No increased throughput with SMB Multichannel and
> two NICs
> On 07.09.2016 00:18, Jeremy Allison via samba wrote:
> > On Tue, Sep 06, 2016 at 11:53:04PM +0200, Daniel Vogelbacher via samba
> wrote:
> >>> Delete all the crap above first :-).
> >>>
> >>> Then start trying to copy locally to the tmpfs share to see what
> >>> the max local copy speed it.
> >>>
> >>
> >> Now I have:
> >>
> >> server multi channel support = yes
> >> vfs objects = aio_pthread,recycle
> >> aio read size = 1
> >> aio write size = 1
> >> strict locking = No
> >>
> >> But read (linux->windows) transfer rate is now again 1GBit/s instead of
> >> 2GBit/s?!
> >
> > OK, very strange. But at least you can now
> > add in the things I told you to remove one
> > by one to see which one I was wrong about :-).
> >
> > Don't keep adding, add one - then remove and
> > add another until we discover which makes
> > the difference (if it's indeed one, which
> > I'm guessing) !
> >
> Okay, just after dozens of windows reboots, it works now for read/write
> in both directions without changing the smb config.
> One small issue: for small files <5GiB the whole transfer is done at
> ~210MiB/s. For larger files, after a few seconds (>10sec) the throughput
> is reduced to ~70MiB/s. Source and Destination is a tmpfs/ramdisk, so
> this should only related to networking.
> There are plenty of tutorials around "how to tune your fileserver" with
> net.core.rmem_max & others. Can you recommend any values for these
> sysctls or have an idea why the speed is reduced?
> Regards
> Daniel Vogelbacher
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list