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] [--flows FLOWS]
89 [--cycles CYCLES] [--threads THREADS]
90 [--nodes NODES] [--delay DELAY] [--delete]
91 [--no-delete] [--no-auth] [--auth]
92 [--startflow STARTFLOW]
95 -h, --help show this help message and exit
96 --host HOST Host where odl controller is running (default is
98 --port PORT Port on which odl's RESTCONF is listening (default is
100 --flows FLOWS Number of flow add/delete requests to send in each
102 --cycles CYCLES Number of flow add/delete cycles to send in each
104 --threads THREADS Number of request worker threads, default=1. Each
105 thread will add/delete flows.
106 --nodes NODES Number of nodes if mininet is not connected;
107 default=16. If mininet is connected, flows will be
108 evenly distributed (programmed) into connected nodes.
109 --delay DELAY Time to wait between the add and delete cycles;
111 --delete Delete all added flows one by one, benchmark delete
113 --no-delete Do not perform the delete cycle.
114 --no-auth Do not use authenticated access to REST (default)
115 --auth Use authenticated access to REST (username: 'admin',
117 --startflow STARTFLOW
118 The starting Flow ID; default=0
120 NOTE: The 'startflow' command line parameter is used with multiple
121 flow_config_blasters blasting flows at the same ODL instance. With Python's
122 GIL any given blaster can not use more than one CPU even when multiple blaster
123 threads are specified. Therefore, multiple blaster processes must be used to
124 test ODL's performance limits. The 'startflow' parameter gives each blaster
125 process its own flow id space so that each injects unique flows into ODL's
128 NOTE: You don't have to be connected to mininet (or another openflow network,
129 for that matter) to use this script. If ODL is connected to an openflow
130 network, flow_config_blaster will evenly distribute flows across the network.
131 If ODL is not connected to a network, flows are only stored in the config
132 data store (i.e. nodes that may connect at some point in the future are in
133 effect "preconfigured"). The not-connected mode can be used to test the
134 performance of the data store and the REST subsystems. The 'nodes' parameter determines how many nodes are used in the non-connected mode.
138 To put 5000 flows into ODL running on the same node as the script type:
139 > ./flow_config_blaster.py --flows=5000 --auth --no-delete
141 To use 5 threads to put 5000 flows into ODL running on the same node as
143 > ./flow_config_blaster.py --threads=5 --flows=1000 --auth --no-delete
145 NOTE: each thread will put 1000 flows, and all 5 threads will work
148 To first put and then delete 5000 flows into ODL running on the same node
150 > ./flow_config_blaster.py --flows=5000 --auth
152 To use 5 threads to first put and then delete 5000 flows into ODL running
153 on the same node as the script type:
154 > ./flow_config_blaster.py --threads=5 --flows=1000 --auth
156 NOTE: 5 threads are used to both add and delete flows
158 To use 5 threads to first put and then delete 5000 flows into ODL in 10
159 add/delete cycles type:
160 > ./flow_config_blaster.py --threads=5 --flows=100 --cycles=10 --auth
162 NOTE: 5 threads are used to both add and delete flows.
164 NOTE: Both Add and Delete are performed in 10 cycles. 5 worker threads
165 are started in each cycle and the cycle ends when all threads finish.
166 Another cycle is started when the previous cycle finished. Cycles are
167 useful to determine performance degradation with increasing number of
168 flows in the datastore and in the network.
174 To see the command line options, type:
175 > ./config_cleanup.py --help
177 usage: config_cleanup.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
180 Cleans up the config space
183 -h, --help show this help message and exit
184 --odlhost ODLHOST host where odl controller is running (default is
186 --odlport ODLPORT port on which odl's RESTCONF is listening (default is
188 --no-auth Do not use authenticated access to REST (default)
189 --auth Use authenticated access to REST (username: 'admin',
194 The Flow Add/Delete Test
195 ========================
196 To see the command line options, type:
197 >./flow_add_delete_test.py --help
199 usage: flow_add_delete_test.py [-h] [--host HOST] [--port PORT]
200 [--flows FLOWS] [--cycles CYCLES]
201 [--threads THREADS] [--nodes NODES]
202 [--delay DELAY] [--timeout TIMEOUT] [--delete]
203 [--bulk-delete] [--auth]
204 [--startflow STARTFLOW]
206 Flow programming performance test: First adds and then deletes flows into the
207 config tree, as specified by optional parameters.
210 -h, --help show this help message and exit
211 --host HOST Host where odl controller is running (default is
213 --port PORT Port on which odl's RESTCONF is listening (default is
215 --flows FLOWS Number of flow add/delete requests to send in each
217 --cycles CYCLES Number of flow add/delete cycles to send in each
219 --threads THREADS Number of request worker threads, default=1. Each
220 thread will add/delete FLOWS flows.
221 --nodes NODES Number of nodes if mininet is not connected;
222 default=16. If mininet is connected, flows will be
223 evenly distributed (programmed) into connected nodes.
224 --delay DELAY Time to wait between the add and delete cycles;
226 --timeout TIMEOUT The maximum time to wait between the add and delete
228 --delete Delete all added flows one by one, benchmark delete
230 --bulk-delete Delete all flows in bulk; default=False
231 --auth Use authenticated access to REST (username: 'admin',
232 password: 'admin'); default=False
233 --startflow STARTFLOW
234 The starting Flow ID; default=0