[Samba] Poor performance on open/copy/close/rename file operations via remote/VPN connection

Udo Rader udo.rader at bestsolution.at
Wed Mar 26 09:23:23 GMT 2008


On Mon, 2008-03-24 at 22:30 +0100, gianfranco pra floriani wrote:
> Hello,
> I have Samba version 3.0.24 running on a 2.6.14-gentoo-r5 x86 kernel 
> (xeon 3ghz, 1gb ram raid 5).
> All clients accessing samba shares via LAN have no problems. Samba 
> server works perfectly and fast.
> We are instead experiencing serious performance issues when accessing 
> samba shares from remote clients (WAN), via VPN.
> Simple operations like "open a file", "copy & paste a file", "save a 
> file" from Windows XP SP2 clients are incredibly slow. It may take 10 
> seconds to open a "save as" dialog box, and maybe 15 more seconds to 
> save a "hello world" txt file from Notepad.
> Other services using the VPN such as SCP, SSH, HTTP, FTP work very
> good 
> on the same connection, with no slow issues at all. I tried 2 kinds
> of 
> VPN connections (OpenVPN and a router-proprietary VPN 
> gateway-to-client), and both have the same issue, both only with
> Samba.
> I wonder if there is something I'm missing in client or server 
> configuration that makes Samba talking very slow when connections are 
> not coming from the LAN. The file transfer process works fine: once
> the 
> "saving file" or "copying file" process has begun, it takes the same 
> amount of time needed by a SCP or a FTP transfer command using the
> same 
> VPN connection. I tried to copy a 2MB file from client to server and
> the 
> time needed using SCP and using SAMBA (once the copy process was 
> started) was the same.
> I tried to add some "socket options = TCP_NODELAY SO_SNDBUF=8192 
> SO_RCVBUF=8192" in smb.conf with no results.
> The problem is the same using "explorer", command prompt, or any
> program 
> in the client. We currently use all XP SP2 clients.
> It looks like the initial and final talking acknowledgement between 
> client and server for any kind of operation is unacceptably slow,
> while the file transfer process seems not to be involved in this
> problem.

This is quite common with VPN connections. What response time do you get
from a ping (LAN vs. VPN)?

A major network performance for VPN clients is the correct configuration
of various networking parameters (such as MTU, window size, etc. - all
depending on the type of internet connection you have).

And finally, what type of VPN are you using?

Very probably you cannot do much about it from the samba side.

-- 
Udo Rader

bestsolution.at EDV Systemhaus GmbH
http://www.bestsolution.at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20080326/87a4d5b7/attachment.bin


More information about the samba mailing list