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 :
Does UDP always perform better than TCP ? or is there any specific scenario where UDP is better than TCP.
Is there any published benchmarks for validating this fact ?
Is there any standard utilty to measure tcp and udp performance on a particular network ?
Thanks in Advance
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.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With