SMB/samba over IPSec slow – how to speed up?

Problem : SMB/samba over IPSec slow – how to speed up?

I’m running a samba-server at the headquaters, connecting to it with my Windows 7-machine in a remote office, connected to the hq through an ipsec-tunnel. Our HQ is connected with dedicated fiber 100/100 mbit and our remote office through ADSL 24/1 mbit. Latency is ~64 ms through the tunnel.

The problem is that we connect to the samba-server for coding/development and edit files through smb and the tunnel but this is extremly slow. Opening a small 2kb file takes ~5 seconds, sometimes more. Saving files back to the server also takes time.

Though transfering large files begins slow, the speed increases over time and we get ~600 kb/s (starting at maybe 4 kb/s and increasing).

I’ve tried to lower the MTU on the server, routers (the vpn-interfaces) but nothing seems to really help.

Everyone running smb/cifs through vpn-tunnels can’t be running wan-optimizers/accelerators, right? There must be another way than to pay $7,000 for two of BlueCoats smallest models.

(note that this is not exclusivly a samba-problem, we experience the same issues with our windows 2003-servers too.)


Solution: SMB/samba over IPSec slow – how to speed up?

The SMB protocol was never designed to be used over WAN links.

It have very little tolerance for latency and slow to a crawl with anything above 50ms. SMB block sizes are also unsuitable for WAN links.

This is why WAN accelerators were invented.

With Windows 7 and Windows Server 2008, SMB 2.1 was introduced and it solves a lot of these problems. As your client machines are already W7, the cheapest solution is probably to migratie to W2008 server instead of Samba, or look for a Samba version with support for SMB 2.1