Link to home
Start Free TrialLog in
Avatar of Xetroximyn
XetroximynFlag for United States of America

asked on

Can I speed up Samba share access over internet/VPN?

Accessing samba shares on a redhat es 6.1 server from a Win7 PC through hamachi VPN (direct tunnel)

The access is slow.  Saving a file takes 2-3 seconds.  (no matter the size -- even <100bytes)

right clicking a file takes a couple seconds for menu to show up, etc

I am guessing it has to do with back and forth... all the extra requests  that windows makes about file meta data or something like that....

FYI -- I can telnet to the server through the VPN and response is snappy just like if I was onsite.  But Samba is a BIG difference between onsite and offsite.

Any ideas?
Avatar of rindi
rindi
Flag of Switzerland image

Telnet doesn't move any substantial data back and forth, you wouldn't really notice any latency that way. copying a file on the other hand has to be more, and it gets uploaded to the internet and downloaded again. Internet speeds are slow compared to the LAN, and upload speeds are still usually lower than the download speeds. You'll have to expect speed hits.
Avatar of Xetroximyn

ASKER

to be clear -- I can run an ls command in a large folder that outputs atleast 1024 characters (i.e. 1KB) and it happens instantly.

But saving a 1 byte file (i.e. a .txt file that contains nothing but a single character will take 2-3 seconds.)

Even just right clicking a file will take 2-3 seconds before the menu comes up.  

It's NOT just a matter of bandwidth.... I supspect there is come back and forth that is causing hte delay (i.e. 1ms back and forth 30 times on a LAN is only 30ms.   But 50ms back and forth over the internet 30 times is 1.5 seconds.
a good illistration.   It just took 11 seconds to save a 99kb text file.

Using telnet I can list that same 99KB file to the screen (i.e. that means all 99KB must be transfered) and it happens in less than 1 second.

There is something about the samba protocol that is creating the delay.

I dont beleive it is just overhead either.  It would have to be a LOT of overhead to make it take 11 seconds.   But small messaged back and forth would multiply the latency.  I think that is the issue.
it probably has to do with the smb protocol being mismatched
if you have powershell 3.0 (run as administrator) you can test the smb connection

Wiki.samba.org has some suggestions as well http://wiki.samba.org/index.php/Windows7
I dont seem able to get the protocol version.

Anyway I am using Windows 7 and Samba 3.5.10.  From your links it seems like that is a very recent version of samba and should work great.  

And it does work great if you are onsite.   I think the problem is Samba is made for LAN access where latency is a could ms at most.  but I am accessing over the internet and VPN where latency is more like 30-60ms.

So I think all that can help me is if there are things I can disable (perhaps background file meta-data requests, and the like) that will prevent some of the back and forth and make my access to the files more direct, like with plain old telnet.

Any ideas?


PS C:\Windows\system32> Get-SmbConnection
The term 'Get-SmbConnection' is not recognized as the name of a cmdlet, function, script file, or operable program. Che
ck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:18
+ Get-SmbConnection <<<<
    + CategoryInfo          : ObjectNotFound: (Get-SmbConnection:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Windows\system32>

Open in new window

Maybe using FTP would be more the right protocol for this than SAMBA.
I want something that will allow me to open the text files in my text editor directly and save them directly back to the server.anyway I could do that with Ftp protocol?
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not actually solved -- but dont have time to figure it out now, and EE is buging me to attend to this.  Don't want to delete it as I was to have it in my history to look at the comments hwne I do have more time