Reputation: 775
I thought about the tcp slowstart algorithm and a common problem when transfering many files over a tcp/ip network.
If you transfer many small files (i.e. size: 50kb, amount: 10,000) it will take much longer than if you transfer the same amout of data (50kb * 10,000 = 500,000 kb) at once. And for me it's a likely reason, that tcp slowstart is one reason for that (of course there is other stuff like overhead, ...).
If I understood slowstart correctly then it rises the maximum amount of data which can be transfered without acknowledgement from the recipient. If we now establish a new connection for each file, slowstart causes low throughputs at the beginning of each transfer and since the slowstart algorithm has increased throughput - our file is transfered and a new connections starts. And so we will never reach an optimized throughput rate. On the other hand if we transfer one big file, slowstart optimizes the maximun unacknowledged amount of data and so we can reach much higher throughput rates.
Is this assumption correct? And another question: Is the implementation of slowstart the same for c or c++ and .net?
And please dont see this an duplicate of "Why are my file transfers slow?", I'm asking if the slowstart algorithm is reason why transfering many small files is slow.
Upvotes: 1
Views: 454
Reputation: 62553
No, this is not exactly correct. Slow start relates to connection, not individual files sent over the same connection. As long as connection is established, it doesn't matter of you send one big file over the same connection, or 10 smaller files.
The solution is to use connections wisely. If you need to send many things, reuse a single connection (model HTTP 1.1).
Implementation of TCP protocol has nothing to do with a language of your application, it is using the same protocol stack provided by OS.
Upvotes: 1