2.2.2. Modern C++ API

The following tests have been performed by executing an RTI Perftest C++11 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.2.1. Unkeyed, UDPv4 10Gbps Network, C++11

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 RTI Perftest. These numbers are the exact output with no further processing.

  • Best Effort

Sample Size (Bytes)

Avg (μs)

Std (μs)

Min (μs)

Max (μs)

50% (μs)

90% (μs)

99% (μs)

99.99% (μs)

99.9999% (μs)

32

15

0.9

14

63

15

16

17

44

63

64

15

0.9

14

75

15

16

17

45

75

128

16

1.0

15

67

15

16

17

45

67

256

16

0.9

15

68

16

16

17

45

68

512

19

1.8

16

69

19

21

22

47

69

1024

25

4.7

17

93

26

29

33

55

93

2048

46

312.2

19

100083

46

55

64

82

100083

4096

44

154.0

23

100087

40

59

73

85

100087

8192

42

204.3

33

100096

35

57

64

81

100096

16384

85

25.1

46

247

84

123

135

151

247

32768

173

2.5

67

226

173

174

176

203

226

63000

185

2.7

102

215

185

187

189

214

215

  • 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

17

1.1

16

69

16

17

21

46

69

64

17

1.1

16

66

17

17

21

46

66

128

17

6.3

16

4535

17

17

21

46

4535

256

18

1.8

16

97

17

19

29

47

97

512

20

2.7

17

83

19

21

29

49

83

1024

25

5.0

18

77

26

28

43

57

77

2048

29

33.5

20

5004

30

33

44

71

5004

4096

31

15.5

25

4722

30

35

47

67

4722

8192

42

48.3

35

5034

37

57

66

3203

5034

16384

88

25.5

47

177

87

126

140

158

177

32768

174

6.8

75

224

175

176

179

204

224

63000

170

15.3

107

225

168

188

190

216

225

100000

198

12.4

159

273

204

211

215

242

273

500000

655

24.5

569

929

670

673

692

778

929

1048576

1143

49.6

1051

1768

1176

1186

1195

1768

1768

1548576

1689

27.4

1520

2556

1683

1749

1758

2556

2556

4194304

4142

58.9

4088

6786

4141

4161

4181

6786

6786

10485760

10526

225.6

10484

17166

10513

10543

10565

17166

17166


Perftest Scripts

To produce these tests, we executed RTI Perftest for C++11. 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        -noPrint \
 67        -exec $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        -noPrint"
 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
 87
 88cd $folder_base
 89mkdir -p $output_folder
 90
 91export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel.csv
 92touch $my_file
 93export extra_args=""
 94for index in ${num_reps}; do
 95    for DATALEN in 32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000 100000 500000 1048576 1548576 4194304 10485760; do
 96        export command="taskset -c 0 \
 97        $executable -domain $domain -datalen $DATALEN $commands_string $extra_args"
 98        echo $command ---- $index
 99        $command >> $my_file;
