-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7151dba
Showing
48 changed files
with
4,362 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
BSD 2-Clause License | ||
|
||
Copyright (c) 2020, Tampere University | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
.PHONY: all clean | ||
|
||
CXX = g++ | ||
CXXFLAGS = -Wall -Wextra -O2 -std=c++11 -g | ||
|
||
uvgrtp_receiver: | ||
$(CXX) $(CXXFLAGS) -o uvgrtp/receiver uvgrtp/receiver.cc util/util.cc -luvgrtp -lkvazaar -lpthread | ||
|
||
uvgrtp_sender: | ||
$(CXX) $(CXXFLAGS) -o uvgrtp/sender uvgrtp/sender.cc util/util.cc -luvgrtp -lkvazaar -lpthread | ||
|
||
uvgrtp_latency_sender: | ||
$(CXX) $(CXXFLAGS) -o uvgrtp/latency_sender uvgrtp/latency_sender.cc util/util.cc -luvgrtp -lkvazaar -lpthread | ||
|
||
uvgrtp_latency_receiver: | ||
$(CXX) $(CXXFLAGS) -o uvgrtp/latency_receiver uvgrtp/latency_receiver.cc util/util.cc -luvgrtp -lkvazaar -lpthread | ||
|
||
ffmpeg_sender: | ||
$(CXX) $(CXXFLAGS) -Wno-unused -Wno-deprecated-declarations -Wno-unused-result -o ffmpeg/sender \ | ||
ffmpeg/sender.cc util/util.cc -lkvazaar `pkg-config --libs libavformat` -lpthread | ||
|
||
ffmpeg_receiver: | ||
$(CXX) $(CXXFLAGS) -Wno-unused -Wno-deprecated-declarations -Wno-unused-result -o ffmpeg/receiver \ | ||
ffmpeg/receiver.cc util/util.cc -lkvazaar -lavformat -lavcodec -lswscale -lz -lavutil -lpthread | ||
|
||
ffmpeg_latency_sender: | ||
$(CXX) $(CXXFLAGS) -Wno-unused -Wno-deprecated-declarations -Wno-unused-result -o ffmpeg/latency_sender \ | ||
ffmpeg/latency_sender.cc util/util.cc -lkvazaar `pkg-config --libs libavformat` -lpthread | ||
|
||
ffmpeg_latency_receiver: | ||
$(CXX) $(CXXFLAGS) -Wno-unused -Wno-deprecated-declarations -Wno-unused-result -o ffmpeg/latency_receiver \ | ||
ffmpeg/latency_receiver.cc util/util.cc -lkvazaar -lavformat -lavcodec -lswscale -lz -lavutil -lpthread | ||
|
||
live555_sender: | ||
$(CXX) $(CXXFLAGS) live555/sender.cc live555/source.cc util/util.cc -o live555/sender \ | ||
-I /usr/local/include/liveMedia \ | ||
-I /usr/local/include/groupsock \ | ||
-I /usr/local/include/BasicUsageEnvironment \ | ||
-I /usr/local/include/UsageEnvironment \ | ||
-lpthread -lliveMedia -lgroupsock -lBasicUsageEnvironment \ | ||
-lUsageEnvironment -lcrypto -lssl | ||
|
||
live555_receiver: | ||
$(CXX) $(CXXFLAGS) live555/receiver.cc live555/sink.cc util/util.cc -o live555/receiver \ | ||
-I /usr/local/include/liveMedia \ | ||
-I /usr/local/include/groupsock \ | ||
-I /usr/local/include/BasicUsageEnvironment \ | ||
-I /usr/local/include/UsageEnvironment \ | ||
-lkvazaar -lpthread -lliveMedia -lgroupsock -lBasicUsageEnvironment \ | ||
-lUsageEnvironment -lcrypto -lssl | ||
|
||
live555_latency_sender: | ||
$(CXX) $(CXXFLAGS) live555/latency_sender.cc util/util.cc -o live555/latency_sender \ | ||
-I /usr/local/include/liveMedia \ | ||
-I /usr/local/include/groupsock \ | ||
-I /usr/local/include/BasicUsageEnvironment \ | ||
-I /usr/local/include/UsageEnvironment \ | ||
-lkvazaar -lpthread -lliveMedia -lgroupsock -lBasicUsageEnvironment \ | ||
-lUsageEnvironment -lcrypto -lssl | ||
|
||
live555_latency_receiver: | ||
$(CXX) $(CXXFLAGS) live555/latency_receiver.cc -o live555/latency_receiver \ | ||
-I /usr/local/include/liveMedia \ | ||
-I /usr/local/include/groupsock \ | ||
-I /usr/local/include/BasicUsageEnvironment \ | ||
-I /usr/local/include/UsageEnvironment \ | ||
-lkvazaar -lpthread -lliveMedia -lgroupsock -lBasicUsageEnvironment \ | ||
-lUsageEnvironment -lcrypto -lssl | ||
|
||
clean: | ||
rm -f uvgrtp/receiver uvgrtp/sender uvgrtp/latency_sender uvgrtp/latency_receiver \ | ||
ffmpeg/receiver ffmpeg/sender ffmpeg/latency_sender ffmpeg/latency_receiver \ | ||
live555/receiver live555/sender live555/latency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# RTP Benchmarks | ||
|
||
This repository contains all benchmarking code related to the benchmark of uvgRTP against LIVE555 and FFmpeg. | ||
|
||
Directories [uvgrtp](), [ffmpeg](), and [live555]() contain the C++ implementations for RTP (latency) senders and receivers. | ||
|
||
Script benchmark.pl can be used to automate the benchmark runs and its usage is described below. | ||
|
||
Script parse.pl can be used to parse the output of benchmark runs. | ||
|
||
This repository also contains file [udperf.c](udperf.c) which can be used to test the throughput of a network and it was used for the paper to determine the upper limit for UDP traffic using 1500-byte Ethernet frames. | ||
|
||
## Running the benchmarks | ||
|
||
### Example 1 | ||
|
||
Benchmark uvgRTP's send goodput. Run the benchmark configuration with 8 different thread settings | ||
so first starting with 8 threads, then 7 threads then 6 etc. | ||
|
||
Each thread configuration will test all FPS values between the range 30 - 480 and and each FPS | ||
is tested 20 times. FPS is doubled so the tested values are: 30, 60, 120, 480 | ||
|
||
Each FPS value for each thread configuration provides one log file | ||
|
||
Sender | ||
``` | ||
./benchmark.pl \ | ||
--lib uvgrtp \ | ||
--role send \ | ||
--addr 127.0.0.1 \ | ||
--port 9999 \ | ||
--threads 3 \ | ||
--start 30 \ | ||
--end 480 \ | ||
--iter 20 | ||
``` | ||
|
||
Receiver | ||
``` | ||
./benchmark.pl \ | ||
--lib uvgrtp \ | ||
--role recv \ | ||
--use-nc \ | ||
--addr 127.0.0.1 \ | ||
--port 9999 \ | ||
--threads 3 \ | ||
--start 30 \ | ||
--end 480 \ | ||
--iter 20 | ||
``` | ||
|
||
### Example 2 | ||
|
||
Benchmark uvgRTP's send goodput using netcat | ||
|
||
Sender | ||
``` | ||
./benchmark.pl \ | ||
--lib uvgrtp \ | ||
--role send \ | ||
--use-nc \ | ||
--addr 127.0.0.1 \ | ||
--port 9999 \ | ||
--threads 3 \ | ||
--start 30 \ | ||
--end 60 \ | ||
``` | ||
|
||
Receiver | ||
``` | ||
./benchmark.pl \ | ||
--lib uvgrtp \ | ||
--role recv \ | ||
--use-nc \ | ||
--addr 127.0.0.1 \ | ||
--port 9999 \ | ||
--threads 3 \ | ||
--start 30 \ | ||
--end 60 \ | ||
``` | ||
|
||
## Parsing the benchmark results | ||
|
||
If the log file matches the pattern `.*(send|recv).*(\d+)threads.*(\d+)fps.*(\d+)iter.*` you don't | ||
have to provide `--role` `--threads` or `--iter` | ||
|
||
### Parsing one output file | ||
|
||
#### Parse one benchmark, generic file name | ||
|
||
``` | ||
./parse.pl \ | ||
--lib ffmpeg \ | ||
--role recv \ | ||
--path log_file \ | ||
--threads 3 | ||
--iter 20 | ||
``` | ||
|
||
#### Parse one benchmark, output file generated by benchmark.pl | ||
|
||
``` | ||
./parse.pl --path results/uvgrtp/send_results_4threads_240fps_10iter | ||
``` | ||
|
||
### Parsing multiple output files | ||
|
||
NB: path must point to a directory! | ||
|
||
NB2: `--iter` needn't be provided if file names follow the pattern defined above | ||
|
||
#### Find best configuration | ||
|
||
Find the best configurations for maximizing single-thread performance and total performance | ||
where frame loss is less than 2% | ||
|
||
``` | ||
./parse.pl --path results/uvgrtp/all --iter 10 --parse=best --frame-loss=2 | ||
``` | ||
|
||
#### Output goodput/frame loss values to a CSV file | ||
|
||
|
||
``` | ||
./parse.pl --path results/uvgrtp/all --parse=csv | ||
``` |
Oops, something went wrong.