1.2.4. C# API

The following tests have been performed by executing an RTI Perftest C# Publisher and Subscriber between two nodes, connected to a switch via Ethernet. The communication has been restricted to a single interface and the transport has been set to UDPv4.

Find information about the hardware, network, and command-line parameters after each of the tests.

1.2.4.1. Unkeyed, UDPv4 10Gbps Network, C#

The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Linux nodes in a 10Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.

Note

We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.

Detailed Statistics

The following tables contain the raw numbers presented by a simplified version of RTI Perftest for the Modern C# implementation. 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

17

3.2

16

465

17

18

19

26

465

64

18

1.7

17

463

18

18

20

27

463

128

17

5.7

17

467

18

18

19

27

467

256

18

3.9

18

476

18

19

20

28

476

512

19

4.8

18

484

19

21

22

29

484

1024

25

6.5

19

491

26

31

32

40

491

2048

29

10.4

23

968

30

33

58

299

968

4096

33

138.0

26

100066

30

38

65

72

100066

8192

44

11.3

37

512

40

59

62

123

512

16384

93

28.7

49

578

84

128

134

142

578

32768

139

23.7

88

641

134

168

181

190

641

63000

191

20.5

135

1254

189

211

221

237

1254

  • 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

19

4.7

18

490

19

20

22

36

490

64

17

4.0

15

1272

17

17

25

82

1272

128

19

4.6

18

476

19

20

22

39

476

256

21

7.1

18

470

20

30

39

47

470

512

22

8.2

19

479

21

32

41

49

479

1024

26

5.1

20

482

26

29

55

60

482

2048

29

10.4

23

968

30

33

58

299

968

4096

31

10.1

27

924

31

34

59

560

924

8192

46

12.2

39

843

41

60

83

122

843

16384

93

28.7

49

578

84

128

134

142

578

32768

139

23.7

88

641

134

168

181

190

641

63000

191

20.5

135

1254

189

211

221

237

1254

100000

216

17.8

168

1800

218

230

248

278

1800

500000

677

69.2

559

8061

679

713

721

774

8061

1048576

1368

181.8

1244

16449

1356

1439

1468

16449

16449

1548576

1940

328.8

1760

25178

1936

1956

1977

25178

25178

4194304

5287

1856.9

4807

85992

5244

5270

5297

85992

85992

10485760

12505

6581.9

12230

198530

12267

12293

12322

198530

198530


Perftest Scripts