100        if [[ "$domain" == "1" ]]; then
101            export domain="2"
102        else
103            export domain="1"
104        fi
105        export extra_args=" -noOutputHeaders "
106    done
107done
108
109export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be.csv
110touch $my_file
111export extra_args=""
112for index in ${num_reps}; do
113    for DATALEN in ${dataLens}; do
114        export command="taskset -c 0 \
115        $executable -domain $domain -datalen $DATALEN -best $commands_string $extra_args"
116        echo $command ---- $index
117        $command >> $my_file;
118        if [[ "$domain" == "1" ]]; then
119            export domain="2"
120        else
121            export domain="1"
122        fi
123        export extra_args=" -noOutputHeaders "
124    done
125done
126
127export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_rel.csv
128touch $my_file
129export extra_args=""
130for index in ${num_reps}; do
131    for DATALEN in ${dataLens}; do
132        export command="taskset -c 0 \
133        $executable -domain $domain -datalen $DATALEN -keyed -instances 100000 $commands_string $extra_args"
134        echo $command ---- $index
135        $command >> $my_file;
136        if [[ "$domain" == "1" ]]; then
137            export domain="2"
138        else
139            export domain="1"
140        fi
141        export extra_args=" -noOutputHeaders "
142    done
143done
144
145export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_be.csv
146touch $my_file
147export extra_args=""
148for index in ${num_reps}; do
149    for DATALEN in ${dataLens}; do
150        export command="taskset -c 0 \
151        $executable -domain $domain -datalen $DATALEN -keyed -instances 100000 -best $commands_string $extra_args"
152        echo $command ---- $index
153        $command >> $my_file;
154        if [[ "$domain" == "1" ]]; then
155            export domain="2"
156        else
157            export domain="1"
158        fi
159        export extra_args=" -noOutputHeaders "
160    done
161done
162
163if [[ ${lat_thr} == "thr" ]]; then
164
165    if [[ "$pub_sub" == "pub" ]]; then
166        echo "Publisher side"
167        export commands_string="${commands_string} -batchSize 0"
168    fi
169
170    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be_noBatch.csv
171    touch $my_file
172    export extra_args=""
173    for index in ${num_reps}; do
174        for DATALEN in ${dataLens}; do
175            export command="taskset -c 0 \
176            $executable -domain $domain -datalen $DATALEN -best $commands_string $extra_args"
177            echo $command ---- $index
178            $command >> $my_file;
179            if [[ "$domain" == "1" ]]; then
180                export domain="2"
181            else
182                export domain="1"
183            fi
184            export extra_args=" -noOutputHeaders "
185        done
186    done
187
188    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel_noBatch.csv
189    touch $my_file
190    export extra_args=""
191    for index in ${num_reps}; do
192        for DATALEN in ${dataLens}; do
193            export command="taskset -c 0 \
194            $executable -domain $domain -datalen $DATALEN $commands_string $extra_args"
195            echo $command ---- $index
196            $command >> $my_file;
197            if [[ "$domain" == "1" ]]; then
198                export domain="2"
199            else
200                export domain="1"
201            fi
202            export extra_args=" -noOutputHeaders "
203        done
204    done
205
206fi

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.2.2. Keyed, UDPv4 10Gbps Network, C++11

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 RTI Perftest. These numbers are the exact output with no further processing.

  • Best Effort

Sample Size (Bytes)

Avg (μs)

Std (μs)

Min (μs)

Max (μs)

50% (μs)

90% (μs)

99% (μs)

99.99% (μs)

99.9999% (μs)

32

18

1.1

17

166

18

19

21

48

166

64

18

1.1

17

163

18

19

21

48

163

128

18

1.1

17

162

18

19

21

48

162

256

19

1.1

18

162

19

20

22

49

162

512

20

1.2

18

166

19

20

22

49

166

1024

25

2.8

19

172

26

28

29

56

172

2048

46

243.8

21

100096

49

61

63

80

100096

4096

30

1.2

26

175

30

31

32

58

175

8192

54

170.1

36

100104

53

64

71

91

100104

16384

94

24.2

48

220

83

126

132

155

220

32768

177

2.2

71

319

177

179

180

208

319

63000

189

3.2

106

333

189

191

193

220

333

  • 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

1.2

18

161

19

20

24

49

161

64

20

1.3

18

161

20

21

24

50

161

128

20

1.3

19

164

20

21

26

50

164

256

20

1.9

19

162

20

21

31

50

162

512

21

8.0

19

5057

21

23

29

50

5057

1024

26

9.4

20

4987

26

28

48

58

4987

2048

29

16.4

23

5028

30

32

47

67

5028

4096

31

10.1

27

4618

30

33

53

66

4618

8192

44

12.7

38

4477

40

56

76

101

4477

16384

93

26.7

50

272

92

132

149

167

272

32768

164

16.8

79

218

170

179

182

208

218

63000

190

2.8

112

346

190

192

196

221

346


Perftest Scripts

