Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Utility to benchmark udp and tcp performance for large data transfer

I referred to different threads about reliable UDP vs TCP for large file transfers. However, before making the decision of choosing UDP over TCP ( and add reliability mechanism to UDP ) I want to benchmark performance of UDP & TCP. Is there any utility in linux or windows that can give me this performance benchmark ?

I found Iperf is one such utility. But when I used Iperf on two linux machines to send data using both udp and tcp, I found that TCP performs better than UDP for 10MB of data. This was surprising for me as it is well known fact that UDP performs better than TCP.

My Questions are :

  1. Does UDP always perform better than TCP ? or is there any specific scenario where UDP is better than TCP.

  2. Is there any published benchmarks for validating this fact ?

  3. Is there any standard utilty to measure tcp and udp performance on a particular network ?

Thanks in Advance

like image 515
atv Avatar asked Oct 20 '25 13:10

atv


1 Answers

  1. UDP is NOT always faster than TCP. There are many TCP performance turning including RSS/vRSS. For example, TCP on Linux-on-HyperV can get 30Gbps and on Linux-on-Azure can get 20G+. //I think for Windows VM, it is similar; also on other virt platform such XEN, KVM, TCP did even better.

  2. There are lot of tools to measure: iPerf, ntttcp (Windows), ntttcp-for-Linux, netperf, etc:

    iPerf3: https://github.com/esnet/iperf

    Windows NTTTCP: https://gallery.technet.microsoft.com/NTttcp-Version-528-Now-f8b12769

    ntttcp-for-Linux: https://github.com/Microsoft/ntttcp-for-linux

    Netperf: http://www.netperf.org/netperf/

like image 185
Howard Shane Avatar answered Oct 23 '25 09:10

Howard Shane