To produce these tests, we executed RTI Perftest for C#. The exact script used can be found here:

  1#!/bin/bash
  2filename=$0
  3script_location=`cd "\`dirname "$filename"\`"; 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.75.20"
 26export ip_machine_2="10.2.75.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    # Get the aprox time this will take:
 91    total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps))
 92    total_time=$((total_tests * exec_time))
 93
 94    touch $output_file
 95    local no_headers=""
 96    local current_test=0
 97    for index in $(seq 1 ${num_reps}); do
 98        for DATALEN in ${datasizes_test}; do
 99            current_test=$((current_test + 1))
100            export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers"
101            if [[ "$role" == "pub" ]]; then
102                echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s"
103                echo -e ${BLUE}$command${NC}
104            else
105                echo -e ${LIGHTBLUE}$command${NC}
106            fi
107            if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then
108                sleep 3
109            fi
110            $command >> $output_file;
111            no_headers=" -noOutputHeaders"
112            change_domain
113        done
114    done
115}
116
117################################################################################
118# PARSE COMMAND LINE OPTIONS:
119
120while [ "$1" != "" ]; do
121    case $1 in
122        --executable)
123            executable=$2
124            shift
125            ;;
126        --output-folder)
127            output_folder=$2
128            shift
129            ;;
130        --role)
131            export role=$2
132            shift
133            ;;
134        --core)
135            export core=$2
136            shift
137            ;;
138        --test-kind)
139            export lat_thr=$2
140            shift
141            ;;
142        --interface1)
143            export interface=$2
144            shift
145            ;;
146        --interface2)
147            export interface2=$2
148            shift
149            ;;
150        --ip1)
151            export ip1=$2
152            shift
153            ;;
154        --ip2)
155            export ip2=$2
156            shift
157            ;;
158        --repetitions)
159            export num_reps=$2
160            shift
161            ;;
162        --domain)
163            export domain=$2
164            shift
165            ;;
166        --execution-time)
167            export exec_time=$2
168            shift
169            ;;
170        --transport)
171            export transport=$2
172            shift
173            ;;
174        --datalen)
175            export datalen_input=$2
176            shift
177            ;;
178        --file-suffix)
179            export file_suffix=$2
180            shift
181            ;;
182        --extra-arguments)
183            export extra_arguments=$2
184            shift
185            ;;
186        --extra-arguments-pub)
187            export extra_arguments_pub=$2
188            shift
189            ;;
190        --extra-arguments-sub)
191            export extra_arguments_sub=$2
192            shift
193            ;;
194        --skip-no-batching)
195            export skip_no_batching="1"
196            ;;
197        --skip-be)
198            export skip_be_tests="1"
199            ;;
200        --skip-rel)
201            export skip_rel_tests="1"
202            ;;
203        --skip-keyed)
204            export skip_keyed_data="1"
205            ;;
206        --skip-large-data)
207            export skip_large_data="1"
208            ;;
209        --large-data)
210            export large_data="1"
211            ;;
212        --keyed)
213            export skip_unkeyed="1"
214            ;;
215        --unkeyed)
216            export skip_keyed_data="1"
217            ;;
218        --no-batching)
219            export no_batching_only="1"
220            ;;
221        --reliable)
222            export skip_be_tests="1"
223            ;;
224        --best-effort)
225            export skip_rel_tests="1"
226            ;;
227        --security)
228            export security_only="$2"
229            shift
230            ;;
231        --micro)
232            export micro="1"
233            ;;
234        --tss)
235            export tss="1"
236            ;;
237        --no-colors)
238            export NO_COLORS="1"
239            ;;
240        --language)
241            export LANGUAGE=$2
242            shift
243            ;;
244        *)
245            echo -e "unknown parameter \"$1\""
246            exit -1
247            ;;
248    esac
249    shift
250done
251
252if [[ "$NO_COLORS" == "1" ]]; then
253    disable_colors
254fi
255
256export folder_base="$(dirname "${executable}")"/../../..
257
258if [[ $LANGUAGE == "java"  || "$LANGUAGE" == "cs" ]]; then
259    export folder_base="$(dirname "${executable}")"/../..
260fi
261if [[ $tss == "1" ]]; then
262    export folder_base="$(dirname "${executable}")"/../../../../..
263fi
264
265echo -e "${INFO_TAG} Perftest executable is: $executable"
266echo -e "${INFO_TAG} Output folder is: $output_folder"
267
268################################################################################
269
270if [[ "${skip_large_data}" == "1" ]]; then
271    export datasizes_extended=${datasizes}
272elif [[ "${large_data}" == "1" ]]; then
273    export datasizes=${datasizes_extended}
274fi
275
276if [[ "${datalen_input}" != "" ]]; then
277    echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}"
278    export datasizes=${datalen_input}
279    export datasizes_extended=${datalen_input}
280    if [[ "${no_batching_only}" != "1" ]]; then
281        export skip_large_data="1"
282    fi
283fi
284
285if [[ "$role" != "pub" && "$role" != "sub" ]]; then
286    echo -e "${ERROR_TAG} It must be either publisher or subscriber"
287    exit -1
288fi
289
290if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then
291    echo -e "${ERROR_TAG} It must be either lat or thr"
292    exit -1
293fi
294
295if [[ "${interface}" == "" ]]; then
296    echo "Using default nics"
297    export nic_publisher=${ip_machine_1}
298    export nic_subscriber=${ip_machine_2}
299else
300    export nic_publisher=$interface
301    echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}"
302
303    if [[ "${interface2}" == "" ]]; then
304        export nic_subscriber=$interface
305    else
306        export nic_subscriber=$interface2
307    fi
308    echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"
309
310    if [[ "${ip1}" != "" ]]; then
311        export ip_publisher=$ip1
312        echo "Using ip_publisher: ${ip_publisher}"
313    fi
314
315    if [[ "${ip2}" != "" ]]; then
316        export ip_subscriber=$ip2
317        echo "Using ip_subscriber: ${ip_subscriber}"
318    fi
319
320fi
321
322export transport_string="-transport $transport"
323
324if [[ "$transport" == "UDPv4" ]]; then
325
326    export transport_string_pub="$transport_string -nic $nic_publisher"
327    export transport_string_sub="$transport_string -nic $nic_subscriber"
328
329    if [[ "$micro" == "1" ]]; then
330        export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}"
331        export transport_string_sub="$transport_string_sub -peer ${ip_publisher}"
332    fi
333
334elif [[ "$transport" == "TCP" ]]; then
335    export transport_string_pub="$transport_string \
336        -nic $nic_publisher \
337        -peer 0@tcpv4_lan://${ip_subscriber}:7400"
338    export transport_string_sub="$transport_string \
339        -nic $nic_subscriber \
340        -peer 0@tcpv4_lan://${ip_publisher}:7400"
341elif [[ "$transport" == "TLS" ]]; then
342    export transport_string_pub="$transport_string \
343        -nic $nic_publisher \
344        -peer tlsv4_lan://${ip_subscriber}:7400"
345    export transport_string_sub="$transport_string \
346        -nic $nic_subscriber \
347        -peer tlsv4_lan://${ip_publisher}:7400"
348elif [[ "$transport" == "UDPv4_WAN" ]]; then
349    export transport_string_pub="$transport_string \
350        -nic $nic_publisher \
351        -transportPublicAddress $ip_publisher:7400"
352    export transport_string_sub="$transport_string \
353        -nic $nic_subscriber \
354        -peer 0@udpv4_wan://${ip_publisher}:7400"
355else
356    export transport_string_pub="$transport_string"
357    export transport_string_sub="$transport_string"
358fi 
359
360################################################################################
361
362export pub_string="-pub \
363        ${transport_string_pub} \
364        -noPrintIntervals \
365        -executionTime $exec_time"
366
367if [[ ${lat_thr} == "lat" ]]; then
368    export pub_string="$pub_string \
369        -latencyTest"
370fi
371
372export sub_string="-sub \
373        ${transport_string_sub} \
374        -noPrintIntervals"
375
376if [[ "$role" == "pub" ]]; then
377    echo -e "$INFO_TAG Publisher side running"
378    export commands_string=${pub_string}
379    export extra_arguments="${extra_arguments} ${extra_arguments_pub}"
380else
381    echo -e "$INFO_TAG Subscriber side running"
382    export commands_string=${sub_string}
383    export extra_arguments="${extra_arguments} ${extra_arguments_sub}"
384fi
385
386###############################################################################
387
388echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh"
389sudo /set_${lat_thr}_mode.sh
390sleep 5
391
392cd $folder_base
393echo -e "${INFO_TAG} Folder Base is: $PWD"
394mkdir -p $output_folder
395
396# Tests that may use batching (when doing throughput tests)
397if [[ ${no_batching_only} != "1" ]]; then 
398
399    # UNKEYED
400    if [[ "${skip_unkeyed}" == "" ]]; then
401
402        # RELIABLE
403        if [[ "${skip_rel_tests}" == "" ]]; then
404            execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix"
405        fi
406
407        # BEST EFFORT
408        if [[ "${skip_be_tests}" == "" ]]; then
409            execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
410        fi
411    fi
412
413    # KEYED
414    if [[ "${skip_keyed_data}" == "" ]]; then
415
416        # RELIABLE
417        if [[ "${skip_rel_tests}" == "" ]]; then
418            execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix"
419        fi
420
421        # BEST EFFORT
422        if [[ "${skip_be_tests}" == "" ]]; then
423            execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
424        fi
425    fi
426
427fi
428
429if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then
430    no_batching_tests="1"
431fi 
432
433# Tests that will not use batching
434if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then
435
436    if [[ "$role" == "pub" ]]; then
437        export commands_string="${commands_string} -batchSize 0"
438    fi
439
440    # UNKEYED
441    if [[ "${skip_unkeyed}" == "" ]]; then
442
443        # RELIABLE
444        if [[ "${skip_rel_tests}" == "" ]]; then
445            execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
446        fi
447
448        # BEST EFFORT
449        if [[ "${skip_be_tests}" == "" ]]; then
450            execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
451        fi
452    fi
453fi
1#!/bin/bash
2filename=$0
3script_location=`cd "\`dirname "$filename"\`"; pwd`
4
5echo -e "[Calling base_script/script.sh]"
6${script_location}/../base_script/script.sh $@ --transport UDPv4

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

1.2.4.2. Keyed, UDPv4 10Gbps Network, C#

The graph below shows the one-way latency without load between a Publisher and a Subscriber running in two Linux nodes in a 10Gbps network. The numbers are for best-effort as well as strict reliable reliability scenarios.

Note

We use the median (50th percentile) instead of the average in order to get a more stable measurement that does not account for spurious outliers. We also calculate the average value and other percentile values, which can be seen in the Detailed Statistics section below.

Detailed Statistics

The following tables contain the raw numbers presented by a simplified version of RTI Perftest for the Modern C# implementation. 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

20

4.4

19

295

20

21

22

50

295

64

20

3.7

19

300

20

21

22

55

300

128

20

5.8

20

303

21

21

22

34

303

256

21

1.7

20

304

21

21

23

45

304

512

21

4.2

20

300

21

22

23

33

300

1024

25

7.2

22

303

27

28

29

37

303

2048

30

9.3

25

1022

30

33

57

548

1022

4096

34

16.8

30

966

32

36

65

798

966

8192

46

8.4

39

325

42

59

62

70

325

16384

92

27.6

50

364

91

127

146

181

364

32768

179

11.8

71

550

179

181

182

196

550

63000

193

17.2

111

1070

194

195

197

232

1070

  • 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

22

4.5

21

156

22

23

26

40

156

64

22

2.4

21

120

22

22

24

38

120

128

22

4.1

21

682

22

23

25

40

682

256

24

4.9

21

128

23

32

41

56

128

512

25

5.5

22

144

23

33

41

49

144

1024

26

8.0

23

148

26

29

54

59

148

2048

30

9.3

25

1022

30

33

57

548

1022

4096

34

16.8

30

966

32

36

65

798

966

8192

48

11.7

41

224

44

61

87

116

224

16384

97

30.1

52

362

97

140

157

176

362

32768

178

17.6

84

629

181

188

190

235

629

63000

194

20.2

115

1098

195

197

202

228

1098


Perftest Scripts

To produce these tests, we executed RTI Perftest for C#. The exact script used can be found here:

  1#!/bin/bash
  2filename=$0
  3script_location=`cd "\`dirname "$filename"\`"; 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.75.20"
 26export ip_machine_2="10.2.75.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    # Get the aprox time this will take:
 91    total_tests=$((`wc -w <<< "$datasizes_test"` * num_reps))
 92    total_time=$((total_tests * exec_time))
 93
 94    touch $output_file
 95    local no_headers=""
 96    local current_test=0
 97    for index in $(seq 1 ${num_reps}); do
 98        for DATALEN in ${datasizes_test}; do
 99            current_test=$((current_test + 1))
