3.2.1.4. Change Default Encryption Algorithm to AES256+GCM
In RTI Connext 7.0 the default encryption algorithm has changed from
AES128+GCM
to AES256+GCM
.
In the Encryption Algorithms section we display how latency and throughput are affected by using each of the algorithms. Find here in more detail the performance differences.
As seen in the results below, latency is barely affected by this change, throughput tests where the encryption is heavily used are slightly affected.
Not using security libraries
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
17 |
1.2 |
16 |
62 |
17 |
18 |
21 |
47 |
62 |
17.00 |
0.00 |
0.00 |
64 |
17 |
1.2 |
16 |
59 |
17 |
18 |
22 |
49 |
59 |
17.00 |
0.00 |
0.00 |
128 |
18 |
1.2 |
17 |
61 |
17 |
18 |
22 |
48 |
61 |
17.00 |
0.00 |
0.00 |
256 |
18 |
1.6 |
17 |
62 |
18 |
19 |
26 |
49 |
62 |
18.00 |
0.00 |
0.00 |
512 |
20 |
2.5 |
17 |
76 |
19 |
21 |
28 |
53 |
76 |
19.00 |
0.00 |
0.00 |
1024 |
25 |
4.7 |
19 |
91 |
26 |
28 |
42 |
58 |
91 |
26.00 |
0.00 |
0.00 |
2048 |
29 |
26.0 |
21 |
4803 |
30 |
33 |
40 |
67 |
4803 |
30.00 |
0.00 |
0.00 |
4096 |
31 |
21.7 |
25 |
4935 |
30 |
35 |
47 |
69 |
4935 |
30.00 |
0.00 |
0.00 |
8192 |
44 |
83.5 |
36 |
4992 |
37 |
56 |
69 |
4672 |
4992 |
37.00 |
0.00 |
0.00 |
16384 |
88 |
27.4 |
47 |
169 |
87 |
127 |
141 |
160 |
169 |
86.00 |
1.00 |
1.16 |
32768 |
158 |
17.9 |
74 |
214 |
163 |
176 |
179 |
204 |
214 |
125.00 |
38.00 |
30.40 |
63000 |
187 |
2.8 |
109 |
229 |
187 |
188 |
190 |
222 |
229 |
186.00 |
1.00 |
0.54 |
No protection
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
17 |
1.0 |
16 |
60 |
17 |
18 |
21 |
47 |
60 |
17.00 |
0.00 |
0.00 |
64 |
17 |
1.1 |
16 |
61 |
17 |
18 |
22 |
48 |
61 |
17.00 |
0.00 |
0.00 |
128 |
18 |
1.3 |
17 |
63 |
18 |
18 |
24 |
48 |
63 |
17.00 |
1.00 |
5.88 |
256 |
18 |
1.3 |
17 |
61 |
18 |
19 |
22 |
49 |
61 |
18.00 |
0.00 |
0.00 |
512 |
20 |
2.7 |
17 |
73 |
19 |
22 |
29 |
52 |
73 |
19.00 |
0.00 |
0.00 |
1024 |
25 |
7.2 |
19 |
3321 |
26 |
28 |
40 |
58 |
3321 |
26.00 |
0.00 |
0.00 |
2048 |
29 |
27.3 |
21 |
5012 |
30 |
33 |
39 |
67 |
5012 |
30.00 |
0.00 |
0.00 |
4096 |
31 |
22.4 |
25 |
4965 |
30 |
35 |
46 |
70 |
4965 |
30.00 |
0.00 |
0.00 |
8192 |
44 |
85.5 |
35 |
4995 |
37 |
56 |
70 |
4659 |
4995 |
37.00 |
0.00 |
0.00 |
16384 |
88 |
26.0 |
47 |
173 |
88 |
126 |
141 |
158 |
173 |
86.00 |
2.00 |
2.33 |
32768 |
174 |
6.0 |
74 |
215 |
175 |
176 |
179 |
212 |
215 |
125.00 |
50.00 |
40.00 |
63000 |
162 |
14.3 |
103 |
221 |
160 |
186 |
190 |
210 |
221 |
159.00 |
1.00 |
0.63 |
RTPS Sign
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
24 |
1.2 |
23 |
67 |
24 |
25 |
28 |
59 |
67 |
24.00 |
0.00 |
0.00 |
64 |
24 |
1.3 |
23 |
66 |
24 |
25 |
29 |
57 |
66 |
24.00 |
0.00 |
0.00 |
128 |
24 |
1.2 |
23 |
67 |
24 |
25 |
28 |
58 |
67 |
24.00 |
0.00 |
0.00 |
256 |
25 |
1.4 |
24 |
70 |
25 |
25 |
32 |
59 |
70 |
25.00 |
0.00 |
0.00 |
512 |
26 |
1.8 |
24 |
69 |
25 |
27 |
33 |
59 |
69 |
25.00 |
0.00 |
0.00 |
1024 |
27 |
15.0 |
25 |
4801 |
27 |
29 |
37 |
63 |
4801 |
26.00 |
1.00 |
3.85 |
2048 |
31 |
13.1 |
28 |
5043 |
30 |
33 |
44 |
67 |
5043 |
30.00 |
0.00 |
0.00 |
4096 |
35 |
3.4 |
33 |
85 |
34 |
38 |
50 |
72 |
85 |
34.00 |
0.00 |
0.00 |
8192 |
49 |
10.4 |
44 |
3837 |
47 |
56 |
78 |
110 |
3837 |
46.00 |
1.00 |
2.17 |
16384 |
104 |
28.8 |
58 |
215 |
104 |
147 |
168 |
181 |
215 |
96.00 |
8.00 |
8.33 |
32768 |
190 |
3.6 |
90 |
229 |
190 |
191 |
194 |
226 |
229 |
172.00 |
18.00 |
10.46 |
63000 |
190 |
15.1 |
127 |
248 |
185 |
209 |
212 |
238 |
248 |
207.00 |
-22.00 |
-10.63 |
RTPS Encrypt
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
25 |
1.2 |
24 |
67 |
25 |
25 |
29 |
58 |
67 |
24.00 |
1.00 |
4.17 |
64 |
25 |
1.2 |
24 |
69 |
25 |
25 |
29 |
58 |
69 |
25.00 |
0.00 |
0.00 |
128 |
25 |
1.2 |
24 |
69 |
25 |
26 |
29 |
59 |
69 |
25.00 |
0.00 |
0.00 |
256 |
26 |
1.3 |
25 |
68 |
26 |
26 |
30 |
57 |
68 |
25.00 |
1.00 |
4.00 |
512 |
26 |
1.7 |
25 |
85 |
26 |
27 |
34 |
60 |
85 |
26.00 |
0.00 |
0.00 |
1024 |
29 |
7.6 |
26 |
4124 |
28 |
31 |
39 |
64 |
4124 |
27.00 |
1.00 |
3.70 |
2048 |
31 |
3.4 |
28 |
80 |
30 |
34 |
41 |
68 |
80 |
30.00 |
0.00 |
0.00 |
4096 |
37 |
17.1 |
35 |
4812 |
36 |
38 |
51 |
74 |
4812 |
35.00 |
1.00 |
2.86 |
8192 |
50 |
5.9 |
46 |
118 |
48 |
56 |
80 |
109 |
118 |
48.00 |
0.00 |
0.00 |
16384 |
110 |
31.8 |
61 |
204 |
109 |
156 |
176 |
192 |
204 |
99.00 |
10.00 |
10.10 |
32768 |
196 |
4.6 |
96 |
239 |
197 |
198 |
204 |
235 |
239 |
195.00 |
2.00 |
1.03 |
63000 |
221 |
3.8 |
143 |
262 |
221 |
223 |
229 |
259 |
262 |
219.00 |
2.00 |
0.91 |
RTPS Sign with Origin Auth, Data Encrypt
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
30 |
1.3 |
29 |
72 |
30 |
31 |
35 |
62 |
72 |
30.00 |
0.00 |
0.00 |
64 |
30 |
1.3 |
29 |
73 |
30 |
31 |
34 |
65 |
73 |
30.00 |
0.00 |
0.00 |
128 |
31 |
6.3 |
30 |
3377 |
31 |
32 |
36 |
68 |
3377 |
30.00 |
1.00 |
3.33 |
256 |
31 |
1.3 |
30 |
73 |
31 |
32 |
36 |
66 |
73 |
31.00 |
0.00 |
0.00 |
512 |
32 |
1.5 |
30 |
74 |
32 |
32 |
38 |
67 |
74 |
31.00 |
1.00 |
3.23 |
1024 |
34 |
9.7 |
32 |
5000 |
33 |
35 |
44 |
70 |
5000 |
33.00 |
0.00 |
0.00 |
2048 |
36 |
23.6 |
34 |
4729 |
36 |
38 |
46 |
75 |
4729 |
36.00 |
0.00 |
0.00 |
4096 |
43 |
11.7 |
40 |
4143 |
43 |
43 |
54 |
79 |
4143 |
42.00 |
1.00 |
2.38 |
8192 |
56 |
11.9 |
53 |
4547 |
55 |
57 |
84 |
116 |
4547 |
55.00 |
0.00 |
0.00 |
16384 |
119 |
31.8 |
70 |
223 |
118 |
164 |
186 |
198 |
223 |
116.00 |
2.00 |
1.72 |
32768 |
193 |
17.1 |
117 |
252 |
198 |
209 |
213 |
241 |
252 |
187.00 |
11.00 |
5.88 |
63000 |
239 |
3.1 |
160 |
288 |
238 |
240 |
246 |
278 |
288 |
236.00 |
2.00 |
0.85 |
RTPS Sign, Submessage Encrypt with Origin Auth, Data Encrypt
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
35 |
1.5 |
33 |
76 |
34 |
36 |
39 |
70 |
76 |
34.00 |
0.00 |
0.00 |
64 |
34 |
1.4 |
33 |
75 |
34 |
35 |
39 |
70 |
75 |
34.00 |
0.00 |
0.00 |
128 |
35 |
1.5 |
33 |
81 |
35 |
36 |
41 |
70 |
81 |
34.00 |
1.00 |
2.94 |
256 |
35 |
1.6 |
33 |
77 |
35 |
36 |
41 |
69 |
77 |
35.00 |
0.00 |
0.00 |
512 |
36 |
14.1 |
34 |
5056 |
36 |
37 |
43 |
85 |
5056 |
35.00 |
1.00 |
2.86 |
1024 |
38 |
9.3 |
36 |
4604 |
37 |
39 |
46 |
75 |
4604 |
37.00 |
0.00 |
0.00 |
2048 |
41 |
13.1 |
39 |
4594 |
40 |
43 |
49 |
78 |
4594 |
40.00 |
0.00 |
0.00 |
4096 |
51 |
4.4 |
46 |
107 |
50 |
52 |
73 |
92 |
107 |
48.00 |
2.00 |
4.17 |
8192 |
64 |
6.5 |
60 |
128 |
62 |
64 |
100 |
123 |
128 |
62.00 |
0.00 |
0.00 |
16384 |
130 |
31.7 |
81 |
231 |
129 |
175 |
196 |
212 |
231 |
127.00 |
2.00 |
1.57 |
32768 |
226 |
2.4 |
151 |
265 |
226 |
228 |
232 |
257 |
265 |
205.00 |
21.00 |
10.24 |
63000 |
268 |
4.1 |
192 |
315 |
268 |
270 |
277 |
308 |
315 |
267.00 |
1.00 |
0.38 |
RTPS Sign, Submessage Encrypt
Sample Size (Bytes) |
Ave (μs) |
Std (μs) |
Min (μs) |
Max (μs) |
50% (μs) |
90% (μs) |
99% (μs) |
99.99% (μs) |
99.9999% (μs) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
32 |
29 |
1.4 |
27 |
70 |
28 |
29 |
34 |
62 |
70 |
28.00 |
0.00 |
0.00 |
64 |
29 |
1.3 |
27 |
72 |
29 |
30 |
33 |
62 |
72 |
28.00 |
1.00 |
3.57 |
128 |
29 |
5.3 |
27 |
2909 |
29 |
30 |
33 |
61 |
2909 |
29.00 |
0.00 |
0.00 |
256 |
29 |
1.3 |
27 |
77 |
29 |
30 |
34 |
63 |
77 |
29.00 |
0.00 |
0.00 |
512 |
30 |
1.5 |
28 |
86 |
30 |
31 |
35 |
67 |
86 |
30.00 |
0.00 |
0.00 |
1024 |
32 |
9.4 |
30 |
4083 |
31 |
34 |
43 |
67 |
4083 |
31.00 |
0.00 |
0.00 |
2048 |
35 |
10.6 |
33 |
3637 |
34 |
37 |
46 |
71 |
3637 |
34.00 |
0.00 |
0.00 |
4096 |
41 |
10.1 |
38 |
4210 |
41 |
42 |
50 |
78 |
4210 |
40.00 |
1.00 |
2.50 |
8192 |
55 |
13.7 |
51 |
4847 |
53 |
56 |
90 |
123 |
4847 |
53.00 |
0.00 |
0.00 |
16384 |
117 |
31.8 |
68 |
215 |
116 |
163 |
185 |
198 |
215 |
115.00 |
1.00 |
0.87 |
32768 |
207 |
4.3 |
108 |
247 |
207 |
208 |
213 |
243 |
247 |
206.00 |
1.00 |
0.48 |
63000 |
218 |
14.7 |
158 |
272 |
213 |
239 |
242 |
267 |
272 |
235.00 |
-22.00 |
-9.36 |
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#!/bin/bash
2filename=$0
3script_location=$(cd "$(dirname "$filename")" || exit 255; pwd)
4
5export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000"
6export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760"
7
8export domain="2"
9export exec_time=20
10export num_reps=1
11export instance_number=100000
12export core=0
13
14# We will use some colors to improve visibility of errors and info messages.
15RED='\033[0;31m'
16GREEN='\033[0;32m'
17YELLOW='\033[0;33m'
18BLUE='\033[0;34m'
19LIGHTBLUE='\033[0;36m'
20NC='\033[0m'
21INFO_TAG="${GREEN}[INFO]:${NC}"
22WARNING_TAG="${YELLOW}[WARNING]:${NC}"
23ERROR_TAG="${RED}[ERROR]:${NC}"
24
25export ip_machine_1="10.2.78.20"
26export ip_machine_2="10.2.78.21"
27export if10Gbps="enp1s0f0"
28export if1Gbps="eno1"
29
30################################################################################
31
32function disable_colors() {
33 export RED=""
34 export GREEN=""
35 export YELLOW=""
36 export NC=""
37 export BLUE=""
38 export LIGHTBLUE=""
39 export INFO_TAG="${GREEN}[INFO]:${NC}"
40 export WARNING_TAG="${YELLOW}[WARNING]:${NC}"
41 export ERROR_TAG="${RED}[ERROR]:${NC}"
42}
43
44function change_domain() {
45 if [[ "$domain" == "1" ]]; then
46 export domain="2"
47 else
48 export domain="1"
49 fi
50}
51
52# Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize>
53function execute_test() {
54
55 local keyed_unkeyed=$1
56 local rel_be=$2
57 local datasizes_test=$3
58 local other_args=$4
59 local name_suffix=$5
60
61 local commands_string_test=$commands_string
62 local tag=""
63
64 if [[ "${keyed_unkeyed}" == "keyed" ]]; then
65 commands_string_test="${commands_string_test} -keyed -instances $instance_number"
66 tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|"
67 else
68 tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|"
69 fi
70
71 if [[ "${rel_be}" == "be" ]]; then
72 commands_string_test="${commands_string_test} -bestEffort"
73 tag="${tag}${YELLOW}BE${NC}]"
74 else
75 tag="${tag}${RED}REL${NC}]"
76 fi
77
78 tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]"
79
80 local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv
81
82 if [[ "$role" == "pub" ]]; then
83 echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}"
84 fi
85
86 if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then
87 export pre_command_string="taskset -c $core"
88 fi
89
90 if [[ "$LANGUAGE" == "python" ]]; then
91 export pre_command_string="python3 "
92 fi
93
94 # Get the aprox time this will take:
95 total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps))
96 total_time=$((total_tests * exec_time))
97
98 touch $output_file
99 local no_headers=""
100 local current_test=0
101 for index in $(seq 1 ${num_reps}); do
102 for DATALEN in ${datasizes_test}; do
103 current_test=$((current_test + 1))
104 export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers"
105 if [[ "$role" == "pub" ]]; then
106 echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s"
107 echo -e ${BLUE}$command${NC}
108 else
109 echo -e ${LIGHTBLUE}$command${NC}
110 fi
111 if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then
112 sleep 3
113 fi
114 if [[ "$raw" == "1" && "$role" == "sub" ]]; then
115 sleep 5
116 fi
117 if [[ "${get_netstat_info}" == "1" ]]; then
118 echo -e "${INFO_TAG} Getting netstat info before"
119 netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt
120 fi
121 eval $command >> $output_file;
122 if [[ "${get_netstat_info}" == "1" ]]; then
123 echo -e "${INFO_TAG} Getting netstat info after"
124 netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt
125 touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"
126 python3 $script_location/../../../tools/diff_netstat_output.py \
127 -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \
128 -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \
129 -d $DATALEN $no_header_netstat \
130 -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"
131 rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt
132 no_header_netstat=" -nh"
133 fi
134 no_headers=" -noOutputHeaders"
135
136 change_domain
137 done
138 done
139}
140
141################################################################################
142# PARSE COMMAND LINE OPTIONS:
143
144while [ "$1" != "" ]; do
145 case $1 in
146 --executable)
147 executable=$2
148 shift
149 ;;
150 --output-folder)
151 output_folder=$2
152 shift
153 ;;
154 --sub-folder)
155 sub_folder=$2
156 shift
157 ;;
158 --role)
159 export role=$2
160 shift
161 ;;
162 --core)
163 export core=$2
164 shift
165 ;;
166 --test-kind)
167 export lat_thr=$2
168 shift
169 ;;
170 --interface1)
171 export interface=$2
172 shift
173 ;;
174 --interface2)
175 export interface2=$2
176 shift
177 ;;
178 --ip1)
179 export ip1=$2
180 shift
181 ;;
182 --ip2)
183 export ip2=$2
184 shift
185 ;;
186 --repetitions)
187 export num_reps=$2
188 shift
189 ;;
190 --domain)
191 export domain=$2
192 shift
193 ;;
194 --execution-time)
195 export exec_time=$2
196 shift
197 ;;
198 --transport)
199 export transport=$2
200 shift
201 ;;
202 --datalen)
203 export datalen_input=$2
204 shift
205 ;;
206 --file-suffix)
207 export file_suffix=$2
208 shift
209 ;;
210 --executable-suffix)
211 export executable_suffix=$2
212 shift
213 ;;
214 --extra-arguments)
215 export extra_arguments=$2
216 shift
217 ;;
218 --extra-arguments-pub)
219 export extra_arguments_pub=$2
220 shift
221 ;;
222 --extra-arguments-sub)
223 export extra_arguments_sub=$2
224 shift
225 ;;
226 --skip-no-batching)
227 export skip_no_batching="1"
228 ;;
229 --skip-be)
230 export skip_be_tests="1"
231 ;;
232 --skip-rel)
233 export skip_rel_tests="1"
234 ;;
235 --skip-keyed)
236 export skip_keyed_data="1"
237 ;;
238 --skip-large-data)
239 export skip_large_data="1"
240 ;;
241 --large-data)
242 export large_data="1"
243 ;;
244 --keyed)
245 export skip_unkeyed="1"
246 ;;
247 --unkeyed)
248 export skip_keyed_data="1"
249 ;;
250 --no-batching)
251 export no_batching_only="1"
252 ;;
253 --reliable)
254 export skip_be_tests="1"
255 ;;
256 --best-effort)
257 export skip_rel_tests="1"
258 ;;
259 --security)
260 export security_only="$2"
261 shift
262 ;;
263 --micro)
264 export micro="1"
265 ;;
266 --raw | --raw-transport)
267 export raw="1"
268 ;;
269 --tss)
270 export tss="1"
271 ;;
272 --no-colors)
273 export NO_COLORS="1"
274 ;;
275 --language)
276 export LANGUAGE=$2
277 shift
278 ;;
279 --loss-rate)
280 export loss_rate=$2
281 shift
282 ;;
283 --get-netstat-info)
284 export get_netstat_info="1"
285 ;;
286 *)
287 echo -e "unknown parameter \"$1\""
288 exit 255
289 ;;
290 esac
291 shift
292done
293
294if [[ "$NO_COLORS" == "1" ]]; then
295 disable_colors
296fi
297
298export folder_base="$(dirname "${executable}")"/../../..
299
300if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then
301 export folder_base="$(dirname "${executable}")"/../..
302fi
303if [[ $tss == "1" ]]; then
304 export folder_base="$(dirname "${executable}")"/../../../../..
305fi
306
307if [[ "${executable_suffix}" != "" ]]; then
308 export executable="${executable}${executable_suffix}"
309fi
310
311if [[ "${sub_folder}" != "" ]]; then
312 export output_folder="${output_folder}/${sub_folder}"
313fi
314
315echo -e "${INFO_TAG} Perftest executable is: $executable"
316echo -e "${INFO_TAG} Output folder is: $output_folder"
317
318################################################################################
319
320if [[ "$LANGUAGE" == "python" ]]; then
321 export skip_keyed_data="1"
322 export skip_large_data="1"
323 export skip_be_tests="1"
324 export skip_no_batching="1"
325fi
326
327if [[ "${skip_large_data}" == "1" ]]; then
328 export datasizes_extended=${datasizes}
329elif [[ "${large_data}" == "1" ]]; then
330 export datasizes=${datasizes_extended}
331fi
332
333if [[ "${datalen_input}" != "" ]]; then
334 echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}"
335 export datasizes=${datalen_input}
336 export datasizes_extended=${datalen_input}
337 if [[ "${no_batching_only}" != "1" ]]; then
338 export skip_large_data="1"
339 fi
340fi
341
342if [[ "$role" != "pub" && "$role" != "sub" ]]; then
343 echo -e "${ERROR_TAG} It must be either publisher or subscriber"
344 exit 255
345fi
346
347if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then
348 echo -e "${ERROR_TAG} It must be either lat or thr"
349 exit 255
350fi
351
352if [[ "${interface}" == "" ]]; then
353 echo "Using default nics"
354 export nic_publisher=${ip_machine_1}
355 export nic_subscriber=${ip_machine_2}
356else
357 export nic_publisher=$interface
358 echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}"
359
360 if [[ "${interface2}" == "" ]]; then
361 export nic_subscriber=$interface
362 else
363 export nic_subscriber=$interface2
364 fi
365 echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"
366
367 if [[ "${ip1}" != "" ]]; then
368 export ip_publisher=$ip1
369 echo "Using ip_publisher: ${ip_publisher}"
370 fi
371
372 if [[ "${ip2}" != "" ]]; then
373 export ip_subscriber=$ip2
374 echo "Using ip_subscriber: ${ip_subscriber}"
375 fi
376
377fi
378
379export transport_string="-transport $transport"
380
381if [[ "$transport" == "UDPv4" ]]; then
382
383 export transport_string_pub="$transport_string -nic $nic_publisher"
384 export transport_string_sub="$transport_string -nic $nic_subscriber"
385
386 if [[ "$micro" == "1" || "$raw" == "1" ]]; then
387 export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}"
388 export transport_string_sub="$transport_string_sub -peer ${ip_publisher}"
389 fi
390
391elif [[ "$transport" == "TCP" ]]; then
392 export transport_string_pub="$transport_string \
393 -nic $nic_publisher \
394 -peer 0@tcpv4_lan://${ip_subscriber}:7400"
395 export transport_string_sub="$transport_string \
396 -nic $nic_subscriber \
397 -peer 0@tcpv4_lan://${ip_publisher}:7400"
398elif [[ "$transport" == "TLS" ]]; then
399 export transport_string_pub="$transport_string \
400 -nic $nic_publisher \
401 -peer tlsv4_lan://${ip_subscriber}:7400"
402 export transport_string_sub="$transport_string \
403 -nic $nic_subscriber \
404 -peer tlsv4_lan://${ip_publisher}:7400"
405elif [[ "$transport" == "UDPv4_WAN" ]]; then
406 export transport_string_pub="$transport_string \
407 -nic $nic_publisher \
408 -transportPublicAddress $ip_publisher:7400"
409 export transport_string_sub="$transport_string \
410 -nic $nic_subscriber \
411 -peer 0@udpv4_wan://${ip_publisher}:7400"
412else
413 export transport_string_pub="$transport_string"
414 export transport_string_sub="$transport_string"
415fi
416
417################################################################################
418
419export pub_string="-pub \
420 ${transport_string_pub} \
421 -noPrintIntervals \
422 -executionTime $exec_time"
423
424if [[ ${lat_thr} == "lat" ]]; then
425 export pub_string="$pub_string \
426 -latencyTest"
427fi
428
429export sub_string="-sub \
430 ${transport_string_sub} \
431 -noPrintIntervals"
432
433if [[ "$role" == "pub" ]]; then
434 echo -e "$INFO_TAG Publisher side running"
435 export commands_string=${pub_string}
436 export extra_arguments="${extra_arguments} ${extra_arguments_pub}"
437else
438 echo -e "$INFO_TAG Subscriber side running"
439 export commands_string=${sub_string}
440 export extra_arguments="${extra_arguments} ${extra_arguments_sub}"
441fi
442
443###############################################################################
444
445echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh"
446sudo /set_${lat_thr}_mode.sh
447sleep 5
448
449echo -e "${INFO_TAG} Disabling any loss rate"
450sudo tc qdisc add dev $nic_publisher root netem loss 0%
451sudo tc qdisc del dev $nic_publisher root netem loss 0%
452
453if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then
454 echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%"
455 sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate%
456fi
457
458cd $folder_base
459echo -e "${INFO_TAG} Folder Base is: $PWD"
460mkdir -p $output_folder
461
462# Tests that may use batching (when doing throughput tests)
463if [[ ${no_batching_only} != "1" ]]; then
464
465 # UNKEYED
466 if [[ "${skip_unkeyed}" == "" ]]; then
467
468 # RELIABLE
469 if [[ "${skip_rel_tests}" == "" ]]; then
470 execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix"
471 fi
472
473 # BEST EFFORT
474 if [[ "${skip_be_tests}" == "" ]]; then
475 execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
476 fi
477 fi
478
479 # KEYED
480 if [[ "${skip_keyed_data}" == "" ]]; then
481
482 # RELIABLE
483 if [[ "${skip_rel_tests}" == "" ]]; then
484 execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix"
485 fi
486
487 # BEST EFFORT
488 if [[ "${skip_be_tests}" == "" ]]; then
489 execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
490 fi
491 fi
492
493fi
494
495if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then
496 no_batching_tests="1"
497fi
498
499# Tests that will not use batching
500if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then
501
502 if [[ "$role" == "pub" ]]; then
503 export commands_string="${commands_string} -batchSize 0"
504 fi
505
506 # UNKEYED
507 if [[ "${skip_unkeyed}" == "" ]]; then
508
509 # RELIABLE
510 if [[ "${skip_rel_tests}" == "" ]]; then
511 execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
512 fi
513
514 # BEST EFFORT
515 if [[ "${skip_be_tests}" == "" ]]; then
516 execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
517 fi
518 fi
519fi
520
521if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then
522 echo -e "${INFO_TAG} Disabling loss rate"
523 sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate%
524fi
1#!/bin/bash
2filename=$0
3script_location=$(cd "$(dirname "$filename")" || exit 255; pwd)
4
5export input_params=$@
6
7while [ "$1" != "" ]; do
8 case $1 in
9 --executable)
10 executable=$2
11 shift
12 ;;
13 --security)
14 export security_only=$2
15 shift
16 ;;
17 *)
18 ;;
19 esac
20 shift
21done
22
23echo $security_only
24
25export folder_base="$(dirname "${executable}")"/../../..
26export PATH_TO_GOVERNANCE_FILES_FOLDER=$folder_base/resource/secure
27
28if [[ "${security_only}" == "none" || "${security_only}" == "" ]]; then
29 echo -e "[Calling base_script/script.sh] -- No Security"
30 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
31 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
32 --file-suffix "_security_none"
33 sleep 5;
34fi
35
36if [[ "${security_only}" == "no_protection" || "${security_only}" == "" ]]; then
37 echo -e "[Calling base_script/script.sh] -- No Protection"
38 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
39 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
40 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_.xml " \
41 --file-suffix "_security_no_protection"
42fi
43
44if [[ "${security_only}" == "rtps_sign" || "${security_only}" == "" ]]; then
45 echo -e "[Calling base_script/script.sh] -- RTPS Sign"
46 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
47 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
48 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSSign.xml " \
49 --file-suffix "_security_rtps_sign"
50fi
51
52if [[ "${security_only}" == "rtps_encrypt" || "${security_only}" == "" ]]; then
53 echo -e "[Calling base_script/script.sh] -- RTPS Encrypt"
54 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
55 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
56 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSEncrypt.xml " \
57 --file-suffix "_security_rtps_encrypt"
58fi
59
60if [[ "${security_only}" == "rtps_sign_submessage_encrypt" || "${security_only}" == "" ]]; then
61 echo -e "[Calling base_script/script.sh] -- RTPS Sign, Submessage Encrypt"
62 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
63 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
64 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_SignEncryptSubmessage.xml " \
65 --file-suffix "_security_rtps_sign_submessage_encrypt"
66fi
67
68if [[ "${security_only}" == "rtps_sign_submessage_encrypt_orig_data_encrypt" || "${security_only}" == "" ]]; then
69 echo -e "[Calling base_script/script.sh] -- RTPS Sign, Submessage Encrypt with original auth, Data Encrypt"
70 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
71 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
72 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSSignEncryptSubmessageWithOrigAuthEncryptData.xml " \
73 --file-suffix "_security_rtps_sign_submessage_encrypt_orig_data_encrypt"
74fi
75
76if [[ "${security_only}" == "rtps_sign_orig_data_encrypt" || "${security_only}" == "" ]]; then
77 echo -e "[Calling base_script/script.sh] -- RTPS Sign with Original auth, Data Encrypt"
78 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
79 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
80 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSSignWithOrigAuthEncryptData.xml " \
81 --file-suffix "_security_rtps_sign_orig_data_encrypt"
82 sleep 5;
83fi
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)
Not using security libraries
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
92267881 |
4607611 |
1179.5 |
0 |
0.00 |
1174.60 |
4.90 |
0.42 |
64 |
82062547 |
4097693 |
2098.0 |
0 |
0.00 |
2096.60 |
1.40 |
0.07 |
128 |
69652928 |
3478986 |
3562.5 |
0 |
0.00 |
3544.60 |
17.90 |
0.51 |
256 |
51606465 |
2577288 |
5278.3 |
0 |
0.00 |
5257.30 |
21.00 |
0.40 |
512 |
34180315 |
1706911 |
6991.5 |
0 |
0.00 |
6950.60 |
40.90 |
0.59 |
1024 |
20350752 |
1016365 |
8326.1 |
0 |
0.00 |
8326.10 |
0.00 |
0.00 |
2048 |
11257968 |
562231 |
9211.6 |
0 |
0.00 |
9129.40 |
82.20 |
0.90 |
4096 |
4488909 |
298792 |
9790.8 |
0 |
0.00 |
9718.90 |
71.90 |
0.74 |
8192 |
3005321 |
150210 |
9844.2 |
0 |
0.00 |
9843.80 |
0.40 |
0.00 |
16384 |
1508871 |
75431 |
9887.0 |
0 |
0.00 |
9887.00 |
0.00 |
0.00 |
32768 |
756063 |
37797 |
9908.3 |
0 |
0.00 |
9908.30 |
0.00 |
0.00 |
63000 |
393549 |
19674 |
9915.8 |
0 |
0.00 |
9915.80 |
0.00 |
0.00 |
No protection
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
92346624 |
4611537 |
1180.6 |
0 |
0.00 |
1175.10 |
5.50 |
0.47 |
64 |
82443904 |
4117178 |
2108.0 |
0 |
0.00 |
2105.00 |
3.00 |
0.14 |
128 |
69912718 |
3491150 |
3574.9 |
0 |
0.00 |
3568.60 |
6.30 |
0.18 |
256 |
51837905 |
2588917 |
5302.1 |
0 |
0.00 |
5343.00 |
-40.90 |
-0.77 |
512 |
34524496 |
1724402 |
7063.2 |
0 |
0.00 |
7037.00 |
26.20 |
0.37 |
1024 |
20348888 |
1016351 |
8326.0 |
0 |
0.00 |
8296.60 |
29.40 |
0.35 |
2048 |
11436400 |
571192 |
9358.4 |
0 |
0.00 |
9227.60 |
130.80 |
1.42 |
4096 |
4491520 |
298889 |
9794.0 |
0 |
0.00 |
9717.00 |
77.00 |
0.79 |
8192 |
3005132 |
150212 |
9844.3 |
0 |
0.00 |
9844.20 |
0.10 |
0.00 |
16384 |
1508824 |
75431 |
9887.0 |
0 |
0.00 |
9887.00 |
0.00 |
0.00 |
32768 |
756053 |
37797 |
9908.3 |
0 |
0.00 |
9908.30 |
0.00 |
0.00 |
63000 |
393543 |
19674 |
9915.8 |
0 |
0.00 |
9915.80 |
0.00 |
0.00 |
RTPS Sign
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
83595092 |
4174519 |
1068.7 |
0 |
0.00 |
1098.70 |
-30.00 |
-2.73 |
64 |
71426670 |
3566590 |
1826.1 |
0 |
0.00 |
1873.90 |
-47.80 |
-2.55 |
128 |
55436782 |
2768208 |
2834.6 |
0 |
0.00 |
2964.50 |
-129.90 |
-4.38 |
256 |
38166592 |
1905848 |
3903.2 |
0 |
0.00 |
4076.60 |
-173.40 |
-4.25 |
512 |
23659824 |
1181558 |
4839.7 |
0 |
0.00 |
5024.70 |
-185.00 |
-3.68 |
1024 |
13245408 |
661392 |
5418.1 |
0 |
0.00 |
5697.60 |
-279.50 |
-4.91 |
2048 |
7067890 |
352929 |
5782.4 |
0 |
0.00 |
6093.70 |
-311.30 |
-5.11 |
4096 |
3665058 |
183011 |
5996.9 |
0 |
0.00 |
6328.30 |
-331.40 |
-5.24 |
8192 |
2152031 |
107457 |
7042.3 |
0 |
0.00 |
7270.40 |
-228.10 |
-3.14 |
16384 |
1504042 |
75101 |
9843.7 |
0 |
0.00 |
9843.90 |
-0.20 |
-0.00 |
32768 |
754546 |
37714 |
9886.6 |
0 |
0.00 |
9886.70 |
-0.10 |
-0.00 |
63000 |
393145 |
19651 |
9904.5 |
0 |
0.00 |
9904.60 |
-0.10 |
-0.00 |
RTPS Encrypt
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
83111530 |
4150331 |
1062.5 |
0 |
0.00 |
1077.50 |
-15.00 |
-1.39 |
64 |
68993344 |
3445106 |
1763.9 |
0 |
0.00 |
1830.20 |
-66.30 |
-3.62 |
128 |
54564741 |
2724652 |
2790.0 |
0 |
0.00 |
2858.40 |
-68.40 |
-2.39 |
256 |
36891886 |
1842167 |
3772.8 |
0 |
0.00 |
3856.50 |
-83.70 |
-2.17 |
512 |
22059536 |
1101620 |
4512.2 |
0 |
0.00 |
4741.10 |
-228.90 |
-4.83 |
1024 |
12500857 |
624222 |
5113.6 |
0 |
0.00 |
5280.40 |
-166.80 |
-3.16 |
2048 |
6530536 |
326097 |
5342.8 |
0 |
0.00 |
5698.50 |
-355.70 |
-6.24 |
4096 |
3401732 |
169860 |
5566.0 |
0 |
0.00 |
5889.00 |
-323.00 |
-5.49 |
8192 |
1934638 |
96625 |
6332.5 |
0 |
0.00 |
6696.50 |
-364.00 |
-5.44 |
16384 |
1475566 |
73683 |
9657.8 |
0 |
0.00 |
9832.40 |
-174.60 |
-1.78 |
32768 |
754416 |
37705 |
9884.2 |
0 |
0.00 |
9884.20 |
0.00 |
0.00 |
63000 |
393109 |
19649 |
9903.1 |
0 |
0.00 |
9903.20 |
-0.10 |
-0.00 |
RTPS Sign with Origin Auth, Data Encrypt
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
79487330 |
3969229 |
1016.1 |
0 |
0.00 |
1033.40 |
-17.30 |
-1.67 |
64 |
64246301 |
3208167 |
1642.6 |
0 |
0.00 |
1698.80 |
-56.20 |
-3.31 |
128 |
48648768 |
2429274 |
2487.6 |
0 |
0.00 |
2565.70 |
-78.10 |
-3.04 |
256 |
31139872 |
1554964 |
3184.6 |
0 |
0.00 |
3298.00 |
-113.40 |
-3.44 |
512 |
18711409 |
934425 |
3827.4 |
0 |
0.00 |
3905.60 |
-78.20 |
-2.00 |
1024 |
10306320 |
514660 |
4216.1 |
0 |
0.00 |
4350.00 |
-133.90 |
-3.08 |
2048 |
5310588 |
265185 |
4344.8 |
0 |
0.00 |
4542.50 |
-197.70 |
-4.35 |
4096 |
2691868 |
134419 |
4404.7 |
0 |
0.00 |
4673.50 |
-268.80 |
-5.75 |
8192 |
1467758 |
73308 |
4804.3 |
0 |
0.00 |
5063.20 |
-258.90 |
-5.11 |
16384 |
1145848 |
57225 |
7500.7 |
0 |
0.00 |
7876.10 |
-375.40 |
-4.77 |
32768 |
753607 |
37639 |
9867.1 |
0 |
0.00 |
9867.20 |
-0.10 |
-0.00 |
63000 |
392805 |
19631 |
9894.2 |
0 |
0.00 |
9894.30 |
-0.10 |
-0.00 |
RTPS Sign, Submessage Encrypt with Origin Auth, Data Encrypt
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
75051176 |
3747777 |
959.4 |
0 |
0.00 |
982.80 |
-23.40 |
-2.38 |
64 |
59688456 |
2980578 |
1526.1 |
0 |
0.00 |
1535.40 |
-9.30 |
-0.61 |
128 |
42083520 |
2101442 |
2151.9 |
0 |
0.00 |
2197.50 |
-45.60 |
-2.08 |
256 |
27361472 |
1366468 |
2798.5 |
0 |
0.00 |
2872.70 |
-74.20 |
-2.58 |
512 |
15812432 |
789657 |
3234.4 |
0 |
0.00 |
3263.90 |
-29.50 |
-0.90 |
1024 |
8441344 |
421534 |
3453.2 |
0 |
0.00 |
3573.70 |
-120.50 |
-3.37 |
2048 |
4426780 |
221049 |
3621.7 |
0 |
0.00 |
3691.60 |
-69.90 |
-1.89 |
4096 |
2221100 |
110910 |
3634.3 |
0 |
0.00 |
3843.30 |
-209.00 |
-5.44 |
8192 |
1224418 |
61154 |
4007.8 |
0 |
0.00 |
4156.10 |
-148.30 |
-3.57 |
16384 |
922877 |
46085 |
6040.5 |
0 |
0.00 |
6221.10 |
-180.60 |
-2.90 |
32768 |
631365 |
31535 |
8266.8 |
0 |
0.00 |
8337.50 |
-70.70 |
-0.85 |
63000 |
391668 |
19559 |
9857.9 |
0 |
0.00 |
9883.60 |
-25.70 |
-0.26 |
RTPS Sign, Submessage Encrypt
Sample Size (Bytes) |
Total Samples |
Avg Samples/s |
Avg Mbps |
Lost Samples |
Lost Samples (%) |
Reference |
Diff |
Diff(%) |
---|---|---|---|---|---|---|---|---|
32 |
79523805 |
3971129 |
1016.6 |
0 |
0.00 |
1038.60 |
-22.00 |
-2.12 |
64 |
65160448 |
3253677 |
1665.9 |
0 |
0.00 |
1703.00 |
-37.10 |
-2.18 |
128 |
48314694 |
2412568 |
2470.5 |
0 |
0.00 |
2459.60 |
10.90 |
0.44 |
256 |
32410629 |
1618391 |
3314.5 |
0 |
0.00 |
3422.70 |
-108.20 |
-3.16 |
512 |
18991824 |
948448 |
3884.8 |
0 |
0.00 |
4047.10 |
-162.30 |
-4.01 |
1024 |
10626184 |
530615 |
4346.8 |
0 |
0.00 |
4479.90 |
-133.10 |
-2.97 |
2048 |
5595416 |
279410 |
4577.9 |
0 |
0.00 |
4770.60 |
-192.70 |
-4.04 |
4096 |
2816019 |
140615 |
4607.7 |
0 |
0.00 |
4885.10 |
-277.40 |
-5.68 |
8192 |
1572440 |
78536 |
5147.0 |
0 |
0.00 |
5455.50 |
-308.50 |
-5.66 |
16384 |
1161640 |
58007 |
7603.2 |
0 |
0.00 |
8172.70 |
-569.50 |
-6.97 |
32768 |
753681 |
37642 |
9867.8 |
0 |
0.00 |
9867.80 |
0.00 |
0.00 |
63000 |
392809 |
19631 |
9894.5 |
0 |
0.00 |
9894.60 |
-0.10 |
-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#!/bin/bash
2filename=$0
3script_location=$(cd "$(dirname "$filename")" || exit 255; pwd)
4
5export datasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000"
6export datasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760"
7
8export domain="2"
9export exec_time=20
10export num_reps=1
11export instance_number=100000
12export core=0
13
14# We will use some colors to improve visibility of errors and info messages.
15RED='\033[0;31m'
16GREEN='\033[0;32m'
17YELLOW='\033[0;33m'
18BLUE='\033[0;34m'
19LIGHTBLUE='\033[0;36m'
20NC='\033[0m'
21INFO_TAG="${GREEN}[INFO]:${NC}"
22WARNING_TAG="${YELLOW}[WARNING]:${NC}"
23ERROR_TAG="${RED}[ERROR]:${NC}"
24
25export ip_machine_1="10.2.78.20"
26export ip_machine_2="10.2.78.21"
27export if10Gbps="enp1s0f0"
28export if1Gbps="eno1"
29
30################################################################################
31
32function disable_colors() {
33 export RED=""
34 export GREEN=""
35 export YELLOW=""
36 export NC=""
37 export BLUE=""
38 export LIGHTBLUE=""
39 export INFO_TAG="${GREEN}[INFO]:${NC}"
40 export WARNING_TAG="${YELLOW}[WARNING]:${NC}"
41 export ERROR_TAG="${RED}[ERROR]:${NC}"
42}
43
44function change_domain() {
45 if [[ "$domain" == "1" ]]; then
46 export domain="2"
47 else
48 export domain="1"
49 fi
50}
51
52# Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize>
53function execute_test() {
54
55 local keyed_unkeyed=$1
56 local rel_be=$2
57 local datasizes_test=$3
58 local other_args=$4
59 local name_suffix=$5
60
61 local commands_string_test=$commands_string
62 local tag=""
63
64 if [[ "${keyed_unkeyed}" == "keyed" ]]; then
65 commands_string_test="${commands_string_test} -keyed -instances $instance_number"
66 tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|"
67 else
68 tag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|"
69 fi
70
71 if [[ "${rel_be}" == "be" ]]; then
72 commands_string_test="${commands_string_test} -bestEffort"
73 tag="${tag}${YELLOW}BE${NC}]"
74 else
75 tag="${tag}${RED}REL${NC}]"
76 fi
77
78 tag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]"
79
80 local output_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv
81
82 if [[ "$role" == "pub" ]]; then
83 echo -e "${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}"
84 fi
85
86 if [[ "$LANGUAGE" != "java" && "$LANGUAGE" != "cs" ]]; then
87 export pre_command_string="taskset -c $core"
88 fi
89
90 if [[ "$LANGUAGE" == "python" ]]; then
91 export pre_command_string="python3 "
92 fi
93
94 # Get the aprox time this will take:
95 total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps))
96 total_time=$((total_tests * exec_time))
97
98 touch $output_file
99 local no_headers=""
100 local current_test=0
101 for index in $(seq 1 ${num_reps}); do
102 for DATALEN in ${datasizes_test}; do
103 current_test=$((current_test + 1))
104 export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers"
105 if [[ "$role" == "pub" ]]; then
106 echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s"
107 echo -e ${BLUE}$command${NC}
108 else
109 echo -e ${LIGHTBLUE}$command${NC}
110 fi
111 if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then
112 sleep 3
113 fi
114 if [[ "$raw" == "1" && "$role" == "sub" ]]; then
115 sleep 5
116 fi
117 if [[ "${get_netstat_info}" == "1" ]]; then
118 echo -e "${INFO_TAG} Getting netstat info before"
119 netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt
120 fi
121 eval $command >> $output_file;
122 if [[ "${get_netstat_info}" == "1" ]]; then
123 echo -e "${INFO_TAG} Getting netstat info after"
124 netstat -s -u | grep -e "error" -e "packet" > $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt
125 touch "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"
126 python3 $script_location/../../../tools/diff_netstat_output.py \
127 -n $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt \
128 -o $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt \
129 -d $DATALEN $no_header_netstat \
130 -csv >> "$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"
131 rm -rf $output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt
132 no_header_netstat=" -nh"
133 fi
134 no_headers=" -noOutputHeaders"
135
136 change_domain
137 done
138 done
139}
140
141################################################################################
142# PARSE COMMAND LINE OPTIONS:
143
144while [ "$1" != "" ]; do
145 case $1 in
146 --executable)
147 executable=$2
148 shift
149 ;;
150 --output-folder)
151 output_folder=$2
152 shift
153 ;;
154 --sub-folder)
155 sub_folder=$2
156 shift
157 ;;
158 --role)
159 export role=$2
160 shift
161 ;;
162 --core)
163 export core=$2
164 shift
165 ;;
166 --test-kind)
167 export lat_thr=$2
168 shift
169 ;;
170 --interface1)
171 export interface=$2
172 shift
173 ;;
174 --interface2)
175 export interface2=$2
176 shift
177 ;;
178 --ip1)
179 export ip1=$2
180 shift
181 ;;
182 --ip2)
183 export ip2=$2
184 shift
185 ;;
186 --repetitions)
187 export num_reps=$2
188 shift
189 ;;
190 --domain)
191 export domain=$2
192 shift
193 ;;
194 --execution-time)
195 export exec_time=$2
196 shift
197 ;;
198 --transport)
199 export transport=$2
200 shift
201 ;;
202 --datalen)
203 export datalen_input=$2
204 shift
205 ;;
206 --file-suffix)
207 export file_suffix=$2
208 shift
209 ;;
210 --executable-suffix)
211 export executable_suffix=$2
212 shift
213 ;;
214 --extra-arguments)
215 export extra_arguments=$2
216 shift
217 ;;
218 --extra-arguments-pub)
219 export extra_arguments_pub=$2
220 shift
221 ;;
222 --extra-arguments-sub)
223 export extra_arguments_sub=$2
224 shift
225 ;;
226 --skip-no-batching)
227 export skip_no_batching="1"
228 ;;
229 --skip-be)
230 export skip_be_tests="1"
231 ;;
232 --skip-rel)
233 export skip_rel_tests="1"
234 ;;
235 --skip-keyed)
236 export skip_keyed_data="1"
237 ;;
238 --skip-large-data)
239 export skip_large_data="1"
240 ;;
241 --large-data)
242 export large_data="1"
243 ;;
244 --keyed)
245 export skip_unkeyed="1"
246 ;;
247 --unkeyed)
248 export skip_keyed_data="1"
249 ;;
250 --no-batching)
251 export no_batching_only="1"
252 ;;
253 --reliable)
254 export skip_be_tests="1"
255 ;;
256 --best-effort)
257 export skip_rel_tests="1"
258 ;;
259 --security)
260 export security_only="$2"
261 shift
262 ;;
263 --micro)
264 export micro="1"
265 ;;
266 --raw | --raw-transport)
267 export raw="1"
268 ;;
269 --tss)
270 export tss="1"
271 ;;
272 --no-colors)
273 export NO_COLORS="1"
274 ;;
275 --language)
276 export LANGUAGE=$2
277 shift
278 ;;
279 --loss-rate)
280 export loss_rate=$2
281 shift
282 ;;
283 --get-netstat-info)
284 export get_netstat_info="1"
285 ;;
286 *)
287 echo -e "unknown parameter \"$1\""
288 exit 255
289 ;;
290 esac
291 shift
292done
293
294if [[ "$NO_COLORS" == "1" ]]; then
295 disable_colors
296fi
297
298export folder_base="$(dirname "${executable}")"/../../..
299
300if [[ $LANGUAGE == "java" || "$LANGUAGE" == "cs" ]]; then
301 export folder_base="$(dirname "${executable}")"/../..
302fi
303if [[ $tss == "1" ]]; then
304 export folder_base="$(dirname "${executable}")"/../../../../..
305fi
306
307if [[ "${executable_suffix}" != "" ]]; then
308 export executable="${executable}${executable_suffix}"
309fi
310
311if [[ "${sub_folder}" != "" ]]; then
312 export output_folder="${output_folder}/${sub_folder}"
313fi
314
315echo -e "${INFO_TAG} Perftest executable is: $executable"
316echo -e "${INFO_TAG} Output folder is: $output_folder"
317
318################################################################################
319
320if [[ "$LANGUAGE" == "python" ]]; then
321 export skip_keyed_data="1"
322 export skip_large_data="1"
323 export skip_be_tests="1"
324 export skip_no_batching="1"
325fi
326
327if [[ "${skip_large_data}" == "1" ]]; then
328 export datasizes_extended=${datasizes}
329elif [[ "${large_data}" == "1" ]]; then
330 export datasizes=${datasizes_extended}
331fi
332
333if [[ "${datalen_input}" != "" ]]; then
334 echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}"
335 export datasizes=${datalen_input}
336 export datasizes_extended=${datalen_input}
337 if [[ "${no_batching_only}" != "1" ]]; then
338 export skip_large_data="1"
339 fi
340fi
341
342if [[ "$role" != "pub" && "$role" != "sub" ]]; then
343 echo -e "${ERROR_TAG} It must be either publisher or subscriber"
344 exit 255
345fi
346
347if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then
348 echo -e "${ERROR_TAG} It must be either lat or thr"
349 exit 255
350fi
351
352if [[ "${interface}" == "" ]]; then
353 echo "Using default nics"
354 export nic_publisher=${ip_machine_1}
355 export nic_subscriber=${ip_machine_2}
356else
357 export nic_publisher=$interface
358 echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}"
359
360 if [[ "${interface2}" == "" ]]; then
361 export nic_subscriber=$interface
362 else
363 export nic_subscriber=$interface2
364 fi
365 echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"
366
367 if [[ "${ip1}" != "" ]]; then
368 export ip_publisher=$ip1
369 echo "Using ip_publisher: ${ip_publisher}"
370 fi
371
372 if [[ "${ip2}" != "" ]]; then
373 export ip_subscriber=$ip2
374 echo "Using ip_subscriber: ${ip_subscriber}"
375 fi
376
377fi
378
379export transport_string="-transport $transport"
380
381if [[ "$transport" == "UDPv4" ]]; then
382
383 export transport_string_pub="$transport_string -nic $nic_publisher"
384 export transport_string_sub="$transport_string -nic $nic_subscriber"
385
386 if [[ "$micro" == "1" || "$raw" == "1" ]]; then
387 export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}"
388 export transport_string_sub="$transport_string_sub -peer ${ip_publisher}"
389 fi
390
391elif [[ "$transport" == "TCP" ]]; then
392 export transport_string_pub="$transport_string \
393 -nic $nic_publisher \
394 -peer 0@tcpv4_lan://${ip_subscriber}:7400"
395 export transport_string_sub="$transport_string \
396 -nic $nic_subscriber \
397 -peer 0@tcpv4_lan://${ip_publisher}:7400"
398elif [[ "$transport" == "TLS" ]]; then
399 export transport_string_pub="$transport_string \
400 -nic $nic_publisher \
401 -peer tlsv4_lan://${ip_subscriber}:7400"
402 export transport_string_sub="$transport_string \
403 -nic $nic_subscriber \
404 -peer tlsv4_lan://${ip_publisher}:7400"
405elif [[ "$transport" == "UDPv4_WAN" ]]; then
406 export transport_string_pub="$transport_string \
407 -nic $nic_publisher \
408 -transportPublicAddress $ip_publisher:7400"
409 export transport_string_sub="$transport_string \
410 -nic $nic_subscriber \
411 -peer 0@udpv4_wan://${ip_publisher}:7400"
412else
413 export transport_string_pub="$transport_string"
414 export transport_string_sub="$transport_string"
415fi
416
417################################################################################
418
419export pub_string="-pub \
420 ${transport_string_pub} \
421 -noPrintIntervals \
422 -executionTime $exec_time"
423
424if [[ ${lat_thr} == "lat" ]]; then
425 export pub_string="$pub_string \
426 -latencyTest"
427fi
428
429export sub_string="-sub \
430 ${transport_string_sub} \
431 -noPrintIntervals"
432
433if [[ "$role" == "pub" ]]; then
434 echo -e "$INFO_TAG Publisher side running"
435 export commands_string=${pub_string}
436 export extra_arguments="${extra_arguments} ${extra_arguments_pub}"
437else
438 echo -e "$INFO_TAG Subscriber side running"
439 export commands_string=${sub_string}
440 export extra_arguments="${extra_arguments} ${extra_arguments_sub}"
441fi
442
443###############################################################################
444
445echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh"
446sudo /set_${lat_thr}_mode.sh
447sleep 5
448
449echo -e "${INFO_TAG} Disabling any loss rate"
450sudo tc qdisc add dev $nic_publisher root netem loss 0%
451sudo tc qdisc del dev $nic_publisher root netem loss 0%
452
453if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then
454 echo -e "${INFO_TAG} Setting loss rate to ${loss_rate}%"
455 sudo tc qdisc add dev $nic_publisher root netem loss $loss_rate%
456fi
457
458cd $folder_base
459echo -e "${INFO_TAG} Folder Base is: $PWD"
460mkdir -p $output_folder
461
462# Tests that may use batching (when doing throughput tests)
463if [[ ${no_batching_only} != "1" ]]; then
464
465 # UNKEYED
466 if [[ "${skip_unkeyed}" == "" ]]; then
467
468 # RELIABLE
469 if [[ "${skip_rel_tests}" == "" ]]; then
470 execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix"
471 fi
472
473 # BEST EFFORT
474 if [[ "${skip_be_tests}" == "" ]]; then
475 execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
476 fi
477 fi
478
479 # KEYED
480 if [[ "${skip_keyed_data}" == "" ]]; then
481
482 # RELIABLE
483 if [[ "${skip_rel_tests}" == "" ]]; then
484 execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix"
485 fi
486
487 # BEST EFFORT
488 if [[ "${skip_be_tests}" == "" ]]; then
489 execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
490 fi
491 fi
492
493fi
494
495if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then
496 no_batching_tests="1"
497fi
498
499# Tests that will not use batching
500if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then
501
502 if [[ "$role" == "pub" ]]; then
503 export commands_string="${commands_string} -batchSize 0"
504 fi
505
506 # UNKEYED
507 if [[ "${skip_unkeyed}" == "" ]]; then
508
509 # RELIABLE
510 if [[ "${skip_rel_tests}" == "" ]]; then
511 execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
512 fi
513
514 # BEST EFFORT
515 if [[ "${skip_be_tests}" == "" ]]; then
516 execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
517 fi
518 fi
519fi
520
521if [[ "$role" == "pub" && "${loss_rate}" != "" ]]; then
522 echo -e "${INFO_TAG} Disabling loss rate"
523 sudo tc qdisc del dev $nic_publisher root netem loss $loss_rate%
524fi
1#!/bin/bash
2filename=$0
3script_location=$(cd "$(dirname "$filename")" || exit 255; pwd)
4
5export input_params=$@
6
7while [ "$1" != "" ]; do
8 case $1 in
9 --executable)
10 executable=$2
11 shift
12 ;;
13 --security)
14 export security_only=$2
15 shift
16 ;;
17 *)
18 ;;
19 esac
20 shift
21done
22
23echo $security_only
24
25export folder_base="$(dirname "${executable}")"/../../..
26export PATH_TO_GOVERNANCE_FILES_FOLDER=$folder_base/resource/secure
27
28if [[ "${security_only}" == "none" || "${security_only}" == "" ]]; then
29 echo -e "[Calling base_script/script.sh] -- No Security"
30 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
31 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
32 --file-suffix "_security_none"
33 sleep 5;
34fi
35
36if [[ "${security_only}" == "no_protection" || "${security_only}" == "" ]]; then
37 echo -e "[Calling base_script/script.sh] -- No Protection"
38 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
39 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
40 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_.xml " \
41 --file-suffix "_security_no_protection"
42fi
43
44if [[ "${security_only}" == "rtps_sign" || "${security_only}" == "" ]]; then
45 echo -e "[Calling base_script/script.sh] -- RTPS Sign"
46 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
47 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
48 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSSign.xml " \
49 --file-suffix "_security_rtps_sign"
50fi
51
52if [[ "${security_only}" == "rtps_encrypt" || "${security_only}" == "" ]]; then
53 echo -e "[Calling base_script/script.sh] -- RTPS Encrypt"
54 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
55 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
56 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSEncrypt.xml " \
57 --file-suffix "_security_rtps_encrypt"
58fi
59
60if [[ "${security_only}" == "rtps_sign_submessage_encrypt" || "${security_only}" == "" ]]; then
61 echo -e "[Calling base_script/script.sh] -- RTPS Sign, Submessage Encrypt"
62 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
63 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
64 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_SignEncryptSubmessage.xml " \
65 --file-suffix "_security_rtps_sign_submessage_encrypt"
66fi
67
68if [[ "${security_only}" == "rtps_sign_submessage_encrypt_orig_data_encrypt" || "${security_only}" == "" ]]; then
69 echo -e "[Calling base_script/script.sh] -- RTPS Sign, Submessage Encrypt with original auth, Data Encrypt"
70 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
71 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
72 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSSignEncryptSubmessageWithOrigAuthEncryptData.xml " \
73 --file-suffix "_security_rtps_sign_submessage_encrypt_orig_data_encrypt"
74fi
75
76if [[ "${security_only}" == "rtps_sign_orig_data_encrypt" || "${security_only}" == "" ]]; then
77 echo -e "[Calling base_script/script.sh] -- RTPS Sign with Original auth, Data Encrypt"
78 "${script_location}/../base_script/script.sh" $input_params --transport UDPv4 \
79 --skip-no-batching --skip-be --skip-keyed --skip-large-data \
80 --extra-arguments "-secureGovernanceFile $PATH_TO_GOVERNANCE_FILES_FOLDER/signed_PerftestGovernance_RTPSSignWithOrigAuthEncryptData.xml " \
81 --file-suffix "_security_rtps_sign_orig_data_encrypt"
82 sleep 5;
83fi
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)