To produce these tests, we executed RTI Perftest for C++11. 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        -noPrint \
 67        -exec $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        -noPrint"
 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
 87
 88cd $folder_base
 89mkdir -p $output_folder
 90
 91export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel.csv
 92touch $my_file
 93export extra_args=""
 94for index in ${num_reps}; do
 95    for DATALEN in 32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000 100000 500000 1048576 1548576 4194304 10485760; do
 96        export command="taskset -c 0 \
 97        $executable -domain $domain -datalen $DATALEN $commands_string $extra_args"
 98        echo $command ---- $index
 99        $command >> $my_file;
100        if [[ "$domain" == "1" ]]; then
101            export domain="2"
102        else
103            export domain="1"
104        fi
105        export extra_args=" -noOutputHeaders "
106    done
107done
108
109export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be.csv
110touch $my_file
111export extra_args=""
112for index in ${num_reps}; do
113    for DATALEN in ${dataLens}; do
114        export command="taskset -c 0 \
115        $executable -domain $domain -datalen $DATALEN -best $commands_string $extra_args"
116        echo $command ---- $index
117        $command >> $my_file;
118        if [[ "$domain" == "1" ]]; then
119            export domain="2"
120        else
121            export domain="1"
122        fi
123        export extra_args=" -noOutputHeaders "
124    done
125done
126
127export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_rel.csv
128touch $my_file
129export extra_args=""
130for index in ${num_reps}; do
131    for DATALEN in ${dataLens}; do
132        export command="taskset -c 0 \
133        $executable -domain $domain -datalen $DATALEN -keyed -instances 100000 $commands_string $extra_args"
134        echo $command ---- $index
135        $command >> $my_file;
136        if [[ "$domain" == "1" ]]; then
137            export domain="2"
138        else
139            export domain="1"
140        fi
141        export extra_args=" -noOutputHeaders "
142    done
143done
144
145export my_file=$output_folder/${lat_thr}_${pub_sub}_keyed_be.csv
146touch $my_file
147export extra_args=""
148for index in ${num_reps}; do
149    for DATALEN in ${dataLens}; do
150        export command="taskset -c 0 \
151        $executable -domain $domain -datalen $DATALEN -keyed -instances 100000 -best $commands_string $extra_args"
152        echo $command ---- $index
153        $command >> $my_file;
154        if [[ "$domain" == "1" ]]; then
155            export domain="2"
156        else
157            export domain="1"
158        fi
159        export extra_args=" -noOutputHeaders "
160    done
161done
162
163if [[ ${lat_thr} == "thr" ]]; then
164
165    if [[ "$pub_sub" == "pub" ]]; then
166        echo "Publisher side"
167        export commands_string="${commands_string} -batchSize 0"
168    fi
169
170    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_be_noBatch.csv
171    touch $my_file
172    export extra_args=""
173    for index in ${num_reps}; do
174        for DATALEN in ${dataLens}; do
175            export command="taskset -c 0 \
176            $executable -domain $domain -datalen $DATALEN -best $commands_string $extra_args"
177            echo $command ---- $index
178            $command >> $my_file;
179            if [[ "$domain" == "1" ]]; then
180                export domain="2"
181            else
182                export domain="1"
183            fi
184            export extra_args=" -noOutputHeaders "
185        done
186    done
187
188    export my_file=$output_folder/${lat_thr}_${pub_sub}_unkeyed_rel_noBatch.csv
189    touch $my_file
190    export extra_args=""
191    for index in ${num_reps}; do
192        for DATALEN in ${dataLens}; do
193            export command="taskset -c 0 \
194            $executable -domain $domain -datalen $DATALEN $commands_string $extra_args"
195            echo $command ---- $index
196            $command >> $my_file;
197            if [[ "$domain" == "1" ]]; then
198                export domain="2"
199            else
200                export domain="1"
201            fi
202            export extra_args=" -noOutputHeaders "
203        done
204    done
205
206fi

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