100            export command="$pre_command_string $executable -domain $domain -dataLen $DATALEN $commands_string_test $other_args $no_headers"
101            if [[ "$role" == "pub" ]]; then
102                echo -e "Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s"
103                echo -e ${BLUE}$command${NC}
104            else
105                echo -e ${LIGHTBLUE}$command${NC}
106            fi
107            if [[ "$LANGUAGE" == "cs" && "$role" == "pub" ]]; then
108                sleep 3
109            fi
110            $command >> $output_file;
111            no_headers=" -noOutputHeaders"
112            change_domain
113        done
114    done
115}
116
117################################################################################
118# PARSE COMMAND LINE OPTIONS:
119
120while [ "$1" != "" ]; do
121    case $1 in
122        --executable)
123            executable=$2
124            shift
125            ;;
126        --output-folder)
127            output_folder=$2
128            shift
129            ;;
130        --role)
131            export role=$2
132            shift
133            ;;
134        --core)
135            export core=$2
136            shift
137            ;;
138        --test-kind)
139            export lat_thr=$2
140            shift
141            ;;
142        --interface1)
143            export interface=$2
144            shift
145            ;;
146        --interface2)
147            export interface2=$2
148            shift
149            ;;
150        --ip1)
151            export ip1=$2
152            shift
153            ;;
154        --ip2)
155            export ip2=$2
156            shift
157            ;;
158        --repetitions)
159            export num_reps=$2
160            shift
161            ;;
162        --domain)
163            export domain=$2
164            shift
165            ;;
166        --execution-time)
167            export exec_time=$2
168            shift
169            ;;
170        --transport)
171            export transport=$2
172            shift
173            ;;
174        --datalen)
175            export datalen_input=$2
176            shift
177            ;;
178        --file-suffix)
179            export file_suffix=$2
180            shift
181            ;;
182        --extra-arguments)
183            export extra_arguments=$2
184            shift
185            ;;
186        --extra-arguments-pub)
187            export extra_arguments_pub=$2
188            shift
189            ;;
190        --extra-arguments-sub)
191            export extra_arguments_sub=$2
192            shift
193            ;;
194        --skip-no-batching)
195            export skip_no_batching="1"
196            ;;
197        --skip-be)
198            export skip_be_tests="1"
199            ;;
200        --skip-rel)
201            export skip_rel_tests="1"
202            ;;
203        --skip-keyed)
204            export skip_keyed_data="1"
205            ;;
206        --skip-large-data)
207            export skip_large_data="1"
208            ;;
209        --large-data)
210            export large_data="1"
211            ;;
212        --keyed)
213            export skip_unkeyed="1"
214            ;;
215        --unkeyed)
216            export skip_keyed_data="1"
217            ;;
218        --no-batching)
219            export no_batching_only="1"
220            ;;
221        --reliable)
222            export skip_be_tests="1"
223            ;;
224        --best-effort)
225            export skip_rel_tests="1"
226            ;;
227        --security)
228            export security_only="$2"
229            shift
230            ;;
231        --micro)
232            export micro="1"
233            ;;
234        --tss)
235            export tss="1"
236            ;;
237        --no-colors)
238            export NO_COLORS="1"
239            ;;
240        --language)
241            export LANGUAGE=$2
242            shift
243            ;;
244        *)
245            echo -e "unknown parameter \"$1\""
246            exit -1
247            ;;
248    esac
249    shift
250done
251
252if [[ "$NO_COLORS" == "1" ]]; then
253    disable_colors
254fi
255
256export folder_base="$(dirname "${executable}")"/../../..
257
258if [[ $LANGUAGE == "java"  || "$LANGUAGE" == "cs" ]]; then
259    export folder_base="$(dirname "${executable}")"/../..
260fi
261if [[ $tss == "1" ]]; then
262    export folder_base="$(dirname "${executable}")"/../../../../..
263fi
264
265echo -e "${INFO_TAG} Perftest executable is: $executable"
266echo -e "${INFO_TAG} Output folder is: $output_folder"
267
268################################################################################
269
270if [[ "${skip_large_data}" == "1" ]]; then
271    export datasizes_extended=${datasizes}
272elif [[ "${large_data}" == "1" ]]; then
273    export datasizes=${datasizes_extended}
274fi
275
276if [[ "${datalen_input}" != "" ]]; then
277    echo -e "${YELLOW}[TEST] Testing only for ${datalen_input}${NC}"
278    export datasizes=${datalen_input}
279    export datasizes_extended=${datalen_input}
280    if [[ "${no_batching_only}" != "1" ]]; then
281        export skip_large_data="1"
282    fi
283fi
284
285if [[ "$role" != "pub" && "$role" != "sub" ]]; then
286    echo -e "${ERROR_TAG} It must be either publisher or subscriber"
287    exit -1
288fi
289
290if [[ "$lat_thr" != "thr" && "$lat_thr" != "lat" ]]; then
291    echo -e "${ERROR_TAG} It must be either lat or thr"
292    exit -1
293fi
294
295if [[ "${interface}" == "" ]]; then
296    echo "Using default nics"
297    export nic_publisher=${ip_machine_1}
298    export nic_subscriber=${ip_machine_2}
299else
300    export nic_publisher=$interface
301    echo -e "${INFO_TAG} Using nic_publisher: ${nic_publisher}"
302
303    if [[ "${interface2}" == "" ]]; then
304        export nic_subscriber=$interface
305    else
306        export nic_subscriber=$interface2
307    fi
308    echo -e "${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"
309
310    if [[ "${ip1}" != "" ]]; then
311        export ip_publisher=$ip1
312        echo "Using ip_publisher: ${ip_publisher}"
313    fi
314
315    if [[ "${ip2}" != "" ]]; then
316        export ip_subscriber=$ip2
317        echo "Using ip_subscriber: ${ip_subscriber}"
318    fi
319
320fi
321
322export transport_string="-transport $transport"
323
324if [[ "$transport" == "UDPv4" ]]; then
325
326    export transport_string_pub="$transport_string -nic $nic_publisher"
327    export transport_string_sub="$transport_string -nic $nic_subscriber"
328
329    if [[ "$micro" == "1" ]]; then
330        export transport_string_pub="$transport_string_pub -peer ${ip_subscriber}"
331        export transport_string_sub="$transport_string_sub -peer ${ip_publisher}"
332    fi
333
334elif [[ "$transport" == "TCP" ]]; then
335    export transport_string_pub="$transport_string \
336        -nic $nic_publisher \
337        -peer 0@tcpv4_lan://${ip_subscriber}:7400"
338    export transport_string_sub="$transport_string \
339        -nic $nic_subscriber \
340        -peer 0@tcpv4_lan://${ip_publisher}:7400"
341elif [[ "$transport" == "TLS" ]]; then
342    export transport_string_pub="$transport_string \
343        -nic $nic_publisher \
344        -peer tlsv4_lan://${ip_subscriber}:7400"
345    export transport_string_sub="$transport_string \
346        -nic $nic_subscriber \
347        -peer tlsv4_lan://${ip_publisher}:7400"
348elif [[ "$transport" == "UDPv4_WAN" ]]; then
349    export transport_string_pub="$transport_string \
350        -nic $nic_publisher \
351        -transportPublicAddress $ip_publisher:7400"
352    export transport_string_sub="$transport_string \
353        -nic $nic_subscriber \
354        -peer 0@udpv4_wan://${ip_publisher}:7400"
355else
356    export transport_string_pub="$transport_string"
357    export transport_string_sub="$transport_string"
358fi 
359
360################################################################################
361
362export pub_string="-pub \
363        ${transport_string_pub} \
364        -noPrintIntervals \
365        -executionTime $exec_time"
366
367if [[ ${lat_thr} == "lat" ]]; then
368    export pub_string="$pub_string \
369        -latencyTest"
370fi
371
372export sub_string="-sub \
373        ${transport_string_sub} \
374        -noPrintIntervals"
375
376if [[ "$role" == "pub" ]]; then
377    echo -e "$INFO_TAG Publisher side running"
378    export commands_string=${pub_string}
379    export extra_arguments="${extra_arguments} ${extra_arguments_pub}"
380else
381    echo -e "$INFO_TAG Subscriber side running"
382    export commands_string=${sub_string}
383    export extra_arguments="${extra_arguments} ${extra_arguments_sub}"
384fi
385
386###############################################################################
387
388echo -e "${INFO_TAG} Executing: /set_${lat_thr}_mode.sh"
389sudo /set_${lat_thr}_mode.sh
390sleep 5
391
392cd $folder_base
393echo -e "${INFO_TAG} Folder Base is: $PWD"
394mkdir -p $output_folder
395
396# Tests that may use batching (when doing throughput tests)
397if [[ ${no_batching_only} != "1" ]]; then 
398
399    # UNKEYED
400    if [[ "${skip_unkeyed}" == "" ]]; then
401
402        # RELIABLE
403        if [[ "${skip_rel_tests}" == "" ]]; then
404            execute_test "unkeyed" "rel" "${datasizes_extended}" "${extra_arguments}" "$file_suffix"
405        fi
406
407        # BEST EFFORT
408        if [[ "${skip_be_tests}" == "" ]]; then
409            execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
410        fi
411    fi
412
413    # KEYED
414    if [[ "${skip_keyed_data}" == "" ]]; then
415
416        # RELIABLE
417        if [[ "${skip_rel_tests}" == "" ]]; then
418            execute_test "keyed" "rel" "${datasizes}" "${extra_arguments}" "$file_suffix"
419        fi
420
421        # BEST EFFORT
422        if [[ "${skip_be_tests}" == "" ]]; then
423            execute_test "keyed" "be" "${datasizes}" "${extra_arguments}" "$file_suffix"
424        fi
425    fi
426
427fi
428
429if [[ "${skip_no_batching}" == "" || "${no_batching_only}" == "1" ]]; then
430    no_batching_tests="1"
431fi 
432
433# Tests that will not use batching
434if [[ "${lat_thr}" == "thr" && "${no_batching_tests}" == "1" ]]; then
435
436    if [[ "$role" == "pub" ]]; then
437        export commands_string="${commands_string} -batchSize 0"
438    fi
439
440    # UNKEYED
441    if [[ "${skip_unkeyed}" == "" ]]; then
442
443        # RELIABLE
444        if [[ "${skip_rel_tests}" == "" ]]; then
445            execute_test "unkeyed" "rel" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
446        fi
447
448        # BEST EFFORT
449        if [[ "${skip_be_tests}" == "" ]]; then
450            execute_test "unkeyed" "be" "${datasizes}" "${extra_arguments}" "_noBatch${file_suffix}"
451        fi
452    fi
453fi
1#!/bin/bash
2filename=$0
3script_location=`cd "\`dirname "$filename"\`"; pwd`
4
5echo -e "[Calling base_script/script.sh]"
6${script_location}/../base_script/script.sh $@ --transport UDPv4

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