UDPv4¶
The following tests have been performed by executing an RTI Perftest C++98 Publisher and Subscriber between two nodes, connected to a switch via Ethernet. The communication has been restricted to a single interface and the transport has been set to UDPv4.
Find information about the hardware, network, and command-line parameters after each of the tests.
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Linux® nodes in a 1Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.
Detailed Statistics
The following tables contain the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
53 |
1.6 |
49 |
119 |
52 |
56 |
57 |
83 |
119 |
64 |
56 |
1.4 |
51 |
118 |
56 |
58 |
59 |
85 |
118 |
128 |
57 |
1.5 |
52 |
117 |
57 |
59 |
61 |
86 |
117 |
256 |
63 |
1.3 |
57 |
123 |
63 |
64 |
65 |
91 |
123 |
512 |
68 |
1.6 |
63 |
407 |
67 |
69 |
71 |
96 |
407 |
1024 |
82 |
1.2 |
76 |
145 |
82 |
83 |
84 |
109 |
145 |
2048 |
109 |
1.1 |
104 |
160 |
109 |
110 |
111 |
137 |
160 |
4096 |
161 |
1.2 |
156 |
212 |
161 |
162 |
164 |
190 |
212 |
8192 |
267 |
1.4 |
261 |
319 |
267 |
268 |
270 |
296 |
319 |
16384 |
343 |
1.5 |
336 |
399 |
343 |
344 |
345 |
372 |
399 |
32768 |
475 |
1.4 |
469 |
535 |
475 |
476 |
477 |
503 |
535 |
63000 |
736 |
1.5 |
730 |
804 |
736 |
737 |
738 |
767 |
804 |
Reliable
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
56 |
2.0 |
46 |
104 |
56 |
58 |
61 |
85 |
104 |
64 |
58 |
1.7 |
49 |
120 |
58 |
60 |
62 |
86 |
120 |
128 |
59 |
1.7 |
52 |
94 |
59 |
61 |
64 |
88 |
94 |
256 |
64 |
1.3 |
58 |
125 |
64 |
65 |
67 |
93 |
125 |
512 |
70 |
1.5 |
64 |
129 |
70 |
71 |
74 |
98 |
129 |
1024 |
83 |
1.3 |
77 |
138 |
83 |
84 |
87 |
111 |
138 |
2048 |
111 |
1.3 |
103 |
163 |
110 |
112 |
114 |
139 |
163 |
4096 |
163 |
1.3 |
157 |
218 |
163 |
164 |
166 |
192 |
218 |
8192 |
268 |
1.4 |
262 |
320 |
268 |
270 |
272 |
297 |
320 |
16384 |
344 |
1.5 |
337 |
401 |
344 |
346 |
348 |
374 |
401 |
32768 |
477 |
1.7 |
470 |
579 |
477 |
478 |
480 |
515 |
579 |
63000 |
738 |
10.0 |
732 |
1366 |
738 |
739 |
742 |
1295 |
1366 |
100000 |
1046 |
5.2 |
1037 |
1179 |
1044 |
1053 |
1056 |
1179 |
1179 |
500000 |
4308 |
15.7 |
4298 |
4583 |
4303 |
4347 |
4351 |
4583 |
4583 |
1048576 |
8848 |
40.4 |
8817 |
9436 |
8841 |
8927 |
8952 |
9436 |
9436 |
1548576 |
12956 |
30.6 |
12949 |
13733 |
12953 |
12971 |
12975 |
13733 |
13733 |
4194304 |
34654 |
130.9 |
34635 |
36718 |
34643 |
34650 |
34674 |
36718 |
36718 |
10485760 |
86529 |
482.9 |
86457 |
91313 |
86469 |
86478 |
88467 |
91313 |
91313 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the expected throughput behavior when performing a 1-1 communication between two Linux nodes in a 1Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
By default, RTI Perftest enables batching when performing a Maximum Throughput test. The batching feature allows sending more than one data sample per RTPS packet, improving network performance for small data sizes. See the RTI Connext Core Libraries User’s Manual for more information on batching.
The batch maximum size is set by RTI Perftest to be 8192 bytes; after 8192 bytes, batching is not enabled.
Detailed Statistics
This table contains the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
61341184 |
3064102 |
784.4 |
15868 |
0.03 |
64 |
33987787 |
1698526 |
869.6 |
10240 |
0.03 |
128 |
18088640 |
903963 |
925.7 |
0 |
0.00 |
256 |
9313440 |
465445 |
953.2 |
0 |
0.00 |
512 |
4726800 |
236241 |
967.6 |
0 |
0.00 |
1024 |
2381416 |
119020 |
975.0 |
0 |
0.00 |
2048 |
1194900 |
59737 |
978.7 |
0 |
0.00 |
4096 |
598616 |
29926 |
980.6 |
0 |
0.00 |
8192 |
300661 |
15027 |
984.9 |
0 |
0.00 |
16384 |
150965 |
7544 |
988.9 |
0 |
0.00 |
32768 |
75618 |
3780 |
990.9 |
17 |
0.02 |
63000 |
39361 |
1967 |
991.6 |
9 |
0.02 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
61298502 |
3062652 |
784.0 |
0 |
0.00 |
64 |
33965039 |
1697620 |
869.2 |
0 |
0.00 |
128 |
18073409 |
903469 |
925.2 |
0 |
0.00 |
256 |
9305409 |
465184 |
952.7 |
0 |
0.00 |
512 |
4722833 |
236106 |
967.1 |
0 |
0.00 |
1024 |
2379393 |
118952 |
974.5 |
0 |
0.00 |
2048 |
1194269 |
59703 |
978.2 |
0 |
0.00 |
4096 |
598269 |
29908 |
980.1 |
0 |
0.00 |
8192 |
300481 |
15021 |
984.5 |
0 |
0.00 |
16384 |
150957 |
7544 |
988.9 |
0 |
0.00 |
32768 |
75620 |
3779 |
990.8 |
0 |
0.00 |
63000 |
39361 |
1967 |
991.6 |
0 |
0.00 |
100000 |
24820 |
1238 |
991.1 |
0 |
0.00 |
500000 |
5002 |
247 |
991.7 |
0 |
0.00 |
1048576 |
1351 |
67 |
565.8 |
0 |
0.00 |
1548576 |
1622 |
79 |
988.9 |
0 |
0.00 |
4194304 |
587 |
28 |
942.1 |
0 |
0.00 |
10485760 |
238 |
11 |
981.9 |
0 |
0.00 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Linux nodes in a 1Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.
Detailed Statistics
The following tables contain the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
60 |
1.5 |
54 |
205 |
60 |
62 |
63 |
89 |
205 |
64 |
61 |
1.6 |
55 |
207 |
60 |
62 |
64 |
90 |
207 |
128 |
62 |
1.4 |
56 |
208 |
62 |
63 |
66 |
91 |
208 |
256 |
67 |
1.3 |
61 |
212 |
66 |
68 |
69 |
95 |
212 |
512 |
72 |
1.4 |
66 |
220 |
72 |
73 |
75 |
102 |
220 |
1024 |
86 |
1.4 |
81 |
232 |
86 |
87 |
89 |
115 |
232 |
2048 |
113 |
1.4 |
108 |
257 |
113 |
114 |
116 |
142 |
257 |
4096 |
166 |
1.5 |
158 |
308 |
166 |
167 |
169 |
196 |
308 |
8192 |
271 |
1.6 |
264 |
416 |
271 |
272 |
274 |
300 |
416 |
16384 |
347 |
1.8 |
340 |
491 |
347 |
349 |
350 |
388 |
491 |
32768 |
480 |
1.9 |
472 |
624 |
480 |
481 |
483 |
509 |
624 |
63000 |
740 |
2.1 |
734 |
883 |
740 |
742 |
744 |
812 |
883 |
Reliable
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
62 |
1.8 |
55 |
208 |
62 |
63 |
67 |
91 |
208 |
64 |
63 |
1.7 |
56 |
209 |
63 |
64 |
67 |
91 |
209 |
128 |
64 |
1.6 |
58 |
210 |
64 |
66 |
68 |
94 |
210 |
256 |
68 |
1.5 |
62 |
213 |
68 |
70 |
72 |
97 |
213 |
512 |
74 |
1.7 |
69 |
219 |
74 |
76 |
78 |
103 |
219 |
1024 |
88 |
1.6 |
81 |
232 |
87 |
89 |
92 |
117 |
232 |
2048 |
115 |
1.4 |
109 |
187 |
115 |
116 |
119 |
144 |
187 |
4096 |
167 |
1.4 |
162 |
239 |
167 |
169 |
171 |
197 |
239 |
8192 |
273 |
2.7 |
264 |
675 |
272 |
274 |
277 |
303 |
675 |
16384 |
349 |
1.6 |
341 |
406 |
349 |
350 |
352 |
379 |
406 |
32768 |
481 |
1.6 |
475 |
542 |
481 |
482 |
484 |
511 |
542 |
63000 |
742 |
1.9 |
735 |
811 |
742 |
743 |
746 |
772 |
811 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the expected throughput behavior when performing a 1-1 communication between two Linux nodes in a 1Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
By default, RTI Perftest enables batching when performing a Maximum Throughput test. The batching feature allows sending more than one data sample per RTPS packet, improving network performance for small data sizes. See the RTI Connext Core Libraries User’s Manual for more information on batching.
The batch maximum size is set by RTI Perftest to be 8192 bytes; after 8192 bytes, batching is not enabled.
Detailed Statistics
This table contains the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
23826462 |
1189337 |
304.5 |
103168 |
0.43 |
64 |
23605120 |
1178232 |
603.3 |
46592 |
0.20 |
128 |
15341120 |
766000 |
784.4 |
5760 |
0.04 |
256 |
8497984 |
424631 |
869.6 |
1952 |
0.02 |
512 |
4522192 |
225990 |
925.7 |
0 |
0.00 |
1024 |
2328112 |
116361 |
953.2 |
0 |
0.00 |
2048 |
1181708 |
59060 |
967.6 |
0 |
0.00 |
4096 |
595228 |
29755 |
975.0 |
0 |
0.00 |
8192 |
299747 |
14984 |
982.0 |
0 |
0.00 |
16384 |
150724 |
7533 |
987.5 |
0 |
0.00 |
32768 |
75558 |
3777 |
990.2 |
17 |
0.02 |
63000 |
39340 |
1966 |
991.3 |
9 |
0.02 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
21155072 |
1055933 |
270.3 |
0 |
0.00 |
64 |
21398814 |
1068481 |
547.1 |
0 |
0.00 |
128 |
15322240 |
765310 |
783.7 |
0 |
0.00 |
256 |
8491840 |
424414 |
869.2 |
0 |
0.00 |
512 |
4518465 |
225868 |
925.2 |
0 |
0.00 |
1024 |
2326353 |
116296 |
952.7 |
0 |
0.00 |
2048 |
1180737 |
59026 |
967.1 |
0 |
0.00 |
4096 |
594849 |
29738 |
974.5 |
0 |
0.00 |
8192 |
299621 |
14978 |
981.6 |
0 |
0.00 |
16384 |
148221 |
7408 |
971.1 |
0 |
0.00 |
32768 |
75580 |
3777 |
990.1 |
0 |
0.00 |
63000 |
39331 |
1965 |
990.7 |
0 |
0.00 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Linux nodes in a 10Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.
Detailed Statistics
The following tables contain the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
15 |
1.0 |
15 |
69 |
15 |
16 |
17 |
45 |
69 |
64 |
16 |
0.9 |
15 |
69 |
15 |
16 |
17 |
45 |
69 |
128 |
16 |
0.9 |
15 |
57 |
16 |
17 |
18 |
46 |
57 |
256 |
16 |
0.9 |
15 |
54 |
16 |
16 |
18 |
46 |
54 |
512 |
19 |
1.7 |
16 |
58 |
19 |
21 |
22 |
47 |
58 |
1024 |
25 |
3.8 |
17 |
67 |
26 |
28 |
33 |
56 |
67 |
2048 |
36 |
345.7 |
20 |
100055 |
31 |
50 |
67 |
86 |
100055 |
4096 |
31 |
143.4 |
24 |
100060 |
30 |
36 |
53 |
74 |
100060 |
8192 |
43 |
71.3 |
35 |
4930 |
37 |
56 |
68 |
4456 |
4930 |
16384 |
89 |
24.5 |
45 |
217 |
79 |
120 |
125 |
147 |
217 |
32768 |
128 |
11.7 |
65 |
239 |
124 |
142 |
175 |
189 |
239 |
63000 |
184 |
2.9 |
100 |
311 |
184 |
186 |
189 |
214 |
311 |
Reliable
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
18 |
7.9 |
16 |
4824 |
17 |
18 |
22 |
47 |
4824 |
64 |
17 |
1.2 |
16 |
71 |
17 |
18 |
22 |
47 |
71 |
128 |
18 |
1.3 |
16 |
69 |
17 |
18 |
24 |
47 |
69 |
256 |
18 |
1.6 |
17 |
58 |
18 |
20 |
26 |
48 |
58 |
512 |
20 |
2.6 |
17 |
82 |
19 |
21 |
30 |
49 |
82 |
1024 |
25 |
4.7 |
18 |
113 |
26 |
28 |
41 |
59 |
113 |
2048 |
29 |
33.7 |
21 |
4925 |
30 |
33 |
40 |
71 |
4925 |
4096 |
31 |
24.0 |
25 |
4819 |
30 |
36 |
50 |
70 |
4819 |
8192 |
43 |
71.3 |
35 |
4930 |
37 |
56 |
68 |
4456 |
4930 |
16384 |
87 |
25.6 |
46 |
204 |
86 |
125 |
138 |
154 |
204 |
32768 |
135 |
18.3 |
66 |
230 |
124 |
166 |
181 |
198 |
230 |
63000 |
186 |
2.7 |
107 |
340 |
186 |
187 |
191 |
216 |
340 |
100000 |
203 |
11.0 |
149 |
1236 |
208 |
211 |
216 |
261 |
1236 |
500000 |
608 |
32.8 |
513 |
785 |
612 |
650 |
667 |
729 |
785 |
1048576 |
1142 |
62.4 |
1038 |
1676 |
1173 |
1188 |
1294 |
1676 |
1676 |
1548576 |
1583 |
76.0 |
1448 |
2184 |
1631 |
1651 |
1673 |
2184 |
2184 |
4194304 |
4136 |
179.9 |
3994 |
5674 |
4044 |
4455 |
4502 |
5674 |
5674 |
10485760 |
10302 |
140.6 |
10249 |
14139 |
10294 |
10330 |
10357 |
14139 |
14139 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the expected throughput behavior when performing a 1-1 communication between two Linux nodes in a 10Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
By default, RTI Perftest enables batching when performing a Maximum Throughput test. The batching feature allows sending more than one data sample per RTPS packet, improving network performance for small data sizes. See the RTI Connext Core Libraries User’s Manual for more information on batching.
The batch maximum size is set by RTI Perftest to be 8192 bytes; after 8192 bytes, batching is not enabled.
Detailed Statistics
This table contains the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
96567174 |
4822939 |
1234.7 |
133888 |
0.14 |
64 |
88277933 |
4408632 |
2257.2 |
0 |
0.00 |
128 |
78236376 |
3907863 |
4001.7 |
0 |
0.00 |
256 |
61245120 |
3057756 |
6262.3 |
0 |
0.00 |
512 |
43312848 |
2162371 |
8857.1 |
0 |
0.00 |
1024 |
23817335 |
1190128 |
9749.5 |
0 |
0.00 |
2048 |
11952159 |
597348 |
9787.0 |
0 |
0.00 |
4096 |
5987406 |
299257 |
9806.1 |
0 |
0.00 |
8192 |
3006174 |
150276 |
9848.5 |
0 |
0.00 |
16384 |
1509068 |
75446 |
9888.9 |
34 |
0.00 |
32768 |
756015 |
37798 |
9908.7 |
8 |
0.00 |
63000 |
393520 |
19675 |
9916.3 |
4 |
0.00 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
92191882 |
4603759 |
1178.6 |
0 |
0.00 |
64 |
82246912 |
4106899 |
2102.7 |
0 |
0.00 |
128 |
69599190 |
3476168 |
3559.6 |
0 |
0.00 |
256 |
52012088 |
2597675 |
5320.0 |
0 |
0.00 |
512 |
34342828 |
1715328 |
7026.0 |
0 |
0.00 |
1024 |
20394416 |
1018645 |
8344.7 |
0 |
0.00 |
2048 |
11496140 |
574177 |
9407.3 |
0 |
0.00 |
4096 |
5979302 |
298635 |
9785.7 |
0 |
0.00 |
8192 |
3004618 |
150185 |
9842.6 |
0 |
0.00 |
16384 |
1508831 |
75431 |
9887.0 |
0 |
0.00 |
32768 |
756045 |
37797 |
9908.3 |
0 |
0.00 |
63000 |
393539 |
19674 |
9915.8 |
0 |
0.00 |
100000 |
247582 |
12376 |
9901.5 |
0 |
0.00 |
500000 |
46851 |
2340 |
9361.4 |
0 |
0.00 |
1048576 |
15904 |
792 |
6652.0 |
0 |
0.00 |
1548576 |
14951 |
746 |
9253.7 |
0 |
0.00 |
4194304 |
5116 |
255 |
8569.6 |
0 |
0.00 |
10485760 |
2069 |
103 |
8678.7 |
0 |
0.00 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Linux nodes in a 10Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.
Detailed Statistics
The following tables contain the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
19 |
1.1 |
18 |
167 |
19 |
20 |
21 |
49 |
167 |
64 |
19 |
1.2 |
18 |
167 |
19 |
20 |
22 |
49 |
167 |
128 |
19 |
1.2 |
18 |
166 |
19 |
20 |
22 |
50 |
166 |
256 |
20 |
1.3 |
18 |
170 |
19 |
20 |
22 |
49 |
170 |
512 |
20 |
1.2 |
19 |
169 |
20 |
21 |
23 |
51 |
169 |
1024 |
25 |
2.6 |
20 |
174 |
26 |
28 |
29 |
56 |
174 |
2048 |
29 |
155.0 |
22 |
64470 |
30 |
32 |
34 |
64 |
64470 |
4096 |
31 |
183.3 |
26 |
95677 |
30 |
32 |
46 |
62 |
95677 |
8192 |
54 |
687.0 |
37 |
98629 |
41 |
58 |
62 |
38501 |
98629 |
16384 |
94 |
24.2 |
48 |
263 |
83 |
126 |
133 |
153 |
263 |
32768 |
151 |
21.1 |
74 |
324 |
156 |
177 |
185 |
226 |
324 |
63000 |
171 |
20.0 |
102 |
304 |
170 |
190 |
193 |
255 |
304 |
Reliable
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
21 |
1.3 |
19 |
168 |
20 |
21 |
24 |
50 |
168 |
64 |
21 |
1.3 |
19 |
167 |
20 |
21 |
25 |
51 |
167 |
128 |
21 |
1.4 |
19 |
167 |
20 |
21 |
26 |
51 |
167 |
256 |
21 |
1.9 |
19 |
169 |
21 |
22 |
31 |
51 |
169 |
512 |
22 |
11.2 |
20 |
5057 |
21 |
24 |
34 |
52 |
5057 |
1024 |
26 |
7.6 |
21 |
2936 |
26 |
28 |
44 |
61 |
2936 |
2048 |
29 |
4.4 |
23 |
171 |
30 |
32 |
47 |
66 |
171 |
4096 |
31 |
15.5 |
28 |
4651 |
30 |
32 |
51 |
68 |
4651 |
8192 |
45 |
7.9 |
38 |
187 |
41 |
56 |
78 |
104 |
187 |
16384 |
94 |
23.2 |
50 |
238 |
93 |
124 |
147 |
175 |
238 |
32768 |
155 |
21.0 |
72 |
254 |
160 |
179 |
186 |
211 |
254 |
63000 |
173 |
15.4 |
110 |
270 |
171 |
191 |
194 |
230 |
270 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the expected throughput behavior when performing a 1-1 communication between two Linux nodes in a 10Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.
Note
By default, RTI Perftest enables batching when performing a Maximum Throughput test. The batching feature allows sending more than one data sample per RTPS packet, improving network performance for small data sizes. See the RTI Connext Core Libraries User’s Manual for more information on batching.
The batch maximum size is set by RTI Perftest to be 8192 bytes; after 8192 bytes, batching is not enabled.
Detailed Statistics
This table contains the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
24109312 |
1204041 |
308.2 |
49152 |
0.20 |
64 |
24419921 |
1218263 |
623.8 |
789120 |
3.13 |
128 |
23681536 |
1182608 |
1211.0 |
29696 |
0.13 |
256 |
15869536 |
1056799 |
2164.3 |
24544 |
0.15 |
512 |
13832864 |
920899 |
3772.0 |
19920 |
0.14 |
1024 |
14058600 |
702217 |
5752.6 |
11136 |
0.08 |
2048 |
7404529 |
492928 |
8076.1 |
7048 |
0.10 |
4096 |
5947530 |
297021 |
9732.8 |
0 |
0.00 |
8192 |
2998127 |
149843 |
9820.2 |
0 |
0.00 |
16384 |
1506931 |
75337 |
9874.7 |
20 |
0.00 |
32768 |
755527 |
37773 |
9902.1 |
9 |
0.00 |
63000 |
393373 |
19667 |
9912.5 |
6 |
0.00 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
21302016 |
1063267 |
272.2 |
0 |
0.00 |
64 |
21355137 |
1066104 |
545.8 |
0 |
0.00 |
128 |
20264373 |
1012344 |
1036.6 |
0 |
0.00 |
256 |
18149760 |
907032 |
1857.6 |
0 |
0.00 |
512 |
11424256 |
760254 |
3114.0 |
0 |
0.00 |
1024 |
11315809 |
565031 |
4628.7 |
0 |
0.00 |
2048 |
5720480 |
380675 |
6237.0 |
0 |
0.00 |
4096 |
3481846 |
231697 |
7592.3 |
0 |
0.00 |
8192 |
2982338 |
149011 |
9765.6 |
0 |
0.00 |
16384 |
1506761 |
75322 |
9872.7 |
0 |
0.00 |
32768 |
755504 |
37770 |
9901.2 |
0 |
0.00 |
63000 |
393391 |
19666 |
9912.1 |
0 |
0.00 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000" export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760" export domain="2" export exec_time=20 export num_reps=1 export instance_number=100000 export core=0 # We will use some colors to improve visibility of errors and info messages. RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[0;33m' BLUE='\033[0;34m' LIGHTBLUE='\033[0;36m' NC='\033[0m' INFO_TAG="${GREEN}[INFO]:${NC}" WARNING_TAG="${YELLOW}[WARNING]:${NC}" ERROR_TAG="${RED}[ERROR]:${NC}" export ip_machine_1="10.2.78.20" export ip_machine_2="10.2.78.21" export if10Gbps="enp1s0f0" export if1Gbps="eno1" ################################################################################ function disable_colors() { export RED="" export GREEN="" export YELLOW="" export NC="" export BLUE="" export LIGHTBLUE="" export INFO_TAG="${GREEN}[INFO]:${NC}" export WARNING_TAG="${YELLOW}[WARNING]:${NC}" export ERROR_TAG="${RED}[ERROR]:${NC}" } function change_domain() { if [[ "$domain" == "1" ]]; then export domain="2" else export domain="1" fi } # Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize> function execute_test() { local keyed_unkeyed=$1 local rel_be=$2 local datasizes_test=$3 local other_args=$4 local name_suffix=$5 local commands_string_test=$commands_string local tag="" if [[ "${keyed_unkeyed}" == "keyed" ]]; then commands_string_test="${commands_string_test} -keyed -instances $instance_number" tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|" else tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|" fi if [[ "${rel_be}" == "be" ]]; then commands_string_test="${commands_string_test} -bestEffort" tag="${tag}${YELLOW}BE${NC}]" else tag="${tag}${RED}REL${NC}]" fi tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]" local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv if [[ "$role" == "pub" ]]; then echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}" fi if [[ "$NO_TASKSET" == "" ]]; then if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then export pre_command_string="taskset -c $core" fi fi if [[ "$LANGUAGE" == "python" ]]; then export pre_command_string="python3 " fi if [[ "$DOCKER" == "1" ]]; then export pre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR " executable="" fi # Get the aprox time this will take: total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps)) total_time=$((total_tests * exec_time)) touch $output_file local no_headers="" local current_test=0 for index in $(seq 1 ${num_reps}); do for DATALEN in ${datasizes_test}; do current_test=$((current_test + 1)) export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers" if [[ "$role" == "pub" ]]; then echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s" echo -e ${BLUE}$command${NC} else echo -e ${LIGHTBLUE}$command${NC} fi if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then sleep 3 fi if [[ "$raw" == "1" && "$role" == "sub" ]]; then sleep 5 fi if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info before" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt fi eval $command >> $output_file; if [[ "${get_netstat_info}" == "1" ]]; then echo -e "${INFO_TAG} Getting netstat info after" netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" python3 $script_location/../../../tools/diff_netstat_output.py \ -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \ -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \ -d $DATALEN $no_header_netstat \ -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv" rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt no_header_netstat=" -nh" fi no_headers=" -noOutputHeaders" change_domain done done } ################################################################################ # PARSE COMMAND LINE OPTIONS: while [ "$1" != "" ]; do case $1 in --executable) executable=$2 shift ;; --docker) DOCKER="1" ;; --output-folder) output_folder=$2 shift ;; --sub-folder) sub_folder=$2 shift ;; --role) export role=$2 shift ;; --core) export core=$2 shift ;; --test-kind) export lat_thr=$2 shift ;; --interface1) export interface=$2 shift ;; --interface2) export interface2=$2 shift ;; --ip1) export ip1=$2 shift ;; --ip2) export ip2=$2 shift ;; --repetitions) export num_reps=$2 shift ;; --domain) export domain=$2 shift ;; --execution-time) export exec_time=$2 shift ;; --transport) export transport=$2 shift ;; --datalen) export datalen_input=$2 shift ;; --file-suffix) export file_suffix=$2 shift ;; --executable-suffix) export executable_suffix=$2 shift ;; --extra-arguments) export extra_arguments=$2 shift ;; --extra-arguments-pub) export extra_arguments_pub=$2 shift ;; --extra-arguments-sub) export extra_arguments_sub=$2 shift ;; --skip-no-batching) export skip_no_batching="1" ;; --skip-be) export skip_be_tests="1" ;; --skip-rel) export skip_rel_tests="1" ;; --skip-keyed) export skip_keyed_data="1" ;; --skip-large-data) export skip_large_data="1" ;; --large-data) export large_data="1" ;; --keyed) export skip_unkeyed="1" ;; --unkeyed) export skip_keyed_data="1" ;; --no-batching | --skip-batching) export no_batching_only="1" ;; --reliable) export skip_be_tests="1" ;; --best-effort) export skip_rel_tests="1" ;; --security) export security_only="$2" shift ;; --micro) export micro="1" ;; --raw | --raw-transport) export raw="1" ;; --tss) export tss="1" ;; --no-colors) export NO_COLORS="1" ;; --language) export LANGUAGE=$2 shift ;; --loss-rate) export loss_rate=$2 shift ;; --get-netstat-info | --netstat) export get_netstat_info="1" ;; --no-taskset) export NO_TASKSET="1" ;; *) echo -e "unknown parameter \"$1\"" exit 255 ;; esac shift done if [[ "$NO_COLORS" == "1" ]]; then disable_colors fi export folder_base="$(dirname "${executable}")"/../../.. if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then export folder_base="$(dirname "${executable}")"/../.. fi if [[ $tss == "1" ]]; then export folder_base="$(dirname "${executable}")"/../../../../.. fi if [[ "${executable_suffix}" != "" ]]; then export executable="${executable}${executable_suffix}" fi if [[ "${sub_folder}" != "" ]]; then export output_folder="${output_folder}/${sub_folder}" fi echo -e "${INFO_TAG} Perftest executable is: $executable" echo -e "${INFO_TAG} Output folder is: $output_folder" ################################################################################ if [[ "$LANGUAGE" == "python" ]]; then export skip_keyed_data="1" export skip_large_data="1" export skip_be_tests="1" export skip_no_batching="1" fi if [[ "${skip_large_data}" == "1" ]]; then export datasizes_extended=${datasizes} elif [[ "${large_data}" == "1" ]]; then export datasizes=${datasizes_extended} fi if [[ "${datalen_input}" != "" ]]; then echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}" export datasizes=${datalen_input} export datasizes_extended=${datalen_input} if [[ "${no_batching_only}" != "1" ]]; then export skip_large_data="1" fi fi if [[ "$role" != "pub" && "$role" != "sub" ]]; then echo -e "${ERROR_TAG} It must be either publisher or subscriber" exit 255 fi if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then echo -e "${ERROR_TAG} It must be either lat or thr" exit 255 fi if [[ "${interface}" == "" ]]; then echo "Using default nics" export nic_publisher=${ip_machine_1} export nic_subscriber=${ip_machine_2} elif [[ "${interface}" == "both" ]]; then export nic_publisher="enp1s0f0,eno1" export nic_subscriber="enp1s0f0,eno1" echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" else export nic_publisher=$interface echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}" if [[ "${interface2}" == "" ]]; then export nic_subscriber=$interface else export nic_subscriber=$interface2 fi echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}" if [[ "${ip1}" != "" ]]; then export ip_publisher=$ip1 echo "Using ip_publisher: ${ip_publisher}" fi if [[ "${ip2}" != "" ]]; then export ip_subscriber=$ip2 echo "Using ip_subscriber: ${ip_subscriber}" fi fi export transport_string="-transport $transport" if [[ "$transport" == "UDPv4" ]]; then export transport_string_pub="$transport_string -nic $nic_publisher" export transport_string_sub="$transport_string -nic $nic_subscriber" if [[ "$micro" == "1" || "$raw" == "1" ]]; then export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}" export transport_string_sub="$transport_string_sub -peer ${ip_publisher}" fi elif [[ "$transport" == "TCP" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "TLS" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400" elif [[ "$transport" == "UDPv4_WAN" ]]; then export transport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400" export transport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400" else export transport_string_pub="$transport_string" export transport_string_sub="$transport_string" fi ################################################################################ export pub_string="-pub \ ${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time" if [[ ${lat_thr} == "lat" ]]; then export pub_string="$pub_string \ -latencyTest" fi export sub_string="-sub \ ${transport_string_sub} \ -noPrintIntervals" if [[ "$role" == "pub" ]]; then echo -e "$INFO_TAG Publisher side running" export commands_string=${pub_string} export extra_arguments="${extra_arguments} ${extra_arguments_pub}" else echo -e "$INFO_TAG Subscriber side running" export commands_string=${sub_string} export extra_arguments="${extra_arguments} ${extra_arguments_sub}" fi ############################################################################### echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh" sudo /set_${lat_thr}_mode.sh sleep 5 echo -e "${INFO_TAG} Disabling any loss rate" sudo tc qdisc add dev $nic_publisher root netem loss 0% sudo tc qdisc del dev $nic_publisher root netem loss 0% if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%" sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate% fi cd $folder_base echo -e "${INFO_TAG} Folder Base is: $PWD" mkdir -p $output_folder # Tests that may use batching (when doing throughput tests) if [[ ${no_batching_only} != "1" ]]; then # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi # KEYED if [[ "${skip_keyed_data}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix" fi fi fi if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then no_batching_tests="1" fi # Tests that will not use batching if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then if [[ "$role" == "pub" ]]; then export commands_string="${commands_string} -batchSize 0" fi # UNKEYED if [[ "${skip_unkeyed}" == "" ]]; then # RELIABLE if [[ "${skip_rel_tests}" == "" ]]; then execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi # BEST EFFORT if [[ "${skip_be_tests}" == "" ]]; then execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}" fi fi fi if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then echo -e "${INFO_TAG} Disabling loss rate" sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate% fi |
1 2 3 4 5 6 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $@ --transport UDPv4 |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 7.3.0 Host and Target Libraries for x64 Linux (x64Linux4gcc7.3.0)
Test Hardware
The following hardware was used to perform these tests:
Linux Nodes
Dell R340 Servers (13 Units)
Processor: Intel Xeon E-2278G (3.4-5GHz, 8c/16t, 16MB cache, 2 memory channels @2666MHz)
RAM: 4x 16GB 2666MHz DIMM (64GB RAM)
HD: 480GB SATA SSD
NIC 1: Intel 710 dual port 10Gbps SFP
OS: Ubuntu 20.04 -- gcc 9.3.0
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps interfaces)
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Raspberry Pi 4 nodes using a 1Gbps network. The numbers are for best-effort as well as strict reliable delivery scenarios.
Note
We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.
Detailed Statistics
The following tables contain the raw numbers presented by RTI Perftest. These numbers are the exact output with no further processing.
Best Effort
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
127 |
14.0 |
105 |
1769 |
124 |
134 |
163 |
588 |
1769 |
64 |
126 |
18.0 |
99 |
2546 |
124 |
133 |
163 |
1002 |
2546 |
128 |
128 |
9.3 |
105 |
901 |
125 |
135 |
161 |
339 |
901 |
256 |
132 |
16.9 |
111 |
1605 |
128 |
140 |
171 |
1005 |
1605 |
512 |
143 |
14.1 |
116 |
1810 |
139 |
156 |
186 |
440 |
1810 |
1024 |
159 |
15.5 |
129 |
1774 |
155 |
168 |
201 |
515 |
1774 |
2048 |
206 |
24.3 |
165 |
2944 |
202 |
221 |
257 |
1226 |
2944 |
4096 |
227 |
27.4 |
195 |
3663 |
222 |
246 |
284 |
1281 |
3663 |
8192 |
296 |
48.3 |
238 |
6354 |
289 |
321 |
368 |
1049 |
6354 |
16384 |
431 |
30.3 |
371 |
1782 |
425 |
459 |
520 |
1413 |
1782 |
32768 |
733 |
51.7 |
650 |
3737 |
726 |
770 |
840 |
2353 |
3737 |
63000 |
1279 |
80.2 |
1120 |
6052 |
1270 |
1323 |
1407 |
6052 |
6052 |
Reliable
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
143 |
31.8 |
112 |
2731 |
133 |
180 |
251 |
607 |
2731 |
64 |
143 |
20.4 |
114 |
645 |
135 |
179 |
213 |
407 |
645 |
128 |
143 |
20.9 |
116 |
1625 |
135 |
180 |
208 |
468 |
1625 |
256 |
144 |
26.4 |
116 |
2998 |
136 |
181 |
212 |
1069 |
2998 |
512 |
151 |
21.0 |
120 |
1513 |
144 |
185 |
220 |
399 |
1513 |
1024 |
162 |
21.1 |
133 |
1668 |
156 |
183 |
231 |
422 |
1668 |
2048 |
219 |
34.4 |
178 |
4476 |
212 |
240 |
292 |
1780 |
4476 |
4096 |
241 |
26.2 |
197 |
1708 |
235 |
259 |
353 |
1132 |
1708 |
8192 |
316 |
32.9 |
260 |
2169 |
308 |
344 |
425 |
1678 |
2169 |
16384 |
457 |
58.6 |
386 |
6177 |
448 |
493 |
567 |
2348 |
6177 |
32768 |
775 |
47.8 |
701 |
2312 |
765 |
826 |
909 |
1975 |
2312 |
63000 |
1322 |
61.4 |
1202 |
3255 |
1313 |
1379 |
1461 |
3255 |
3255 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The exact script used can be found here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |