Investigating the network upload speeds

Last updated on

Since the beginning, all network transfer tests at vpsbenchmarks.com had that strange characteristic where download speeds have been much higher than upload speeds. There's no reasonable explanation for this, providers don't throttle their upload bandwidth any more than the download bandwidth.

It's been a mystery for a long time, earlier attempts at finding the cause of the problem had all failed but in June this year, I decided to get to the bottom of this. VPSBenchmarks relies on a custom Speedtest library for running those tests and it turns out this library is not immune to bugs. Testing with the more well known speedtest-cli library shows that download and upload speeds are generally in the same ballpark.

The outcome of this investigation was that the VPSBenchmarks uploads are CPU bound on a single physical core. Why? Because it encodes the HTTP POST body before sending it over the wire. Since those payloads are fairly large, the encoding takes a lot of CPU resource and that becomes the bottleneck. This encoding is unnecessary and can be removed. Without it, uploads get into the 1Gbps range and are no longer CPU bound.

I made other changes on this occasion such as replacing the HTTP library with libcurl and more carefully choosing the size of the POST payloads but they didn't significantly impact the transfer speeds.

The main concern for VPSBenchmarks is to keep test results comparable between all servers and all providers, between past and future trials. If the "fix" was applied now to all future trials then past trials would be unfairly penalized. The solution I chose is to run both versions of the network tests on each server (starting in June), the old version will continue to be reported by default and will be used to calculate the grades until December. But VPSBenchmarks still records transfer speeds with the new version. You can see those network speeds by appending "?show_curl=true" to the networks_transfers page urls. For example, see the Linode trial that ran on July 15th.

In December, we'll only run the new version of the network transfer tests.

Update December 2nd, 2020: all networks transfers on trials that started after December 1st, 2020 have the fix. Network grades for new trials are all based on the range of network transfer speeds that have been collected since June 2020. Trials prior to December 2020 are unchanged.




Be the first to learn about new Best VPS rankings. Subscribe to our newsletter.