Accessing a database through vpn is slow

Forum for all technical support and trouble shooting of the WinGate VPN.

Moderator: Qbik Staff

Accessing a database through vpn is slow

Postby pantrax » Jan 06 06 12:51 pm

In this attempt i've had a working wingate vpn connection for over a year now, no real problems. Lately the office have been looking for a way to access databases through the vpn connection. This however is acting real slow. The databases in question are SQL Anywhere 9 and MSSQL. While accessing a database i've tried to note how much data gets transfered in the process. This came down to about 4-5 KB/s. Both lines host a 3000/3000 kbps SDSL so it's nowhere near reaching a good reading. So I tried to do a copy of a large file to see what it would come up with, this kept jumping between 170- 220 KB/s which seems fair. Now I understand there are differences on how data is sent in the two cases and the method of connection is different, even so.

My question is this then, I would like to know of a way to increase access speeds to databases through VPN and was hoping there were something that could be tried. I would hate to have to resolve to terminal services in order to get decent speed. Having to set one of those up would put me in a real pinch as i need to get this up and running asap.

Let me know if there's any need for any more technical details.
pantrax
 
Posts: 14
Joined: Feb 04 04 2:57 am

Postby genie » Jan 06 06 2:47 pm

Well, there are two things with VPN that reduce networking performance:

- VPN processing is more complicated and requires encoding/decoding and wrapping/unwrapping packets. Besides, since VPN uses UDP protocol, which some gateways deem low priority, the amount of packets loss can be slighltly higher than with plain TCP connection.
- VPN packets are wrapped-up local packets and as such they are bigger than the original packets. This wrapping reduces MSS of the connection and increases overall network traffic.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby pantrax » Jan 06 06 3:10 pm

So in general it's not feasable to access a database considering one would want something that don't cause to much lag inbetween requests under a vpn connection? I can see the process of wrapping/unwrapping packets may have an affect on the full connection one have to a database, but still 4-5 KB/s? All this while regular file transfer comes close to max (also under a vpn connection)?
pantrax
 
Posts: 14
Joined: Feb 04 04 2:57 am

Postby genie » Jan 06 06 3:18 pm

My understanding is that in your case the major culprit is the actual wrapping overhead in terms of the reduced MSS - you can try reducing an MTU value on the database computer to force it re-optimize its traffic.
genie
Qbik Staff
 
Posts: 1788
Joined: Sep 30 03 10:29 am

Postby MattP » Jan 12 06 12:53 pm

Also, you could try running a Terminal Server client over the VPN, for example Remote Desktop from XP works really well over the VPN. This stops the database file from being transferred over the VPN, meaning you get good DB performance. You still have the file and print sharing over the VPN which works well and any database work gets done on the host machine.
MattP
Qbik Staff
 
Posts: 991
Joined: Sep 08 03 4:30 pm

Postby adrien » Jan 13 06 2:16 pm

There's one other factor that can be a real performance hit on connections that have high numbers of packets going back and forth.

latency.

If one end of a communication won't respond until it has received something from the other end, then the time taken for packets to traverse the network, can be the overall limiting factor on throughput.

So, if you ping the DB server from the client VPN, what ping times do you get?

Latency can be alleviated slightly by increasing buffer sizes in TCP/IP, and increasing TCP window size as well, but if the higher-level protocol (the MS SQL client-server protocol) is transaction-intensive, then there isn't much you can do about that, unless you can get an internet link with lower latency. DSL is normally not that great for latency for instance.

Adrien
adrien
Qbik Staff
 
Posts: 5441
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate VPN

Who is online

Users browsing this forum: No registered users and 22 guests

cron