why do downloads occur at faster rates along the download process?



why do downloads occur at faster rates along the download process?

In: Technology

Downloads are done over the TCP protocol, and TCP gradually ramps up the speed until it finds how fast things can go.

When you’re downloading something you’re constantly sending confirmations of “yeah, I got this bit” to the source, and the source throttles things down if confirmations stop arriving in a timely manner. Things also start quiet and gradually ramp up, until the system finds the maximum speed that works.

Networks and servers are in a constant state of flux. A service like Steam handles at least tens of thousands of downloads simultaneously. As people start and end their downloads at different times, that means that resources like available bandwidth and disk usage change constantly.

Also, different types of files move at different speeds depending on their size. Contrary to popular belief, a single, massive file transfers *much* faster than a bunch of small files. This is because the server spends less time looking up files and can focus on just getting the data from this one file out to the network. If the server has to send 10,000 small files, it has to spend time looking up the files, and assembling/transmitting the data just to let the downloading computer know that a new file is coming before it actually sends the data in the file. That will result in a drop in download speed because of the overhead this activity takes.

Networks themselves have backlogs of data packets. As routers and switches decide where data is going, they have a queue that they work through called a buffer. That buffer, of course, varies in size as demand fluctuates. If 10,000 packets arrive one second, but only 300 arrive the next, then the router/switch will have more time to catch up and your download speed will increase.

There are many, many other factors at play, but you get the idea. Everything is very hectic and constantly changing with servers and networks, so your download speed reflects the amount of demand on the whole system as a result.

I’m going to tell you about uploading, even though you asked about downloading. That’s because I think the explanation is easier to follow from an uploader’s point of view. But the thing is, uploading and downloading are really just two sides of the same coin.

One computer’s download is another computer’s upload!

When you upload something, you don’t know how quickly you’ll be able to send packets to the receiver. This depends on a ton of possible factors. Packets on the Internet travel across often ten or more “links” between different computers owned by different companies. Any of these “links” might be shared between many users, or have degraded / interrupted performance for a variety of reasons.

Your performance is determined by the slowest link in the chain, but you have no idea how fast that is (and a link’s available speed can change over time).

So when you upload something, you start sending packets slowly, then if no packets are lost, you send them faster. You keep checking if all the packets arrived safely, and send them faster and faster until you start losing packets. Then you assume the available speed is just under the speed that resulted in failures, so you dial it back just a bit to try to hit that “sweet spot” where you’re sending as fast as you can without losing packets. (But if you keep sending packets successfully, you periodically try sending faster to see if you still lose packets. After all, the speed limit might have increased.)