vi / turnhammer

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

Load Testing #2

Open kapilvk opened 2 years ago

kapilvk commented 2 years ago

I am unable to test my turn server for more than 40 parallel connections.

vi commented 2 years ago

What do you mean by "unable"? Does it show errors or results get inaccurate?

Which platform do you use? If UNIX-like, what does ulimit -n say?

kapilvk commented 2 years ago

I use Ubuntu. The ulimit value is 1048576.

vi commented 2 years ago

So what do you mean by "unable to test"?

kapilvk commented 2 years ago

once I connect more than 150 users using -f, I get a 437 error. timeout.

vi commented 2 years ago

For me it works for more than 150 users:

$ turnhammer -j 200 $TURNIP:3478  $TURNUSER $TURNPASSWD
The test would do approx 2.240 Mbit/s and consume 1.244 megabytes of traffic
My external address: 46.53.246.252:18128
Allocated 200 TURN clients
Received the first datagram
Received 5000 packets from 5000 window of total 5000 || Loss: 00.0000%   bad loss: 00.0000%
RTT4 brackets: 0-49ms: 00.0000%   180-399ms: 100.0000%  1000-1999ms: 00.0000%
             50-179ms: 00.0000%   400-999ms: 00.0000%      2000+ms: 00.0000%
 <<<  Overall score:  9.5 / 10.0  >>>
Stopping TURN clients
  1. Have you tried many users, but low bandwidth test?
  2. Have you checked server logs? Maybe there is explicit limitation of number of allocations per IP address.
  3. Have you tried other TURN testing tools, such as the one included with coturn?

Note that this tool is not super-optimised and you need multiple instances of turnhammer nodes (or a bigger node) to load-test a single TURN server. I expect CPU load to be slightly more on turnhammer than on server. If CPU of network resources are saturated on turnhammer side then benchmark results get inaccurate.

kapilvk commented 2 years ago

I tested using this cmd cargo run $IP:3478 $USERNAME $PASSWORD -j 40 -s 50 --video

Also was getting turnhammer: command not found when I tried to use your command.

vi commented 2 years ago

Have you tried

cargo run --release -- $IP:3478 $USERNAME $PASSWORD -j 40 -s 50 --video
?