2.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.

2.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)

Avg (μs)

Std (μs)

Min (μs)

Max (μs)

50% (μs)

90% (μs)

99% (μs)

99.99% (μs)

99.9999% (μs)

32

16

3.7

15

636

16

17

18

25

636

64

16

3.9

16

572

16

17

18

27

572

128

16

5.2

16

582

17

17

18

25

582

256

17

3.3

16

615

17

18

20

27

615

512

19

4.4

17

483

19

21

22

29

483

1024

27

369.2

18

100064

26

31

51

67

100064

2048

34

138.5

20

100061

31

50

65

73

100061

4096

46

226.0

25

100098

46

58

63

78

100098

8192

44

10.2

36

510

39

59

62

70

510

16384

91

26.3

47

552

82

123

129

153

552

32768

176

8.6

70

643

176

178

181

196

643

63000

189

8.4

108

1177

189

190

194

203

1177

  • 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

18

4.1

17

645

18

19

20

33

645

64

18

1.4

17

571

18

18

20

46

571

128

18

5.8

17

639

18

19

38

41

639

256

20

7.5

18

870

19

30

38

45

870

512

20

7.4

18

484

20

22

41

49

484

1024

25

7.8

20

766

26

29

54

58

766

2048

29

9.5

21

954

30

33

46

420

954

4096

31

11.7

26

962

31

36

61

625

962

8192

45

14.4

37

723

40

61

80

124

723

16384

90

27.5

48

552

89

129

145

158

552

32768

139

17.7

75

601

133

167

180

190

601

63000

191

14.4

116

1048

191

193

198

210

1048


Perftest Scripts

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

  1echo EXECUTABLE IS $1
  2export executable=$1
  3
  4export folder_base="$(dirname "${executable}")"/../..
  5
  6echo OUTPUT PATH IS $2
  7export output_folder=$2
  8export pub_sub="pub"
  9export lat_thr="lat"
 10export num_reps="1 2 3 4"
 11export dataLens="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000"
 12export domain="2"
 13
 14if [[ -z "$3" ]]; then
 15    echo "You need a third argument with publisher or subscriber"
 16    exit -1
 17else
 18    if [[ "$3" == "publisher" ]]; then
 19        echo "Publisher"
 20        export pub_sub="pub"
 21        
 22    elif [[ "$3" == "subscriber" ]]; then
 23        echo "Subscriber"
 24        export pub_sub="sub"
 25    else
 26        echo "It must be either publisher or subscriber"
 27        exit -1
 28    fi
 29fi
 30
 31if [[ -z "$4" ]]; then
 32    echo "You need a forth argument with lat or thr"
 33    exit -1
 34else
 35    if [[ "$4" == "thr" ]]; then
 36        echo "Throughput test"
 37        export ${lat_thr}_thr="thr"
 38        
 39    elif [[ "$4" == "lat" ]]; then
 40        echo "Latency test"
 41        export ${lat_thr}_thr="lat"
 42    else
 43        echo "It must be either lat or thr"
 44        exit -1
 45    fi
 46fi
 47
 48if [[ -z "$5" ]]; then
 49    echo "Using default nics"
 50    export nic1=172.16.0.1
 51    export nic2=172.16.0.2
 52else
 53    echo "Using custom nic: $5"
 54    export nic1=$5
 55    export nic2=$5
 56fi
 57
 58sudo /set_${lat_thr}_mode.sh
 59sleep 10
 60
 61export exec_time=20
 62
 63export pub_string="-pub \
 64        -transport UDPv4 \
 65        -nic $nic1 \
 66        -noPrintIntervals \
 67        -executionTime $exec_time"
 68
 69if [[ ${lat_thr} == "lat" ]]; then
 70    export pub_string="$pub_string \
 71        -latencyTest"
 72fi
 73
 74export sub_string="-sub \
 75        -transport UDPv4 \
 76        -nic $nic2 \
 77        -noPrintIntervals"
 78
 79if [[ "$pub_sub" == "pub" ]]; then
 80    echo "Publisher side"
 81    export commands_string=${pub_string}
 82else
 83    echo "Subscriber side"
 84    export commands_string=${sub_string}
 85fi
 86
 87cd $folder_base
 88mkdir -p $output_folder
 89
 90export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel.csv
 91touch $my_file
 92export extra_args=""
 93for index in ${num_reps}; do
 94    for DATALEN in ${dataLens}; do
 95        export command="\
 96        $executable -domain $domain -dataLen $DATALEN $commands_string $extra_args"
 97        echo $command ---- $index
 98        $command >> $my_file;
 99        if [[ "$domain" == "1" ]]; then
