I tested a line for its link quality with iperf
. The measured speed (UDP port 9005) was 96Mbps, which is fine, because both servers are connected with 100Mbps to the internet. On the other hand the datagram loss rate was shown to be 3.3-3.7%, which I found a little too much. Using a high-speed transfer protocol I recorded the packets on both sides with tcpdump
. Than I calculated the packet loss - average 0.25%. Have anyone an explanation, where this big difference may be coming from? What is an acceptable packet loss in your opinion?
I've experienced significant dataloss with iPerf in UDP mode as a result of the CPU not being able to keep up. For some reason, iPerf with UDP seems to be much more CPU intensive than iPerf with TCP. Do you experience the same loss percentages when you set iPerf to half the rate?
To answer your second question about how much packet loss is acceptable, it really depends on what application you are running, how much traffic you've got. Really, there shouldn't be any loss if you are under your bandwidth limit. For most things, I probably wouldn't complain too much about .25%, but that is still a lot of loss if you are running at really high rates.
[EDIT 1] Some other thoughts that I've had on the topic:
Well, with TCP there are mechanisms to maximize the utilization of one flow, with UDP there aren't. So each application have to create their own mechanisms, so probably each application use a different approach to do that. Probably, Iperf will allow more packets lost because is trying to reach the maximum available bandwidth with out care about if the information is received or not. The other application probably will try to not lost many packets, and will reduce the packet rate to the available throughput in the connection.
Have you used tcpdump to check the packet loss when using iPerf to make sure the packet loss you calculate with tcpdump matches iperf?
You may discover that your measurement methods are not comparable.
does iperf automatically discard packets that arrive out of sequence with UDP? You might be looking at a little bit of jitter on the connection.