Samba Performance problems

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
lantzanders
OpenVpn Newbie
Posts: 1
Joined: Mon Oct 18, 2010 11:48 pm

Samba Performance problems

Post by lantzanders » Mon Oct 18, 2010 11:58 pm

I have got OpenVPN up and working perfectly but SMB/samba/CIFS (call it what you want) is painfully slow (250kB/s), ftp reaches acceptable speeds (1,5-3MB/s). I have done some research and found that other people are having the same problem, but no one i have found has found a solution.

I have tried playing around a little with MTU, max xmit and SMB buffers but haven't really gotten any results. I cant even be sure that the settings I make take any effect because I dont really know how to verify.

My goal is to be able to mount a share from my Ubuntu server on my Windows 7 Hom Prem client, and stream video from it. FTP would work but is not a good protocol for streaming.

Any ideas are very much appreciated!

User avatar
dazo
OpenVPN Inc.
Posts: 155
Joined: Mon Jan 11, 2010 10:14 am
Location: dazo :: #openvpn-devel @ libera.chat

Re: Samba Performance problems

Post by dazo » Thu Nov 18, 2010 4:13 pm

If you want streaming, setting up a HTTP server is probably a lot easier and more suitable compared to SMB/CIFS, or setup another streaming service. In general SMB/CIFS is less useful for streaming media.

But as you're running Samba on your Ubuntu server, try enabling TCP_NODELAY in Samba. Also make sure your VPN connection is UDP based. I don't recall now if SMB/CIFS prefers TCP or UDP for file transfers, but somehow I sense it is TCP based. But as stated above, SMB/CIFS are not that suitable for streaming media in general.

For streaming media, it is less important if you loose some packets on the way; it is much more important that the packets flow as quick as possible and your client don't wait for all TCP packets to come and are ordered sequentially. And using TCP for the VPN, gives you TCP-in-TCP which can really decrease the performance, especially if some packets are lost on the way.

Post Reply