100            export domain="2"
101        else
102            export domain="1"
103        fi
104        export extra_args=" -noOutputHeaders "
105    done
106done
107
108export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be.csv
109touch $my_file
110export extra_args=""
111for index in ${num_reps}; do
112    for DATALEN in ${dataLens}; do
113        export command="\
114        $executable -domain $domain -dataLen $DATALEN -bestEffort $commands_string $extra_args"
115        echo $command ---- $index
116        $command >> $my_file;
117        if [[ "$domain" == "1" ]]; then
118            export domain="2"
119        else
120            export domain="1"
121        fi
122        export extra_args=" -noOutputHeaders "
123    done
124done
125
126export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_rel.csv
127touch $my_file
128export extra_args=""
129for index in ${num_reps}; do
130    for DATALEN in ${dataLens}; do
131        export command="\
132        $executable -domain $domain -dataLen $DATALEN -keyed -instances 100000 $commands_string $extra_args"
133        echo $command ---- $index
134        $command >> $my_file;
135        if [[ "$domain" == "1" ]]; then
136            export domain="2"
137        else
138            export domain="1"
139        fi
140        export extra_args=" -noOutputHeaders "
141    done
142done
143
144export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_be.csv
145touch $my_file
146export extra_args=""
147for index in ${num_reps}; do
148    for DATALEN in ${dataLens}; do
149        export command="\
150        $executable -domain $domain -dataLen $DATALEN -keyed -instances 100000 -bestEffort $commands_string $extra_args"
151        echo $command ---- $index
152        $command >> $my_file;
153        if [[ "$domain" == "1" ]]; then
154            export domain="2"
155        else
156            export domain="1"
157        fi
158        export extra_args=" -noOutputHeaders "
159    done
160done
161
162if [[ ${lat_thr} == "thr" ]]; then
163
164    if [[ "$pub_sub" == "pub" ]]; then
165        echo "Publisher side"
166        export commands_string="${commands_string} -batchSize 0"
167    fi
168
169    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be_noBatch.csv
170    touch $my_file
171    export extra_args=""
172    for index in ${num_reps}; do
173        for DATALEN in ${dataLens}; do
174            export command="\
175            $executable -domain $domain -dataLen $DATALEN -bestEffort $commands_string $extra_args"
176            echo $command ---- $index
177            $command >> $my_file;
178            if [[ "$domain" == "1" ]]; then
179                export domain="2"
180            else
181                export domain="1"
182            fi
183            export extra_args=" -noOutputHeaders "
184        done
185    done
186
187    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel_noBatch.csv
188    touch $my_file
189    export extra_args=""
190    for index in ${num_reps}; do
191        for DATALEN in ${dataLens}; do
192            export command="\
193            $executable -domain $domain -dataLen $DATALEN $commands_string $extra_args"
194            echo $command ---- $index
195            $command >> $my_file;
196            if [[ "$domain" == "1" ]]; then
197                export domain="2"
198            else
199                export domain="1"
200            fi
201            export extra_args=" -noOutputHeaders "
202        done
203    done
204
205fi

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

2.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)

Avg (μs)

Std (μs)

Min (μs)

Max (μs)

50% (μs)

90% (μs)

99% (μs)

99.99% (μs)

99.9999% (μs)

32

3185

2189613.7

18

1514046223

19

19

20

28

1514046223

64

19

3.3

18

642

19

20

21

28

642

128

19

4.4

18

650

19

20

21

29

650

256

19

2.2

18

585

19

19

21

28

585

512

19

6.2

19

584

20

20

21

31

584

1024

25

6.5

20

312

26

28

32

48

312

2048

46

391.6

22

100070

43

62

68

90

100070

4096

44

354.1

27

100098

41

57

63

86

100098

8192

46

8.1

38

331

41

59

62

70

331

16384

90

31.3

49

419

84

125

138

154

419

32768

178

10.2

83

555

178

180

181

203

555

63000

191

11.2

108

1047

191

193

196

202

1047

  • 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

20

4.6

19

774

20

21

22

49

774

64

20

3.6

19

586

20

21

22

37

586

128

21

3.2

20

776

21

22

23

41

776

256

22

8.1

20

750

21

32

39

48

750

512

24

5.1

21

680

22

32

41

48

680

1024

26

5.5

21

147

26

28

51

61

147

2048

29

10.2

24

927

30

33

58

81

927

4096

31

11.9

29

902

30

33

64

549

902

8192

46

12.9

40

290

42

60

84

119

290

16384

94

29.3

50

361

87

129

136

144

361

32768

176

14.4

77

654

180

182

187

193

654

63000

158

16.2

110

1196

159

170

185

196

1196


