[linux-cifs-client] Re: Slow transfer with mount.cifs

Steve French smfltc at us.ibm.com
Sat Dec 31 22:38:05 GMT 2005


Shrinking the socket RCVBUFFER will probably hurt performance.

A few obvious things to try to narrow down the performance issues -
    1) does mounting with "forcedirectio" mount option improve the 
performance
(this bypasses the page cache, reducing memory usage, on the client but 
will be slower if the data is reused
by the application).  In conjunction with increasing the default buffer 
size (which is an insmod parms
for cifs.ko - try "/sbin/modprobe cifs.ko" to see more details) this can 
also allow cifs to use larger than
the default sizes (4 pages ie 16K for reads and one page ie 4K for 
writes).  More recent cifs than what you have
allows 52K writes (13 pages) rather than 4K writes - cifs 1.39a e.g. may 
help a lot with write sizes.

An extra memory copy and bufalloc has also been eliminated in the read 
path in recent cifs.

On older kernels like you that which you were using the testing I have 
tried showed about 20% link utilization
for the case of single process, large file writes and two or three times 
better for reads due to the bigger buffer
(depends on link speed, latency and some other factors) - obviously that 
is better now with larger writes
but still won't reach 80% or more utilization on gigabit due to a couple 
factors holding current
cifs implementation back on very fast links (such as gigabit ethernet) 
in particular that cifs only
sends one request on the wire at a time causes dead time on the wire 
waiting for acks.  Multiprocess
or multithreaded cases can do somewhat better of course.   

The cifs server implementation can be a problem too - so that is worth 
checking.   I find that
getting a network trace of the link from a third machine or - comparing 
network traces
on the client and server of a large file copy to server (and similarly 
from server) is the
easiest way to tell which is the more important problem - client or 
server delay.

There are some details of performance analysis profiling that I have 
added to the
Linux cifs client at:
http://marc.theaimsgroup.com/?l=linux-cifs-client&m=112984422914324&w=2

>Hi,
>I recently bought a NAS (network attached storage). This only supports
>ftp and smb/cifs. I can mount this device with no problems using cifs or
>smbfs, but the transferrate is far below of ftp.
>While transfering files using ftp I get rates of about 8-10mb/s but with
>cifs/smbfs I only get 1,5mb/s.
>As I intend to use this as a backup device this speed is not tolerable.
>Here are some specs to the "client system" running linux:
>Kernel 2.6.14.3
>Samba: 3.0.14a-3 (debian)
>smbfs: 3.0.14a-3 (debian)
>
>Using any options like SND_RCVBUFFER=8192 did not bring any performance
>increase whatsoever.
>
>Can you point me in a direction how to debug this slow speed?
>
>
>Cheers and thanks,
>Nicki
>
>- --
>  
>



More information about the linux-cifs-client mailing list