Additional comments & spellcheck for the README file
[integration/test.git] / test / tools / odl-mdsal-clustering-tests / clustering-performance-test / README
1 OpenDaylight Performance Test Suite
2 ===================================
3
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
7 add and delete flows.
8
9 The test suite contains the following scripts:
10
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
17
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
24
25 - config_cleanup.py:
26   Cleans up the config data store by deleting the entire inventory.
27
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) 
40
41
42
43 The Inventory Crawler:
44 ======================
45 To see the command line options, type:
46 > ./inventory_crawler --help
47
48 usage: inventory_crawler.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
49                             [--plevel PLEVEL]
50                             [--datastore {operational,config}] [--no-auth]
51                             [--auth] [--debug]
52
53 optional arguments:
54   -h, --help            show this help message and exit
55   --odlhost ODLHOST     host where odl controller is running (default is
56                         127.0.0.1)
57   --odlport ODLPORT     port on which odl's RESTCONF is listening (default is
58                         8181)
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',
65                         password: 'admin').
66   --debug               List nodes that have not provided proper statistics
67                         data
68
69 Examples:
70 ---------
71 To show a summary of all flows shown in the network, type:
72 > ./inventory_crawler.py --plevel=1 --auth
73
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
76 line.
77
78 To show a summary of all flows shown in the config data store, type:
79 > ./inventory_crawler.py --plevel=1 --datastore=config --auth
80
81
82
83 The Flow Config Blaster:
84 ========================
85 To see the command line options, type:
86   > ./flow_config_blaster.py --help
87
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]
93
94 optional arguments:
95   -h, --help            show this help message and exit
96   --host HOST           Host where odl controller is running (default is
97                         127.0.0.1)
98   --port PORT           Port on which odl's RESTCONF is listening (default is
99                         8181)
100   --flows FLOWS         Number of flow add/delete requests to send in each
101                         cycle; default 10
102   --cycles CYCLES       Number of flow add/delete cycles to send in each
103                         thread; default 1
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;
110                         default=0
111   --delete              Delete all added flows one by one, benchmark delete
112                         performance.
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',
116                         password: 'admin').
117   --startflow STARTFLOW
118                         The starting Flow ID; default=0
119
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
126 config data store.
127
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.
135
136 Examples:
137 ---------
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
140
141 To use 5 threads to put 5000 flows into ODL running on the same node as 
142 the script type:
143    > ./flow_config_blaster.py --threads=5 --flows=1000 --auth --no-delete
144
145    NOTE: each thread will put 1000 flows, and all 5 threads will work 
146    simultaneously.
147
148 To first put and then delete 5000 flows into ODL running on the same node
149 as the script type:
150    > ./flow_config_blaster.py --flows=5000 --auth
151
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
155   
156  NOTE: 5 threads are used to both add and delete flows
157
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
161
162    NOTE: 5 threads are used to both add and delete flows. 
163
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.
169
170
171
172 The Config Cleanup
173 ==================
174 To see the command line options, type:
175   > ./config_cleanup.py --help
176
177 usage: config_cleanup.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
178                          [--no-auth] [--auth]
179
180 Cleans up the config space
181
182 optional arguments:
183   -h, --help         show this help message and exit
184   --odlhost ODLHOST  host where odl controller is running (default is
185                      127.0.0.1)
186   --odlport ODLPORT  port on which odl's RESTCONF is listening (default is
187                      8181)
188   --no-auth          Do not use authenticated access to REST (default)
189   --auth             Use authenticated access to REST (username: 'admin',
190                      password: 'admin').
191
192
193
194 The Flow Add/Delete Test
195 ========================
196 To see the command line options, type:
197   >./flow_add_delete_test.py --help
198
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]
205
206 Flow programming performance test: First adds and then deletes flows into the
207 config tree, as specified by optional parameters.
208
209 optional arguments:
210   -h, --help            show this help message and exit
211   --host HOST           Host where odl controller is running (default is
212                         127.0.0.1)
213   --port PORT           Port on which odl's RESTCONF is listening (default is
214                         8181)
215   --flows FLOWS         Number of flow add/delete requests to send in each
216                         cycle; default 10
217   --cycles CYCLES       Number of flow add/delete cycles to send in each
218                         thread; default 1
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;
225                         default=0
226   --timeout TIMEOUT     The maximum time to wait between the add and delete
227                         cycles; default=100
228   --delete              Delete all added flows one by one, benchmark delete
229                         performance.
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