I’ve been trying to download some data in parallel using HttpWebRequest. In order to do it, I start some threads. However, despite very high bandwidth, I’ve noticed that the effective download speed decreases when the thread count exceed 4. When I use multiple processes, the issue vanishes.
How can I improve my download speed within a single process?
Regards,
RSuthke
Any time you have more threads than cores, you’re going to have threads that are interrupted. Thread switching is going to kill your performance. I’d try using the TPL (assuming that you are using .Net 4.0) or a thread pool at the very least.