1 OpenDaylight Performance Test Suite
2 ===================================
4 The performance tests in this suite use ODL's RESTCONF API to add/delete
5 flows into/from ODL's configuration data store. The test suite is meant for
6 manual performance testing, where a user can tests different ways/scale to
9 The test suite contains the following scripts:
11 - inventory_crawler.py:
12 Retrieves all nodes from either the config or operational data store
13 and prints a flow summary to the console. Depending on the print level
14 specified in a command line option, the summary can shows the overall
15 number of flows in the network, the number of flows in each node, or
16 detailed data for each flow
18 - flow_config_blaster.py:
19 Adds and deletes ("blasts") flows into ODL's config space. Command line
20 options control the number of "blaster" threads, the number of blast
21 cycles, the number of flows blasted in each cycle by each thread, etc.
22 flow_config_blaster.py provides the FlowConfigBlaster class that is
23 reusable in other tests, such as in flow_add_delete_test.py
25 - flow_config_blaster_fle.py:
26 "FlowConfigBlaster Floodlight Edition" - the same as flow_config_blaster,
27 but for the Floodlight controller.
30 Cleans up the config data store by deleting the entire inventory.
32 - flow_add_delete_test.py:
33 Adds/deletes ("blasts") flows into ODL's config space. Similar to the
34 flow_config_blaster (in fact, flow_config_blaster is used in this test),
35 but has more advanced handling of the add/delete cycles. The test
36 executes in three steps:
37 1. The specified number of flows is added in the 'add cycle' (uses
38 flow_config_blaster to blast flows)
39 2. The network is polled for flow statistics from the network
40 (using the inventory_crawler) to make sure that all flows have been
41 properly programmed into the network and stats can properly read them
42 3. The flows are deleted in the flow cycle (either in 'bulk' using the
43 config_cleanup script or one by one using the flow_config_blaster)
47 The Inventory Crawler:
48 ======================
49 To see the command line options, type:
50 > ./inventory_crawler --help
52 usage: inventory_crawler.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
54 [--datastore {operational,config}] [--no-auth]
58 -h, --help show this help message and exit
59 --odlhost ODLHOST host where odl controller is running (default is
61 --odlport ODLPORT port on which odl's RESTCONF is listening (default is
63 --plevel PLEVEL Print Level: 0 - Summary (stats only); 1 - Node names;
64 2 - Node details;3 - Flow details
65 --datastore {operational,config}
66 Which data store to crawl; default operational
67 --no-auth Do not use authenticated access to REST (default)
68 --auth Use authenticated access to REST (username: 'admin',
70 --debug List nodes that have not provided proper statistics
75 To show a summary of all flows shown in the network, type:
76 > ./inventory_crawler.py --plevel=1 --auth
78 NOTE: REST authentication is turned by default in ODL Helium. To use
79 authenticated REST, you have to specify the '--auth' switch in the command
82 To show a summary of all flows shown in the config data store, type:
83 > ./inventory_crawler.py --plevel=1 --datastore=config --auth
87 The Flow Config Blaster:
88 ========================
89 To see the command line options, type:
90 > ./flow_config_blaster.py --help
92 usage: flow_config_blaster.py [-h] [--host HOST] [--port PORT]
93 [--cycles CYCLES] [--threads THREADS]
94 [--flows FLOWS] [--nodes NODES] [--delay DELAY]
95 [--delete] [--no-delete] [--auth]
96 [--startflow STARTFLOW] [--file FILE]
98 Flow programming performance test: First adds and then deletes flows into the
99 config tree, as specified by optional parameters.
102 -h, --help show this help message and exit
103 --host HOST Host where odl controller is running (default is
105 --port PORT Port on which odl's RESTCONF is listening (default is
107 --cycles CYCLES Number of flow add/delete cycles; default 1. Both Flow
108 Adds and Flow Deletes are performed in cycles.
109 <THREADS> worker threads are started in each cycle and
110 the cycle ends when all threads finish. Another cycle
111 is started when the previous cycle finished.
112 --threads THREADS Number of request worker threads to start in each
113 cycle; default=1. Each thread will add/delete <FLOWS>
115 --flows FLOWS Number of flows that will be added/deleted by each
116 worker thread in each cycle; default 10
117 --nodes NODES Number of nodes if mininet is not connected;
118 default=16. If mininet is connected, flows will be
119 evenly distributed (programmed) into connected nodes.
120 --delay DELAY Time (in seconds) to wait between the add and delete
122 --delete Delete all added flows one by one, benchmark delete
124 --no-delete Do not perform the delete cycle.
125 --auth Use the ODL default username/password 'admin'/'admin'
126 to authenticate access to REST; default: no
128 --startflow STARTFLOW
129 The starting Flow ID; default=0
130 --file FILE File from which to read the JSON flow template;
131 default: no file, use a built in template.
133 NOTE: The 'startflow' command line parameter is used with multiple
134 flow_config_blasters blasting flows at the same ODL instance. With Python's
135 GIL any given blaster can not use more than one CPU even when multiple blaster
136 threads are specified. Therefore, multiple blaster processes must be used to
137 test ODL's performance limits. The 'startflow' parameter gives each blaster
138 process its own flow id space so that each injects unique flows into ODL's
141 NOTE: You don't have to be connected to mininet (or another openflow network,
142 for that matter) to use this script. If ODL is connected to an openflow
143 network, flow_config_blaster will evenly distribute flows across the network.
144 If ODL is not connected to a network, flows are only stored in the config
145 data store (i.e. nodes that may connect at some point in the future are in
146 effect "preconfigured"). The not-connected mode can be used to test the
147 performance of the data store and the REST subsystems. The 'nodes' parameter
148 determines how many nodes are used in the non-connected mode.
152 To put 5000 flows into ODL running on the same node as the script type:
153 > ./flow_config_blaster.py --flows=5000 --auth --no-delete
155 To use 5 threads to put 5000 flows into ODL running on the same node as
157 > ./flow_config_blaster.py --threads=5 --flows=1000 --auth --no-delete
159 NOTE: each thread will put 1000 flows, and all 5 threads will work
162 To first put and then delete 5000 flows into ODL running on the same node
164 > ./flow_config_blaster.py --flows=5000 --auth
166 To use 5 threads to first put and then delete 5000 flows into ODL running
167 on the same node as the script type:
168 > ./flow_config_blaster.py --threads=5 --flows=1000 --auth
170 NOTE: 5 threads are used to both add and delete flows
172 To use 5 threads to first put and then delete 5000 flows into ODL in 10
173 add/delete cycles type:
174 > ./flow_config_blaster.py --threads=5 --flows=100 --cycles=10 --auth
176 NOTE: 5 threads are used to both add and delete flows.
178 NOTE: Both Add and Delete are performed in 10 cycles. 5 worker threads
179 are started in each cycle and the cycle ends when all threads finish.
180 Cycles are useful to determine performance degradation with increasing
181 number of flows in the datastore and in the network.
183 To put and then delete 1000 flows with nicira match and action extensions,
185 >./flow_config_blaster.py --flows=1000 --auth --file=./nicira-ext-all.json
187 NOTE: json for flow adds will be taken from the file 'nicira-ext-all.json'
193 To see the command line options, type:
194 > ./config_cleanup.py --help
196 usage: config_cleanup.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
199 Cleans up the config space
202 -h, --help show this help message and exit
203 --odlhost ODLHOST host where odl controller is running (default is
205 --odlport ODLPORT port on which odl's RESTCONF is listening (default is
207 --no-auth Do not use authenticated access to REST (default)
208 --auth Use authenticated access to REST (username: 'admin',
213 The Flow Add/Delete Test
214 ========================
215 To see the command line options, type:
216 >./flow_add_delete_test.py --help
218 usage: flow_add_delete_test.py [-h] [--host HOST] [--port PORT]
219 [--flows FLOWS] [--cycles CYCLES]
220 [--threads THREADS] [--nodes NODES]
221 [--delay DELAY] [--timeout TIMEOUT] [--delete]
222 [--bulk-delete] [--auth]
223 [--startflow STARTFLOW]
225 Flow programming performance test: First adds and then deletes flows into the
226 config tree, as specified by optional parameters.
229 -h, --help show this help message and exit
230 --host HOST Host where odl controller is running (default is
232 --port PORT Port on which odl's RESTCONF is listening (default is
234 --cycles CYCLES Number of flow add/delete cycles; default 1. Both Flow
235 Adds and Flow Deletes are performed in cycles.
236 <THREADS> worker threads are started in each cycle and
237 the cycle ends when all threads finish. Another cycle
238 is started when the previous cycle finished.
239 --threads THREADS Number of request worker threads to start in each
240 cycle; default=1. Each thread will add/delete <FLOWS>
242 --flows FLOWS Number of flows that will be added/deleted by each
243 worker thread in each cycle; default 10
244 --nodes NODES Number of nodes if mininet is not connected;
245 default=16. If mininet is connected, flows will be
246 evenly distributed (programmed) into connected nodes.
247 --delay DELAY Time (seconds) to between inventory polls when waiting
248 for stats to catch up; default=1
249 --timeout TIMEOUT The maximum time (seconds) to wait between the add and
250 delete cycles; default=100
251 --delete Delete all added flows one by one, benchmark delete
253 --bulk-delete Delete all flows in bulk; default=False
254 --auth Use authenticated access to REST (username: 'admin',
255 password: 'admin'); default=False
256 --startflow STARTFLOW
257 The starting Flow ID; default=0
258 --file FILE File from which to read the JSON flow template;
259 default: no file, use a built in template.
263 To put 5000 flows into ODL, then wait for stats to catch up and then delete
264 the flows in bulk (using config_cleanup):
265 > ./flow_add_delete_test.py --flows=5000 --auth --no-delete --bulk-delete