Community discussions

MikroTik App
 
mikruser
Long time Member
Long time Member
Topic Author
Posts: 578
Joined: Wed Jan 16, 2013 6:28 pm

Why UDP Bandwidth Test always show Lost Packets = 0?

Fri Jul 10, 2020 12:11 pm

Hello,

I already tested the channels using tcp test: viewtopic.php?f=2&t=163469
and the results looks like there are packet loss.
But why UDP Bandwidth Test do not show packet loss?
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Why UDP Bandwidth Test always show Lost Packets = 0?

Fri Jul 10, 2020 1:30 pm

You have been answered, in the same topic / thread you quoted above.

i.e.
TCP = Connection Oriented Protocol
UDP = Connection-less Protocol

For UDP to know / track packet errors / drops / etc, it must be coded in the higher up OSI layers
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11442
Joined: Thu Mar 03, 2016 10:23 pm

Re: Why UDP Bandwidth Test always show Lost Packets = 0?

Fri Jul 10, 2020 1:42 pm

UDP protocol is stateless ... in a sense that receiver (in protocol stack) doesn't provide any feedback to sender (unlike TCP, where TCP stack of receiver sends acknowledgements for all received packets). Which means that sender does not know whether receiver actually received the packet or whether packets were delivered in-order ... Some apps circumvent this behaviour on application layer (application itself checks received data integrity), but iperf doesn't do it.

What iperf does do is that server (at least iperf2) sends RX statistics at the end of UDP test session to the client allowing client to display server-side statistics. However, this might not work if the end2end throughput is less than TX stream bitrate and there's a router buffering large amount of data. This way server doesn't receive end-of-test marker in timely fashion (if at all) to send statistics to client before client times out waiting for that data.
During test, iperf client displays statistics about TX stream which don't necessarily resemble statistics at the receiving end (server). During TCP tests, both client and server statistics more or less match due to TCP mechanisms (congestion control, retransmissions, ...) while during UDP test those statistics can be wildly different.
 
mikruser
Long time Member
Long time Member
Topic Author
Posts: 578
Joined: Wed Jan 16, 2013 6:28 pm

Re: Why UDP Bandwidth Test always show Lost Packets = 0?

Fri Jul 10, 2020 1:50 pm

So you say that the mikrotik developers created a fake Bandwidth Test udp with a fake "Lost Packets" field?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11442
Joined: Thu Mar 03, 2016 10:23 pm

Re: Why UDP Bandwidth Test always show Lost Packets = 0?

Fri Jul 10, 2020 2:01 pm

Nobody says that ... what we're saying is that with TCP tests client knows stat metrics due to how TCP performs. And with UDP client doesn't know that unless app takes care of transferring needed statistic metrics. You're looking at GUI and GUI is designed to show any statistics available from any possible tests. The only problem with reporting (could be, I never ran UDP bandwidth test on ROS) is that it displays 0 as lost packets when essentially there's no data about that (so it should say N/A or something).

BTW, the screenshots you posted are about TCP tests and the shape (up&down) of bandwidth graph doesn't mean there's packet loss ... You see, the mild way of traffic shaping is to delay packets rather than to drop them. TCP features a thing called transmit window which means that transmitting side can only transmit certain amount of data and then it has to wait for acknowledgements. The it can transmit new data which (in size) equals the acked data. If some packets are delayed in one direction, this indirectly means lower throughput. The hard way of traffic shaping is dropping packets which triggers a completely different TCP mechanism (retransmissions together with transmit window shrinking) ... if that mechanism kicks in real hard, then throughput may drop to almost zero and it builds up more slowly.

Who is online

Users browsing this forum: Amijani, CoMMyz, PhillipPer, uxertxo and 90 guests