vi / turnhammer

Stress-testing tool for TURN (RFC 5766) servers.
13 stars 2 forks source link

What does the value "bad_loss" in the output mean? #4

Open trinhxhai2000 opened 2 years ago

trinhxhai2000 commented 2 years ago

I did the test below and got a high value of bad loss. With --video option, it gets worse even more 18092.21 %.

My questions are:

Thank you very much !

Here is my test's output:

./turnhammer {my server ip}:3478 test test123 --audio -j 200 -d 60 --force

The test would do approx 11.878 Mbit/s and consume 79.189 megabytes of traffic
My external address: 42.113.144.74:52419
Allocated 200 TURN clients
Received the first datagram
Received 190682 packets from 192000 window of total 192000 || Loss: 00.6865%   bad loss: 49.6276%
RTT4 brackets: 0-49ms: 00.0000%   180-399ms: 09.8271%  1000-1999ms: 00.0828%
             50-179ms: 87.1000%   400-999ms: 02.3036%      2000+ms: 00.0000%
 <<<  Overall score:  -39.9 / 10.0  >>>
Stopping TURN clients
vi commented 2 years ago

What does the value "bad loss" in the output mean?

It is loss of 50 packets in a row. It is miscalculated in this case - the percentage should be between 0% and loss%. Maybe the algorithm gets confused by reordered packets or was not tested with -j.

How can the value be more than 100%?

Because of a bug in turnhammer.

How can I improve the "bad loss" value?

"Bad loss" calculator needs to be improved first. "Overall score" also gets affected by this.


Also note that CPU load on turnhammer side and on coturn side is similar - you may get poor results because of overloaded client, not only server. For a reliable load-test of a TURN server, you need to start turnhammer instances on multiple nodes simultaneously, pointed at one server.

trinhxhai2000 commented 2 years ago

Thanks for your help.

vi commented 2 years ago

Tried running similar command line against my TURN server and it happens to work properly.

$ turnhammer ....:3478 ...  ... --audio -j 200 -d 60 --force
The test would do approx 11.878 Mbit/s and consume 79.189 megabytes of traffic
My external address: 46.53.246.99:6990
Allocated 200 TURN clients
Received the first datagram
Received 191555 packets from 192000 window of total 192000 || Loss: 00.2318%   bad loss: 00.0000%
RTT4 brackets: 0-49ms: 00.0000%   180-399ms: 99.7682%  1000-1999ms: 00.0000%
             50-179ms: 00.0000%   400-999ms: 00.0000%      2000+ms: 00.0000%
 <<<  Overall score:  9.4 / 10.0  >>>
Stopping TURN clients
vi commented 2 years ago

Tried running turnhammer though netem to reproduce faulty calculation of the badloss, but so far it is working properly for me.