[Samba] Transfer speed

Stan Hoeppner stan at hardwarefreak.com
Mon Apr 9 00:11:53 MDT 2012

On 4/8/2012 8:08 PM, Azerty Ytreza wrote:
> Hello,
> I have a little problem which I can't solve with Samba used under Debian
> Squeeze. (version of Samba : 3.5.6)
> I made a transfer speed between Samba server and a samba mount on the same
> PC copy to RAM and the same file directly to RAM.
> 1. HDD to RAM => 105-115Mo/s

Pure HD read speed.

> 2. Shared the same HDD directory with samba and mount to "/media" locally
> with (mount -t smbfs) :
> Samba to RAM => 60-67Mo/s

This isn't a copy to RAM.  You've created a loop from/to the drive
through the samba server and client.  Thus, if you copy from the samba
share to /media, you're reading from the HD and writing to the HD.  So
you're getting about 120MB/s aggregate to/from the drive.  Linux
buffering is likely pumping this number up a bit.  Issue a sync after
the copy command for flush the write to disk and you'll see a more
accurate number.

> 3. From a remote PC under Windows : ~60Mo/s

Obviously GbE.  This low throughput can have a number of causes, most
dealing with network performance, not samba.

> How Samba can divide by almost two the bandwidth ? (105Mo/s HDD and 60Mo/s
> Samba)
> I have already changed that to Samba which have up my bandwidth from
> ~55Mo/s to ~60Mo/s :
> **************************************
> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=262144
> min receivefile size=16348
> use sendfile=true
> aio read size = 643638
> aio write size = 643638
> aio write behind = true
> dns proxy=no
> **************************************

Are you using jumbo frames?  Which NICs?  Which GbE switch?  Using FTP
client on Windows PC, what is your GET transfer rate from the Samba
machine?  If it's less than 80MB/s you may have a network problem.  If
it's over 90MB/s you may still have some Samba tuning to do.  BTW,
60MB/s from Samba to Windows over GbE is pretty damn good.  Many people
can't get over 35-40MB/s with Windows/GbE and Samba

> Someone have an idea how I can increased speed of Samba to almost 100Mo/s ?
> (I can understand than the 10% is lost by different protocol but 40-50% no
> :( )
> 10Gbits should come and can't sustain 1Gbits ? :(

Assuming your future 10GbE network is configured and tuned perfectly,
you'll need a disk that can push over 1,000 MB/s sustained data rate to
fill the 10GbE pipe.  This requires either a large striped array of
spinning rust (more than 14 SATA disks in RAID0), or a smaller array of
fast SSDs (4 in a RAID0).


More information about the samba mailing list