title: Proper way to calculate Link Throughput
body: <p>I have read some articles online and I got a pretty good idea about the TCP and UDP in general. However, I still have some doubts which I am sure not completely clear to me.</p>
  
  <blockquote>
    <p>What is the proper way to calculate throughput ?</p>
  </blockquote>
  
  <p>(<code>Can't we just divide Total number of bytes received by total time taken ?</code>)</p>
  
  <blockquote>
    <p>What is that key feature in TCP that makes it have much much higher
    throughput than UDP ?</p>
  </blockquote>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I understood that TCP uses windows which is nothing but that much segments can be sent before actually waiting for Acknowledgements. But my doubt is that in UDP segments are continuously sent without even bothering about Acknowledgements. So there is no extra overheads in UDP. Then, why the throughput of TCP is much much higher than that of UDP ?</p>
  
  <p><em>Lastly,</em></p>
  
  <p>Is this true ?</p>
  
  <pre><code>TCP throughput = (TCP Window Size / RTT) = BDP / RTT = (Link Speed in Bytes/sec * RTT)/RTT = Link Speed in Bytes/sec
  </code></pre>
  
  <p>If so then TCP throughput is always equals to the Know Link speed. And since the RTTs cancels out each other, the TCP throughput does not even depends on RTT.</p>
  
  <p>I have seen in some network analysis tools like iperf, passmark performance test etc. that the TCP/UDP Throughput changes with Block size. </p>
  
  <blockquote>
    <p>How is throughput dependent on Block size ?
    Is Block size equals TCP window or UDP datagram size ?</p>
  </blockquote>