Shared Memory¶
The following tests have been performed by executing the RTI Perftest C++98 benchmark application between two applications within the same node. The communication has been set to use Shared Memory (SHMEM).
Find the information about the hardware, network and command-line parameters after each of the tests.
Unkeyed, Shared Memory, C++98¶
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two processes within a single node. 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 |
8 |
0.6 |
8 |
33 |
8 |
9 |
10 |
17 |
33 |
64 |
8 |
0.6 |
8 |
27 |
8 |
9 |
10 |
16 |
27 |
128 |
8 |
0.6 |
7 |
27 |
8 |
9 |
10 |
17 |
27 |
256 |
8 |
0.6 |
8 |
28 |
8 |
9 |
10 |
17 |
28 |
512 |
8 |
0.6 |
8 |
94 |
8 |
9 |
10 |
16 |
94 |
1024 |
9 |
0.7 |
7 |
29 |
8 |
9 |
10 |
18 |
29 |
2048 |
8 |
0.6 |
7 |
148 |
8 |
9 |
10 |
17 |
148 |
4096 |
9 |
0.5 |
8 |
31 |
9 |
9 |
10 |
17 |
31 |
8192 |
9 |
0.6 |
9 |
28 |
9 |
9 |
10 |
17 |
28 |
16384 |
10 |
0.7 |
10 |
32 |
10 |
11 |
12 |
20 |
32 |
32768 |
13 |
0.7 |
12 |
43 |
13 |
13 |
14 |
29 |
43 |
63000 |
16 |
0.9 |
16 |
97 |
16 |
17 |
18 |
46 |
97 |
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 |
10 |
1.3 |
8 |
27 |
9 |
12 |
17 |
20 |
27 |
64 |
10 |
1.2 |
8 |
26 |
9 |
12 |
14 |
20 |
26 |
128 |
10 |
1.1 |
8 |
31 |
9 |
12 |
13 |
20 |
31 |
256 |
10 |
1.2 |
8 |
106 |
9 |
12 |
14 |
20 |
106 |
512 |
10 |
1.1 |
9 |
34 |
10 |
12 |
14 |
20 |
34 |
1024 |
10 |
1.1 |
9 |
31 |
10 |
12 |
14 |
20 |
31 |
2048 |
10 |
1.2 |
9 |
32 |
10 |
12 |
17 |
20 |
32 |
4096 |
10 |
1.1 |
9 |
34 |
10 |
13 |
14 |
21 |
34 |
8192 |
11 |
1.3 |
9 |
39 |
10 |
13 |
18 |
21 |
39 |
16384 |
12 |
1.2 |
10 |
39 |
12 |
14 |
19 |
24 |
39 |
32768 |
14 |
1.2 |
13 |
51 |
14 |
15 |
22 |
34 |
51 |
63000 |
18 |
1.4 |
14 |
66 |
18 |
19 |
27 |
52 |
66 |
100000 |
27 |
3.0 |
24 |
122 |
26 |
27 |
42 |
81 |
122 |
500000 |
91 |
12.5 |
78 |
522 |
90 |
92 |
146 |
355 |
522 |
1048576 |
275 |
55.1 |
161 |
1069 |
282 |
291 |
436 |
727 |
1069 |
1548576 |
414 |
75.1 |
247 |
1531 |
430 |
442 |
600 |
1092 |
1531 |
4194304 |
1328 |
178.4 |
951 |
4774 |
1372 |
1384 |
1393 |
4774 |
4774 |
10485760 |
2665 |
500.5 |
2445 |
11940 |
2474 |
3507 |
3534 |
11940 |
11940 |
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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 6.1.2 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 processes within a single node. 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 DDS 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 |
99848448 |
5304581 |
1358.0 |
151552 |
0.15 |
64 |
99842816 |
5083146 |
2602.6 |
157184 |
0.16 |
128 |
89786247 |
4484755 |
4592.4 |
22208 |
0.02 |
256 |
73990240 |
3695459 |
7568.3 |
0 |
0.00 |
512 |
56202241 |
2806933 |
11497.2 |
0 |
0.00 |
1024 |
36096344 |
1802063 |
14762.5 |
0 |
0.00 |
2048 |
21042828 |
1051045 |
17220.3 |
0 |
0.00 |
4096 |
11245020 |
561587 |
18402.1 |
0 |
0.00 |
8192 |
7442711 |
371564 |
24350.8 |
0 |
0.00 |
16384 |
5728289 |
286117 |
37502.0 |
0 |
0.00 |
32768 |
3780137 |
188823 |
49498.9 |
0 |
0.00 |
63000 |
2830038 |
141284 |
71207.2 |
0 |
0.00 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
100000000 |
5074777 |
1299.1 |
0 |
0.00 |
64 |
94229035 |
4705306 |
2409.1 |
0 |
0.00 |
128 |
81210701 |
4056083 |
4153.4 |
0 |
0.00 |
256 |
64660560 |
3228843 |
6612.7 |
0 |
0.00 |
512 |
45314613 |
2262945 |
9269.0 |
0 |
0.00 |
1024 |
27567274 |
1376728 |
11278.2 |
0 |
0.00 |
2048 |
14740572 |
736168 |
12061.4 |
0 |
0.00 |
4096 |
7793475 |
389226 |
12754.2 |
0 |
0.00 |
8192 |
4457214 |
222590 |
14587.7 |
0 |
0.00 |
16384 |
3816310 |
190598 |
24982.1 |
0 |
0.00 |
32768 |
2897644 |
144715 |
37936.4 |
0 |
0.00 |
63000 |
2179668 |
108865 |
54868.3 |
0 |
0.00 |
100000 |
955138 |
47694 |
38155.6 |
0 |
0.00 |
500000 |
296815 |
14823 |
59292.9 |
0 |
0.00 |
1048576 |
157374 |
7859 |
65933.2 |
0 |
0.00 |
1548576 |
109677 |
5477 |
67864.2 |
0 |
0.00 |
4194304 |
27820 |
1389 |
46634.6 |
0 |
0.00 |
10485760 |
9499 |
474 |
39824.3 |
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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 6.1.2 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 processes within a single node. 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) |
Avg (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
86 |
8.2 |
82 |
328 |
84 |
88 |
111 |
247 |
328 |
64 |
85 |
8.3 |
80 |
313 |
84 |
87 |
111 |
245 |
313 |
128 |
86 |
7.9 |
82 |
384 |
84 |
88 |
110 |
245 |
384 |
256 |
86 |
8.2 |
82 |
312 |
84 |
87 |
111 |
249 |
312 |
512 |
87 |
8.4 |
83 |
333 |
85 |
89 |
111 |
255 |
333 |
1024 |
88 |
8.6 |
83 |
318 |
86 |
89 |
111 |
272 |
318 |
2048 |
88 |
9.3 |
84 |
339 |
86 |
89 |
115 |
288 |
339 |
4096 |
90 |
10.9 |
86 |
431 |
88 |
91 |
117 |
310 |
431 |
8192 |
97 |
12.3 |
91 |
435 |
94 |
98 |
130 |
366 |
435 |
16384 |
105 |
15.6 |
98 |
581 |
102 |
106 |
136 |
462 |
581 |
32768 |
127 |
20.5 |
119 |
829 |
124 |
131 |
161 |
656 |
829 |
63000 |
184 |
31.7 |
169 |
1327 |
179 |
196 |
225 |
1038 |
1327 |
Reliable
Sample Size (Bytes) |
Avg (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
102 |
25.1 |
87 |
523 |
91 |
148 |
183 |
364 |
523 |
64 |
103 |
25.1 |
88 |
516 |
92 |
148 |
184 |
398 |
516 |
128 |
101 |
23.5 |
83 |
346 |
90 |
146 |
175 |
250 |
346 |
256 |
103 |
24.7 |
84 |
314 |
92 |
152 |
179 |
259 |
314 |
512 |
102 |
25.6 |
88 |
521 |
91 |
150 |
184 |
394 |
521 |
1024 |
105 |
23.8 |
89 |
330 |
94 |
153 |
177 |
248 |
330 |
2048 |
106 |
25.8 |
91 |
327 |
94 |
158 |
185 |
270 |
327 |
4096 |
111 |
25.8 |
95 |
286 |
99 |
163 |
190 |
261 |
286 |
8192 |
119 |
30.8 |
100 |
641 |
106 |
175 |
225 |
500 |
641 |
16384 |
135 |
34.6 |
114 |
742 |
121 |
197 |
256 |
626 |
742 |
32768 |
168 |
40.1 |
141 |
945 |
152 |
232 |
293 |
887 |
945 |
63000 |
231 |
50.8 |
198 |
1589 |
212 |
294 |
357 |
1331 |
1589 |
100000 |
420 |
82.2 |
373 |
2482 |
388 |
497 |
592 |
2017 |
2482 |
500000 |
1262 |
307.6 |
1054 |
4802 |
1142 |
1636 |
3066 |
4802 |
4802 |
1048576 |
4240 |
875.3 |
3897 |
9733 |
4057 |
4178 |
8322 |
9733 |
9733 |
1548576 |
6072 |
1558.7 |
5619 |
31364 |
5743 |
5874 |
11932 |
31364 |
31364 |
4194304 |
15305 |
3455.3 |
13991 |
38309 |
14504 |
15138 |
31159 |
38309 |
38309 |
10485760 |
37575 |
8927.7 |
33825 |
95439 |
35612 |
37036 |
77874 |
95439 |
95439 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The script used to execute the tests 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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Hardware
The following hardware was used to perform these tests:
Raspberry Pi Nodes
Raspberry Pi 4
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps Interfaces)
Wireless Router
Consumer grace wireless router with 1Gbps interface.
The graph below shows the expected throughput behavior when performing a 1-1 communication between two processes within a single node. 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 DDS 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 |
3648753 |
182760 |
50.8 |
0 |
0.00 |
64 |
3438592 |
171837 |
92.0 |
0 |
0.00 |
128 |
3049856 |
152324 |
156.0 |
0 |
0.00 |
256 |
2457998 |
122834 |
251.6 |
0 |
0.00 |
512 |
1780472 |
88933 |
364.3 |
0 |
0.00 |
1024 |
1140624 |
56995 |
466.9 |
0 |
0.00 |
2048 |
667448 |
33355 |
546.5 |
12 |
0.00 |
4096 |
365683 |
18263 |
598.5 |
0 |
0.00 |
8192 |
219297 |
10954 |
717.9 |
29871 |
11.99 |
16384 |
202293 |
10104 |
1324.5 |
18289 |
8.29 |
32768 |
174523 |
8715 |
2284.7 |
17289 |
9.01 |
63000 |
137932 |
6887 |
3471.3 |
5199 |
3.63 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
3428096 |
171244 |
43.8 |
0 |
0.00 |
64 |
3220992 |
160971 |
82.4 |
0 |
0.00 |
128 |
2770048 |
138324 |
141.6 |
0 |
0.00 |
256 |
2153088 |
107586 |
220.3 |
0 |
0.00 |
512 |
1623536 |
81113 |
332.2 |
0 |
0.00 |
1024 |
1157392 |
57806 |
473.6 |
0 |
0.00 |
2048 |
675324 |
33730 |
552.6 |
0 |
0.00 |
4096 |
356478 |
17806 |
583.5 |
0 |
0.00 |
8192 |
191750 |
9575 |
627.6 |
0 |
0.00 |
16384 |
174685 |
8721 |
1143.2 |
0 |
0.00 |
32768 |
134147 |
6705 |
1757.7 |
0 |
0.00 |
63000 |
94519 |
4720 |
2379.3 |
0 |
0.00 |
100000 |
46175 |
2306 |
1845.1 |
0 |
0.00 |
500000 |
15837 |
792 |
3168.2 |
0 |
0.00 |
1048576 |
4681 |
234 |
1966.3 |
0 |
0.00 |
1548576 |
3335 |
167 |
2072.8 |
0 |
0.00 |
4194304 |
1323 |
66 |
2239.8 |
0 |
0.00 |
10485760 |
543 |
27 |
2317.4 |
0 |
0.00 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The script used to execute the tests 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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Hardware
The following hardware was used to perform these tests:
Raspberry Pi Nodes
Raspberry Pi 4
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps Interfaces)
Wireless Router
Consumer grace wireless router with 1Gbps interface.
Keyed, Shared Memory, C++98¶
The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two processes within a single node. 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 |
11 |
0.8 |
9 |
160 |
10 |
11 |
13 |
19 |
160 |
64 |
11 |
0.8 |
9 |
163 |
10 |
11 |
13 |
19 |
163 |
128 |
11 |
0.8 |
9 |
161 |
11 |
11 |
13 |
20 |
161 |
256 |
11 |
0.8 |
9 |
161 |
11 |
11 |
13 |
20 |
161 |
512 |
11 |
0.8 |
9 |
160 |
11 |
11 |
13 |
20 |
160 |
1024 |
11 |
0.7 |
9 |
163 |
11 |
11 |
13 |
20 |
163 |
2048 |
11 |
0.7 |
10 |
163 |
11 |
12 |
13 |
20 |
163 |
4096 |
11 |
0.7 |
10 |
163 |
11 |
12 |
13 |
20 |
163 |
8192 |
12 |
0.7 |
10 |
162 |
12 |
12 |
14 |
21 |
162 |
16384 |
13 |
0.7 |
12 |
163 |
13 |
14 |
15 |
22 |
163 |
32768 |
15 |
0.8 |
14 |
173 |
15 |
16 |
17 |
25 |
173 |
63000 |
19 |
0.9 |
18 |
171 |
19 |
20 |
22 |
30 |
171 |
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 |
12 |
1.1 |
11 |
170 |
12 |
14 |
17 |
23 |
170 |
64 |
12 |
1.1 |
11 |
169 |
12 |
14 |
17 |
23 |
169 |
128 |
12 |
1.1 |
11 |
168 |
12 |
14 |
17 |
23 |
168 |
256 |
12 |
1.1 |
10 |
169 |
12 |
14 |
17 |
23 |
169 |
512 |
12 |
1.1 |
10 |
166 |
12 |
14 |
17 |
23 |
166 |
1024 |
12 |
1.1 |
11 |
168 |
12 |
14 |
17 |
23 |
168 |
2048 |
13 |
1.1 |
11 |
166 |
12 |
14 |
17 |
23 |
166 |
4096 |
13 |
1.1 |
11 |
170 |
13 |
14 |
18 |
24 |
170 |
8192 |
13 |
1.0 |
12 |
171 |
13 |
14 |
18 |
24 |
171 |
16384 |
15 |
1.0 |
13 |
174 |
14 |
15 |
19 |
25 |
174 |
32768 |
17 |
1.1 |
15 |
181 |
17 |
17 |
23 |
28 |
181 |
63000 |
22 |
1.7 |
19 |
170 |
21 |
22 |
33 |
40 |
170 |
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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 6.1.2 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 processes within a single node. 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 DDS 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 |
24569600 |
1227087 |
314.1 |
249344 |
1.00 |
64 |
24225436 |
1209739 |
619.4 |
585728 |
2.36 |
128 |
23729364 |
1185591 |
1214.0 |
82432 |
0.35 |
256 |
22292160 |
1113838 |
2281.1 |
51712 |
0.23 |
512 |
19700267 |
984149 |
4031.1 |
24880 |
0.13 |
1024 |
16470112 |
822919 |
6741.4 |
21800 |
0.13 |
2048 |
12354698 |
617251 |
10113.0 |
13380 |
0.11 |
4096 |
8476606 |
423558 |
13879.2 |
9274 |
0.11 |
8192 |
6667347 |
333038 |
21826.0 |
15137 |
0.23 |
16384 |
5027694 |
251124 |
32915.4 |
1602 |
0.03 |
32768 |
3740832 |
186909 |
48997.1 |
67 |
0.00 |
63000 |
2498311 |
124827 |
62913.1 |
0 |
0.00 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
21109475 |
1053872 |
269.8 |
0 |
0.00 |
64 |
21378560 |
1067311 |
546.5 |
0 |
0.00 |
128 |
21448768 |
1071388 |
1097.1 |
0 |
0.00 |
256 |
19810368 |
989924 |
2027.4 |
0 |
0.00 |
512 |
17525296 |
875639 |
3586.6 |
0 |
0.00 |
1024 |
13833152 |
690704 |
5658.3 |
0 |
0.00 |
2048 |
9997312 |
499178 |
8178.5 |
0 |
0.00 |
4096 |
6334259 |
316260 |
10363.2 |
0 |
0.00 |
8192 |
4115279 |
205463 |
13465.3 |
0 |
0.00 |
16384 |
3420472 |
170781 |
22384.6 |
0 |
0.00 |
32768 |
2617122 |
130677 |
34256.2 |
0 |
0.00 |
63000 |
1991909 |
99464 |
50129.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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Software
The following software was used to perform these tests:
RTI Connext DDS 6.1.2 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 processes within a single node. 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) |
Avg (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
112 |
11.6 |
101 |
826 |
109 |
120 |
149 |
334 |
826 |
64 |
112 |
11.5 |
100 |
827 |
108 |
119 |
150 |
337 |
827 |
128 |
111 |
11.4 |
100 |
835 |
108 |
119 |
146 |
340 |
835 |
256 |
111 |
11.2 |
101 |
830 |
108 |
118 |
147 |
327 |
830 |
512 |
112 |
11.9 |
102 |
839 |
108 |
120 |
152 |
339 |
839 |
1024 |
114 |
11.8 |
103 |
836 |
110 |
122 |
153 |
337 |
836 |
2048 |
116 |
12.2 |
104 |
842 |
112 |
124 |
158 |
353 |
842 |
4096 |
120 |
12.0 |
106 |
846 |
117 |
129 |
160 |
344 |
846 |
8192 |
124 |
12.8 |
113 |
850 |
120 |
134 |
167 |
359 |
850 |
16384 |
139 |
13.0 |
127 |
543 |
135 |
148 |
185 |
368 |
543 |
32768 |
169 |
14.9 |
155 |
603 |
164 |
182 |
219 |
441 |
603 |
63000 |
234 |
19.1 |
213 |
801 |
228 |
253 |
292 |
569 |
801 |
Reliable
Sample Size (Bytes) |
Avg (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
---|---|---|---|---|---|---|---|---|---|
32 |
130 |
31.5 |
109 |
605 |
116 |
188 |
235 |
458 |
605 |
64 |
132 |
31.1 |
111 |
548 |
119 |
188 |
241 |
455 |
548 |
128 |
130 |
31.5 |
108 |
586 |
116 |
188 |
227 |
442 |
586 |
256 |
130 |
31.8 |
108 |
554 |
116 |
189 |
235 |
458 |
554 |
512 |
133 |
32.7 |
110 |
590 |
118 |
193 |
242 |
442 |
590 |
1024 |
134 |
32.4 |
111 |
547 |
120 |
194 |
241 |
449 |
547 |
2048 |
138 |
34.4 |
113 |
625 |
122 |
203 |
256 |
488 |
625 |
4096 |
143 |
34.3 |
119 |
627 |
128 |
207 |
260 |
478 |
627 |
8192 |
153 |
35.6 |
126 |
685 |
137 |
219 |
270 |
494 |
685 |
16384 |
170 |
37.4 |
142 |
686 |
153 |
238 |
297 |
572 |
686 |
32768 |
209 |
39.1 |
174 |
883 |
191 |
276 |
340 |
760 |
883 |
63000 |
280 |
43.3 |
243 |
1058 |
258 |
346 |
413 |
928 |
1058 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The script used to execute the tests 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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Hardware
The following hardware was used to perform these tests:
Raspberry Pi Nodes
Raspberry Pi 4
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps Interfaces)
Wireless Router
Consumer grace wireless router with 1Gbps interface.
The graph below shows the expected throughput behavior when performing a 1-1 communication between two processes within a single node. 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 DDS 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 |
1218048 |
61039 |
15.6 |
9984 |
0.81 |
64 |
1178820 |
58906 |
30.2 |
16000 |
1.34 |
128 |
1145524 |
57223 |
58.6 |
19328 |
1.66 |
256 |
1052864 |
52612 |
107.8 |
18624 |
1.74 |
512 |
881456 |
44045 |
180.4 |
17584 |
1.96 |
1024 |
689464 |
34456 |
282.3 |
14344 |
2.04 |
2048 |
480416 |
23996 |
393.2 |
9108 |
1.86 |
4096 |
305698 |
15269 |
500.4 |
7088 |
2.27 |
8192 |
191114 |
9546 |
625.6 |
47164 |
19.79 |
16384 |
181163 |
9049 |
1186.1 |
41129 |
18.50 |
32768 |
169175 |
8450 |
2215.2 |
29339 |
14.78 |
63000 |
146353 |
7305 |
3681.8 |
22038 |
13.09 |
Reliable
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
---|---|---|---|---|---|
32 |
989184 |
49269 |
12.6 |
0 |
0.00 |
64 |
1022040 |
50892 |
26.1 |
0 |
0.00 |
128 |
951360 |
47472 |
48.6 |
0 |
0.00 |
256 |
759937 |
37920 |
77.7 |
0 |
0.00 |
512 |
643665 |
32145 |
131.7 |
0 |
0.00 |
1024 |
523345 |
26134 |
214.1 |
0 |
0.00 |
2048 |
380457 |
18998 |
331.3 |
0 |
0.00 |
4096 |
250596 |
12514 |
440.1 |
0 |
0.00 |
8192 |
166771 |
8328 |
545.8 |
0 |
0.00 |
16384 |
148121 |
7396 |
969.5 |
0 |
0.00 |
32768 |
123824 |
6184 |
1621.2 |
0 |
0.00 |
63000 |
97426 |
4869 |
2454.2 |
0 |
0.00 |
Perftest Scripts
To produce these tests, we executed RTI Perftest for C++98. The script used to execute the tests 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 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash filename=$0 script_location=$(cd "$(dirname "$filename")" || exit 255; pwd) export input_params=$@ while [ "$1" != "" ]; do case $1 in --role) export role=$2 shift ;; *) ;; esac shift done core=1 if [[ "$role" == "pub" ]]; then core=0 fi echo -e "[Calling base_script/script.sh]" "${script_location}/../base_script/script.sh" $input_params --transport SHMEM --core $core |
Test Hardware
The following hardware was used to perform these tests:
Raspberry Pi Nodes
Raspberry Pi 4
Switch
Dell 2048 -- 10Gbps switch (10Gbps and 1Gbps Interfaces)
Wireless Router
Consumer grace wireless router with 1Gbps interface.