0

I have a VPS which can download a file from Server X at 2gbps. I have a home internet connection which can download a file from the VPS at 1gbps, but from Server X at only 100mbps.

If I use a SOCKS proxy and download from Server X via the VPS, I get the expected 1gbps speed.

If I set up a GRE tunnel or a Wireguard connection to Server X from home, and download the file by routing through Server X, I still only get 100mbps.

Weirdly, if I use 'Big VPN Provider A' and their wireguard VPN, I also get 1gbps. But if I use 'Big VPN Provider B' and their wireguard VPN (which is using the same datacenter company as far as I can tell) I only get 10mbps to Server X.

Anyway, I'm hoping someone could explain any reasons it might be like this, as I was assuming that going through the VPS with a VPN or a GRE tunnel would give me similar performance to using it as a socks or http proxy would.

The speed between the VPS and the home connection is good over a tunnel or over a VPN, and connections to other servers may have much better performance than Server X, so it's not that the whole connection is slow.

2
  • bandwidth is funny like that. I have a similar situation with openwrt download servers being slow directly from my home, but fast via my VPS through an SSH tunnel Feb 6, 2023 at 5:35
  • Sorry, I know that comment was not helpful, just pointing out that it's probably beyond your control Feb 6, 2023 at 6:07

1 Answer 1

0

This could have a multitude of reasons, for your observations, but none include the specific technology that is redirecting the traffic. That in this case proxy appears faster is just a coincidence, and the question title is extremely misleading. I suggest to change the title into something that doesn't assume it's precisely proxy is constantly faster than VPN, because it is not. Something like "why different paths show different bandwidths" will be more appropriate.

What you observe is that certain path for the traffic is better that other. Why is that? Well, it could be routed through wider link; ISPs can apply selective shaping with different thresholds towards different destinations, and so on. Some ISPs can also detect and downregulate VPNs.

VPN providers also can place artificial limitations or simply have limited bandwidth for each connection leg. Consider a VPN service to be a farm of many servers with multicore processors such a that each core only can handle 100 Mbps, but since they balance different connections to different cores and servers, they can achieve a practically unlimited aggregate service bandwidth.

The general reason is that traffic is almost never forwarded towards "fastest possible" link, but usually "cheapest possible", and that the join of several "cheapest possible" links is unlikely to be the best if you consider Internet and try to find the widest pipe between point A and point B. Sometimes, you can build the better path by hand using VPNs, proxies and so on, and if it's found, it doesn't matter which technology you use, all of them will show approximately same bandwidth.


There is one special condition that can make the proxy to show better bandwidths, and that is the case of high latency link when the proxy system divides the latency into approximately equal parts. It is connected to the TCP throughput specifics. With maximum TCP window size 65536 (bytes) and round trip time 1 sec, the maximum throughput of the single connection will be 65536 bytes/sec, but if you place a proxy server in the middle and have its RTT to each leg 0.5 sec, each TCP leg will have throughput twice as fast and so will be the whole perceived bandwidth on average. VPN in place of the proxy will not reduce end-to-end RTT and the bandwidth will not be doubled.

However, to increase the bandwidth tenfold this way you'll need to chain 9 carefully placed proxies, so this is very unlikely to be the reason in your particular case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .