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
26 Cleans up the config data store by deleting the entire inventory.
28 - flow_add_delete_test.py:
29 Adds/deletes ("blasts") flows into ODL's config space. Similar to the
30 flow_config_blaster (in fact, flow_config_blaster is used in this test),
31 but has more advanced handling of the add/delete cycles. The test
32 executes in three steps:
33 1. The specified number of flows is added in the 'add cycle' (uses
34 flow_config_blaster to blast flows)
35 2. The network is polled for flow statistics from the network
36 (using the inventory_crawler) to make sure that all flows have been
37 properly programmed into the network and stats can properly read them
38 3. The flows are deleted in the flow cycle (either in 'bulk' using the
39 config_cleanup script or one by one using the flow_config_blaster)
43 The Inventory Crawler:
44 ======================
45 To see the command line options, type:
46 > ./inventory_crawler --help
48 usage: inventory_crawler.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
50 [--datastore {operational,config}] [--no-auth]
54 -h, --help show this help message and exit
55 --odlhost ODLHOST host where odl controller is running (default is
57 --odlport ODLPORT port on which odl's RESTCONF is listening (default is
59 --plevel PLEVEL Print Level: 0 - Summary (stats only); 1 - Node names;
60 2 - Node details;3 - Flow details
61 --datastore {operational,config}
62 Which data store to crawl; default operational
63 --no-auth Do not use authenticated access to REST (default)
64 --auth Use authenticated access to REST (username: 'admin',
66 --debug List nodes that have not provided proper statistics
71 To show a summary of all flows shown in the network, type:
72 > ./inventory_crawler.py --plevel=1 --auth
74 NOTE: REST authentication is turned by default in ODL Helium. To use
75 authenticated REST, you have to specify the '--auth' switch in the command
78 To show a summary of all flows shown in the config data store, type:
79 > ./inventory_crawler.py --plevel=1 --datastore=config --auth
83 The Flow Config Blaster:
84 ========================
85 To see the command line options, type:
86 > ./flow_config_blaster.py --help
88 usage: flow_config_blaster.py [-h] [--host HOST] [--port PORT]
89 [--cycles CYCLES] [--threads THREADS]
90 [--flows FLOWS] [--nodes NODES] [--delay DELAY]
91 [--delete] [--no-delete] [--auth]
92 [--startflow STARTFLOW] [--file FILE]
94 Flow programming performance test: First adds and then deletes flows into the
95 config tree, as specified by optional parameters.
98 -h, --help show this help message and exit
99 --host HOST Host where odl controller is running (default is
101 --port PORT Port on which odl's RESTCONF is listening (default is
103 --cycles CYCLES Number of flow add/delete cycles; default 1. Both Flow
104 Adds and Flow Deletes are performed in cycles.
105 <THREADS> worker threads are started in each cycle and
106 the cycle ends when all threads finish. Another cycle
107 is started when the previous cycle finished.
108 --threads THREADS Number of request worker threads to start in each
109 cycle; default=1. Each thread will add/delete <FLOWS>
111 --flows FLOWS Number of flows that will be added/deleted by each
112 worker thread in each cycle; default 10
113 --nodes NODES Number of nodes if mininet is not connected;
114 default=16. If mininet is connected, flows will be
115 evenly distributed (programmed) into connected nodes.
116 --delay DELAY Time (in seconds) to wait between the add and delete
118 --delete Delete all added flows one by one, benchmark delete
120 --no-delete Do not perform the delete cycle.
121 --auth Use the ODL default username/password 'admin'/'admin'
122 to authenticate access to REST; default: no
124 --startflow STARTFLOW
125 The starting Flow ID; default=0
126 --file FILE File from which to read the JSON flow template;
127 default: no file, use a built in template.
129 NOTE: The 'startflow' command line parameter is used with multiple
130 flow_config_blasters blasting flows at the same ODL instance. With Python's
131 GIL any given blaster can not use more than one CPU even when multiple blaster
132 threads are specified. Therefore, multiple blaster processes must be used to
133 test ODL's performance limits. The 'startflow' parameter gives each blaster
134 process its own flow id space so that each injects unique flows into ODL's
137 NOTE: You don't have to be connected to mininet (or another openflow network,
138 for that matter) to use this script. If ODL is connected to an openflow
139 network, flow_config_blaster will evenly distribute flows across the network.
140 If ODL is not connected to a network, flows are only stored in the config
141 data store (i.e. nodes that may connect at some point in the future are in
142 effect "preconfigured"). The not-connected mode can be used to test the
143 performance of the data store and the REST subsystems. The 'nodes' parameter
144 determines how many nodes are used in the non-connected mode.
148 To put 5000 flows into ODL running on the same node as the script type:
149 > ./flow_config_blaster.py --flows=5000 --auth --no-delete
151 To use 5 threads to put 5000 flows into ODL running on the same node as
153 > ./flow_config_blaster.py --threads=5 --flows=1000 --auth --no-delete
155 NOTE: each thread will put 1000 flows, and all 5 threads will work
158 To first put and then delete 5000 flows into ODL running on the same node
160 > ./flow_config_blaster.py --flows=5000 --auth
162 To use 5 threads to first put and then delete 5000 flows into ODL running
163 on the same node as the script type:
164 > ./flow_config_blaster.py --threads=5 --flows=1000 --auth
166 NOTE: 5 threads are used to both add and delete flows
168 To use 5 threads to first put and then delete 5000 flows into ODL in 10
169 add/delete cycles type:
170 > ./flow_config_blaster.py --threads=5 --flows=100 --cycles=10 --auth
172 NOTE: 5 threads are used to both add and delete flows.
174 NOTE: Both Add and Delete are performed in 10 cycles. 5 worker threads
175 are started in each cycle and the cycle ends when all threads finish.
176 Cycles are useful to determine performance degradation with increasing
177 number of flows in the datastore and in the network.
179 To put and then delete 1000 flows with nicira match and action extensions,
181 >./flow_config_blaster.py --flows=1000 --auth --file=./nicira-ext-all.json
183 NOTE: json for flow adds will be taken from the file 'nicira-ext-all.json'
189 To see the command line options, type:
190 > ./config_cleanup.py --help
192 usage: config_cleanup.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
195 Cleans up the config space
198 -h, --help show this help message and exit
199 --odlhost ODLHOST host where odl controller is running (default is
201 --odlport ODLPORT port on which odl's RESTCONF is listening (default is
203 --no-auth Do not use authenticated access to REST (default)
204 --auth Use authenticated access to REST (username: 'admin',
209 The Flow Add/Delete Test
210 ========================
211 To see the command line options, type:
212 >./flow_add_delete_test.py --help
214 usage: flow_add_delete_test.py [-h] [--host HOST] [--port PORT]
215 [--flows FLOWS] [--cycles CYCLES]
216 [--threads THREADS] [--nodes NODES]
217 [--delay DELAY] [--timeout TIMEOUT] [--delete]
218 [--bulk-delete] [--auth]
219 [--startflow STARTFLOW]
221 Flow programming performance test: First adds and then deletes flows into the
222 config tree, as specified by optional parameters.
225 -h, --help show this help message and exit
226 --host HOST Host where odl controller is running (default is
228 --port PORT Port on which odl's RESTCONF is listening (default is
230 --flows FLOWS Number of flow add/delete requests to send in each
232 --cycles CYCLES Number of flow add/delete cycles to send in each
234 --threads THREADS Number of request worker threads, default=1. Each
235 thread will add/delete FLOWS flows.
236 --nodes NODES Number of nodes if mininet is not connected;
237 default=16. If mininet is connected, flows will be
238 evenly distributed (programmed) into connected nodes.
239 --delay DELAY Time to wait between the add and delete cycles;
241 --timeout TIMEOUT The maximum time to wait between the add and delete
243 --delete Delete all added flows one by one, benchmark delete
245 --bulk-delete Delete all flows in bulk; default=False
246 --auth Use authenticated access to REST (username: 'admin',
247 password: 'admin'); default=False
248 --startflow STARTFLOW
249 The starting Flow ID; default=0