Perftest Scripts

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

  1echo EXECUTABLE IS $1
  2export executable=$1
  3
  4export folder_base="$(dirname "${executable}")"/../..
  5
  6echo OUTPUT PATH IS $2
  7export output_folder=$2
  8export pub_sub="pub"
  9export lat_thr="lat"
 10export num_reps="1 2 3 4"
 11export dataLens="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000"
 12export domain="2"
 13
 14if [[ -z "$3" ]]; then
 15    echo "You need a third argument with publisher or subscriber"
 16    exit -1
 17else
 18    if [[ "$3" == "publisher" ]]; then
 19        echo "Publisher"
 20        export pub_sub="pub"
 21        
 22    elif [[ "$3" == "subscriber" ]]; then
 23        echo "Subscriber"
 24        export pub_sub="sub"
 25    else
 26        echo "It must be either publisher or subscriber"
 27        exit -1
 28    fi
 29fi
 30
 31if [[ -z "$4" ]]; then
 32    echo "You need a forth argument with lat or thr"
 33    exit -1
 34else
 35    if [[ "$4" == "thr" ]]; then
 36        echo "Throughput test"
 37        export ${lat_thr}_thr="thr"
 38        
 39    elif [[ "$4" == "lat" ]]; then
 40        echo "Latency test"
 41        export ${lat_thr}_thr="lat"
 42    else
 43        echo "It must be either lat or thr"
 44        exit -1
 45    fi
 46fi
 47
 48if [[ -z "$5" ]]; then
 49    echo "Using default nics"
 50    export nic1=172.16.0.1
 51    export nic2=172.16.0.2
 52else
 53    echo "Using custom nic: $5"
 54    export nic1=$5
 55    export nic2=$5
 56fi
 57
 58sudo /set_${lat_thr}_mode.sh
 59sleep 10
 60
 61export exec_time=20
 62
 63export pub_string="-pub \
 64        -transport UDPv4 \
 65        -nic $nic1 \
 66        -noPrintIntervals \
 67        -executionTime $exec_time"
 68
 69if [[ ${lat_thr} == "lat" ]]; then
 70    export pub_string="$pub_string \
 71        -latencyTest"
 72fi
 73
 74export sub_string="-sub \
 75        -transport UDPv4 \
 76        -nic $nic2 \
 77        -noPrintIntervals"
 78
 79if [[ "$pub_sub" == "pub" ]]; then
 80    echo "Publisher side"
 81    export commands_string=${pub_string}
 82else
 83    echo "Subscriber side"
 84    export commands_string=${sub_string}
 85fi
 86
 87cd $folder_base
 88mkdir -p $output_folder
 89
 90export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel.csv
 91touch $my_file
 92export extra_args=""
 93for index in ${num_reps}; do
 94    for DATALEN in ${dataLens}; do
 95        export command="\
 96        $executable -domain $domain -dataLen $DATALEN $commands_string $extra_args"
 97        echo $command ---- $index
 98        $command >> $my_file;
 99        if [[ "$domain" == "1" ]]; then
100            export domain="2"
101        else
102            export domain="1"
103        fi
104        export extra_args=" -noOutputHeaders "
105    done
106done
107
108export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be.csv
109touch $my_file
110export extra_args=""
111for index in ${num_reps}; do
112    for DATALEN in ${dataLens}; do
113        export command="\
114        $executable -domain $domain -dataLen $DATALEN -bestEffort $commands_string $extra_args"
115        echo $command ---- $index
116        $command >> $my_file;
117        if [[ "$domain" == "1" ]]; then
118            export domain="2"
119        else
120            export domain="1"
121        fi
122        export extra_args=" -noOutputHeaders "
123    done
124done
125
126export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_rel.csv
127touch $my_file
128export extra_args=""
129for index in ${num_reps}; do
130    for DATALEN in ${dataLens}; do
131        export command="\
132        $executable -domain $domain -dataLen $DATALEN -keyed -instances 100000 $commands_string $extra_args"
133        echo $command ---- $index
134        $command >> $my_file;
135        if [[ "$domain" == "1" ]]; then
136            export domain="2"
137        else
138            export domain="1"
139        fi
140        export extra_args=" -noOutputHeaders "
141    done
142done
143
144export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_be.csv
145touch $my_file
146export extra_args=""
147for index in ${num_reps}; do
148    for DATALEN in ${dataLens}; do
149        export command="\
150        $executable -domain $domain -dataLen $DATALEN -keyed -instances 100000 -bestEffort $commands_string $extra_args"
151        echo $command ---- $index
152        $command >> $my_file;
153        if [[ "$domain" == "1" ]]; then
154            export domain="2"
155        else
156            export domain="1"
157        fi
158        export extra_args=" -noOutputHeaders "
159    done
160done
161
162if [[ ${lat_thr} == "thr" ]]; then
163
164    if [[ "$pub_sub" == "pub" ]]; then
165        echo "Publisher side"
166        export commands_string="${commands_string} -batchSize 0"
167    fi
168
169    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be_noBatch.csv
170    touch $my_file
171    export extra_args=""
172    for index in ${num_reps}; do
173        for DATALEN in ${dataLens}; do
174            export command="\
175            $executable -domain $domain -dataLen $DATALEN -bestEffort $commands_string $extra_args"
176            echo $command ---- $index
177            $command >> $my_file;
178            if [[ "$domain" == "1" ]]; then
179                export domain="2"
180            else
181                export domain="1"
182            fi
183            export extra_args=" -noOutputHeaders "
184        done
185    done
186
187    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel_noBatch.csv
188    touch $my_file
189    export extra_args=""
190    for index in ${num_reps}; do
191        for DATALEN in ${dataLens}; do
192            export command="\
193            $executable -domain $domain -dataLen $DATALEN $commands_string $extra_args"
194            echo $command ---- $index
195            $command >> $my_file;
196            if [[ "$domain" == "1" ]]; then
197                export domain="2"
198            else
199                export domain="1"
200            fi
201            export extra_args=" -noOutputHeaders "
202        done
203    done
204
205fi

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