[Samba] Samba performance

Linda Walsh samba at tlinx.org
Fri Jun 3 10:54:06 MDT 2011


Juan Pablo wrote:
> Thanks a lot for the advice. It will run these tests and try to find meaningfull 
> information from them. I will post back results.
> 
> Thanks
> 
> Juan Pablo
----
	What type of speeds are you expecting?

	With a GB network, your limit is 125MB/s.   I get that
with writes, but max out @around 119MB/s on reads due to the 
not being able to have 'overlapping reads'...;-)...

	I found to get max performance, I had to adjust the network
params in both linux and windows.

	If I'm totally missing some point, I don't get it.
	
	I notice you are trying to use network bonding.  I had problems
getting network bonding to work correctly.

	have you tried sniffing with 'wireshark'?   Maybe look for 
duplicate packets or retries?   To get optimal speeds you need '0 dups'
and '0 retries'...

	I've only been able to optimize a single Gb ethernet connection.
A bonded pair -- even direct from server to Win7 of matched Intel dual-port
G-Pro cards gave lower performance than a single wire.

	It's odd though, with smbclient -- I'd think that would use
'lo0'  (no?)  I'd think that would get better.   

	I noticed in the test below use of 8MB files.  70MB/s would be
a good speed for reading those over the net.  My best raw speeds were using
16-256MB on multi-gig files.   But opening single files ... I'd try
opening them all first, then sending the data, so you are measuring
data perf.

	My maximum write perf was done to a file (from windows)
using:
CF="notrunc,nocreat"; OF=direct
"dd if=/dev/zero of='file' bs=16M count=128 oflag=$OF conv=$CF"


Optimizing the network settings on both the linux server and win7 client
gave me another ~20-30%.

I wouldn't trust my testing now, though, as I recently upgraded, and can't
even get nmbd to run...(sigh)...
1 step forward, 3 steps back!....


> ________________________________
>>
>> Test type    Local (dd)             Local (smbclient)             Window 7
>> Case1        161                          101                                  
> 
>>    63
>> Case2        122                          119                                  
> 
>> 68
>>
>> Case1: Read 1000 files 8 MByte each
>> Case2: 4 processes each reading 1000 files of 8 MByte each
>>
>> Any idea how can I debug where the bottleneck is or why I get so low numbers 
>> when reading from Windows?
> 
> strace the smbd process with strace -ttT. Network trace.
> Look at "netstat -nt" while the test is running. Send/Recv
> queues full? Run top, is the CPU fully busy? There's no
> silver bullet for performance tuning unfortunately, sorry.
> 
> Volker
> 


More information about the samba mailing list