I plan to make downloading files.

For example, you need to download 9 files. Should I download them in 3 streams or in one?

  • If you are given an exhaustive answer, mark it as correct (tick the selected answer). - andreycha
  • @andreycha I see 2 opposing opinions with the same number of votes. How should I decide who is right? - Jagailo

2 answers 2

With tz calls to web servers and receiving information from them - absolutely has. It is possible to stream to the file.

However, if you plan to save downloaded files on a disk, then you need to understand that the disk practically does not parallel. You will get some kind of acceleration, but you need to experiment.

If memory allows, I would as much as possible parallelize the downloading of files into memory, and then set a small degree of parallelization to save to disk.

    Most likely no. If your channel is “ at the same” speed, which the site can give, then at least 100 streams should be downloaded, the speed will not increase. But some servers limit the download speed for a single file and at the same time limit it greatly. In this case, downloading multiple files at the same time can be useful (as long as the channel is enough). If files are being downloaded from different servers and your channel is clearly broader than the capabilities of servers, then it makes sense to download in several streams (but downstream to a file). But at the same time, the main thing does not rest on the speed of the disk.

    This whole hype with the download of files has gone since the times when the Internet was slow and heavy. When the tcp / ip stack worked poorly. There was satellite Internet (and the mobile one which was called CDS), which in one stream could not start up above a certain speed (from 2400 to 9600). But such flows could be many. And in this case, a jump in a lot of threads gave a real acceleration.