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)

Avg (μs)

Std (μs)

Min (μs)

Max (μs)

50% (μs)

90% (μs)

99% (μs)

99.99% (μs)

99.9999% (μs)

32

17

2.0

16

620

17

17

19

47

620

64

16

5.2

16

624

17

17

18

26

624

128

16

5.7

16

620

17

17

18

26

620

256

17

3.7

16

629

17

18

19

27

629

512

19

3.6

17

488

19

21

22

29

488

1024

25

5.8

18

500

26

30

31

40

500

2048

37

304.0

20

100069

31

56

66

84

100069

4096

31

135.8

25

100066

30

36

64

72

100066

8192

40

12.5

36

530

40

59

62

70

530

16384

92

28.1

47

588

85

124

130

141

588

32768

153

25.7

72

594

158

178

187

193

594

63000

189

14.6

107

1100

189

191

194

202

1100

  • 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

3.6

17

575

18

19

20

39

575

64

18

2.0

17

567

18

19

20

36

567

128

18

6.0

17

644

18

19

38

45

644

256

20

6.5

17

480

19

30

38

46

480

512

21

5.8

18

573

20

22

41

48

573

1024

25

7.7

19

493

26

29

54

58

493

2048

29

9.3

21

985

29

34

46

204

985

4096

31

9.9

26

946

31

35

56

561

946

8192

45

12.1

37

568

40

60

81

123

568

16384

93

25.6

48

528

85

126

133

141

528

32768

135

17.8

80

655

135

179

183

191

655

63000

191

15.0

112

1139

191

193

198

204

1139


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

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)

Avg (μs)

Std (μs)

Min (μs)

Max (μs)

50% (μs)

90% (μs)

99% (μs)

99.99% (μs)

99.9999% (μs)

32

18

5.8

18

631

19

19

20

29

631

64

18

5.9

18

638

19

19

20

29

638

128

19

2.6

18

639

19

20

21

30

639

256

19

4.6

19

655

19

20

21

29

655

512

20

1.7

19

639

20

20

21

29

639

1024

25

5.5

20

314

26

28

32

39

314

2048

45

474.7

22

100164

44

65

75

101

100164

4096

38

144.7

27

100066

31

59

66

82

100066

8192

44

7.7

38

329

40

57

62

123

329

16384

90

28.1

49

423

85

130

145

154

423

32768

162

17.5

76

546

164

181

186

194

546

63000

191

18.0

108

1004

192

193

195

202

1004

  • 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

21

3.2

20

642

21

22

23

44

642

64

21

2.8

20

589

21

22

23

42

589

128

21

3.9

20

649

21

22

23

40

649

256

22

7.5

20

643

21

32

40

48

643

512

24

5.7

21

126

22

32

41

48

126

1024

26

5.7

22

551

26

29

53

62

551

2048

30

8.3

24

929

30

33

58

94

929

4096

32

12.7

29

951

31

34

64

654

951

8192

47

11.0

40

250

42

60

84

118

250

16384

89

30.5

51

360

88

135

152

165

360

32768

170

16.9

79

659

173

185

189

198

659

63000

158

15.7

113

1052

156

170

191

214

1052


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