forked from chaudron/ovs_perf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runfullday.sh
executable file
·273 lines (242 loc) · 7.44 KB
/
runfullday.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
#!/bin/sh
#
# Copyright 2017 "OVS Performance" Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Files name:
# runfullday.sh
#
# Description:
# Simple script to run the OVS performance test script for a day
#
# Author:
# Eelco Chaudron
#
# Initial Created:
# 11 October 2017
#
echo "This script will run the tests as explained in the \"Full day PVP test\""
echo "section. It will start the scripts according to the configuration given below,"
echo "and will archive the results."
echo
echo "NOTE: Make sure you are passing the basic test as explained in \"Running the "
echo " PVP script\" before starting the full day run!"
echo
#
# Get all the configuration details from the user
#
unset DATAPATH
while [[ ! ${DATAPATH} =~ ^dpdk|kernel|tc$ ]]; do
echo -n "What datapath are you using, DPDK or Linux Kernel [dpdk/kernel/tc]? "
read DATAPATH
done
if [[ ${DATAPATH} = "dpdk" ]]; then
NIC_Q=2
TESTPMD_DELAY=0
else
NIC_Q=1
TESTPMD_DELAY=8
fi
echo -n "What is the IP address where the DUT (Open vSwitch) is running? "
read DUT_IP
echo -n "What is the root password of the DUT? "
read DUT_PW
echo -n "What is the IP address of the virtual machine running on the DUT? "
read VM_IP
echo -n "What is the root password of the VM (default: root)? "
read VM_PW
VM_PW=${VM_PW:-"root"}
echo -n "What is the IP address of the TRex tester? "
read TREX_IP
echo -n "What is the physical interface being used, i.e. dpdk0, em1, p4p5? "
read PHY_INT
echo -n "What is the virtual interface being used, i.e. vhost0, vnet0? "
read VM_INT
echo -n "What is the virtual interface PCI id? "
read VM_PCI
echo -n "Enter the Number of VM nic receive descriptors, 4096(default)? "
read VM_RXD
VM_RXD=${VM_RXD:-4096}
echo -n "Enter the Number of Number of VM nic transmit descriptors, 1024(default)? "
read VM_TXD
VM_TXD=${VM_TXD:-1024}
echo -n "What is the TRex tester physical interface being used? "
read TREX_INT
echo -n "What is the link speed of the physical interface, i.e. 10(default),25,40,50,100? "
read NIC_SPD
case $NIC_SPD in
10 | 25 | 40 | 50 | 100) ;;
*) NIC_SPD=10 ;;
esac
unset STREAM_LIST
DEFAULT_STREAM_LIST="10,1000,10000,100000,1000000"
echo -n "Enter L2/L3 streams list. default($DEFAULT_STREAM_LIST)? "
read STREAM_LIST
STREAM_LIST=${STREAM_LIST:-$DEFAULT_STREAM_LIST}
#
# Execute the four tests in order...
#
mkdir -p ~/pvp_results_10_l2_$DATAPATH
cd ~/pvp_results_10_l2_$DATAPATH
~/ovs_perf/ovs_performance.py \
-d -l testrun_log.txt \
--tester-type trex \
--tester-address $TREX_IP \
--tester-interface $TREX_INT \
--ovs-address $DUT_IP \
--ovs-user root \
--ovs-password $DUT_PW \
--dut-vm-address $VM_IP \
--dut-vm-user root \
--dut-vm-password $VM_PW \
--dut-vm-nic-queues=$NIC_Q \
--physical-interface $PHY_INT \
--physical-speed=$NIC_SPD \
--virtual-interface $VM_INT \
--dut-vm-nic-pci=$VM_PCI \
--no-bridge-config \
--skip-pv-test \
--flow-type=L2 \
--dut-vm-nic-rxd=$VM_RXD \
--dut-vm-nic-txd=$VM_TXD \
--stream-list=$STREAM_LIST \
--testpmd-startup-delay=$TESTPMD_DELAY \
--run-time=1000
mkdir -p ~/pvp_results_10_l3_$DATAPATH
cd ~/pvp_results_10_l3_$DATAPATH
~/ovs_perf/ovs_performance.py \
-d -l testrun_log.txt \
--tester-type trex \
--tester-address $TREX_IP \
--tester-interface $TREX_INT \
--ovs-address $DUT_IP \
--ovs-user root \
--ovs-password $DUT_PW \
--dut-vm-address $VM_IP \
--dut-vm-user root \
--dut-vm-password $VM_PW \
--dut-vm-nic-queues=$NIC_Q \
--physical-interface $PHY_INT \
--physical-speed=$NIC_SPD \
--virtual-interface $VM_INT \
--dut-vm-nic-pci=$VM_PCI \
--no-bridge-config \
--skip-pv-test \
--flow-type=L3 \
--dut-vm-nic-rxd=$VM_RXD \
--dut-vm-nic-txd=$VM_TXD \
--stream-list=$STREAM_LIST \
--testpmd-startup-delay=$TESTPMD_DELAY \
--run-time=1000
mkdir -p ~/pvp_results_1_l2_$DATAPATH
cd ~/pvp_results_1_l2_$DATAPATH
~/ovs_perf/ovs_performance.py \
-d -l testrun_log.txt \
--tester-type trex \
--tester-address $TREX_IP \
--tester-interface $TREX_INT \
--ovs-address $DUT_IP \
--ovs-user root \
--ovs-password $DUT_PW \
--dut-vm-address $VM_IP \
--dut-vm-user root \
--dut-vm-password $VM_PW \
--dut-vm-nic-queues=$NIC_Q \
--physical-interface $PHY_INT \
--physical-speed=$NIC_SPD \
--virtual-interface $VM_INT \
--dut-vm-nic-pci=$VM_PCI \
--no-bridge-config \
--skip-pv-test \
--dut-vm-nic-rxd=$VM_RXD \
--dut-vm-nic-txd=$VM_TXD \
--stream-list=$STREAM_LIST \
--testpmd-startup-delay=$TESTPMD_DELAY \
--flow-type=L2
mkdir -p ~/pvp_results_1_l3_$DATAPATH
cd ~/pvp_results_1_l3_$DATAPATH
~/ovs_perf/ovs_performance.py \
-d -l testrun_log.txt \
--tester-type trex \
--tester-address $TREX_IP \
--tester-interface $TREX_INT \
--ovs-address $DUT_IP \
--ovs-user root \
--ovs-password $DUT_PW \
--dut-vm-address $VM_IP \
--dut-vm-user root \
--dut-vm-password $VM_PW \
--dut-vm-nic-queues=$NIC_Q \
--physical-interface $PHY_INT \
--physical-speed=$NIC_SPD \
--virtual-interface $VM_INT \
--dut-vm-nic-pci=$VM_PCI \
--no-bridge-config \
--skip-pv-test \
--dut-vm-nic-rxd=$VM_RXD \
--dut-vm-nic-txd=$VM_TXD \
--stream-list=$STREAM_LIST \
--testpmd-startup-delay=$TESTPMD_DELAY \
--flow-type=L3
#
# Verify the results are ok, i.e. meaning we received traffic on all occasions.
#
echo "================================================================================="
echo "== ALL TESTS ARE DONE ==="
echo "================================================================================="
echo
#
# Check that all test have packets passing...
#
for stream in ${STREAM_LIST//,/ }; do
if grep -h -E "^$stream," \
~/pvp_results_1*_l*_*/test_results_l*.csv | \
tr -s '\n\r' ',' | grep -q ",0,"; then
echo "!! ERROR: Failed test, found a test with 0 packet throughput!!"
fi
done
#
# Check the 256 byte, 10 Flow test, and make sure they have at least 75%
# of 10G line rate at L3
#
if [[ ${DATAPATH} = "dpdk" ]]; then
L3_10_DPDK=`grep -h "^10," ~/pvp_results_1*_l3_dpdk/test_results_l3.csv | \
cut -d ',' -f 4`
for L3_10_DPDK in $L3_10_DPDK; do
L3_10_OK=`bc <<-EOF
${L3_10_DPDK} >= (10000000000*0.75)/(8*(256+12+8))
EOF
`
case "$L3_10_OK" in
1) ;; # l3 pvp above 75% line rate
0|*)
echo "!! WARNING: L3 PVP test did not hit 75% of 10G line rate !!"
echo
echo " NOTE: Depending on the expected throughput of the blade this might be a"
echo " problem."
;;
esac
done
fi
echo
echo "Please verify all the results and make sure they are within the expected"
echo "rates for the blade!!"
echo
#
# tar up the results...
#
echo "================================================================================="
FILENAME=~/pvp_results_`date +%Y-%m-%d_%H%M%S`_${DATAPATH}.tgz
tar -czf ${FILENAME} ~/pvp_results_*_${DATAPATH} && rm -rf ~/pvp_results_*_${DATAPATH}
echo "All test results are saved in: \"${FILENAME}\""