Added the README file documenting the test suite
[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 contains
6 the following scripts:
7
8 - inventory_crawler.py: 
9   Retrieves all nodes from either the confg or operational data store
10   and prints a flow summary to the console. Depending on the print level
11   specified in a command line option, the summary can shows the overall
12   number of flows in the network, the number of flows in each node, or 
13   detailed data for each flow
14
15 - flow_config_blaster.py:
16   Adds and deletes ("blasts") flows into ODL's config space. Command line
17   options control the number of "blaster" threads, the number of blast cycles,
18   the number of flows blasted in each cycle by each thread, etc. 
19   flow_config_blaster.py provides the FlowConfigBlaster class that is reusable 
20   in other tests, such as in flow_add_delete_test.py
21
22 - config_cleanup.py:
23   Cleans up the config data store by deleting the entire inventory.
24
25 - flow_add_delete_test.py:
26   Adds/deletes ("blasts") flows into ODL's config space. Similar to the 
27   flow_config_blaster (in fact, flow_config_blaster is used in this test),
28   but has more advanced handling of the add/delete cycles. The test executes
29   in three steps:
30   1. The specified number of flows is added in the 'add cycle' (uses
31      flow_config_blaster to blast flows)
32   2. The network is polled for flow statistics statistics from the network 
33      (using the inventory_crawler) to make sure that all flows have been 
34      properly programmed into the network and stats can properly read them
35   3. The flows are deleted in the flow cycle (either in 'bulk' using the 
36      config_cleanup script or one by one using the flow_config_blaster) 
37
38
39
40 The Inventory Crawler:
41 ======================
42 To see the command line options, type:
43 > ./inventory_cralwer --help
44
45 usage: inventory_crawler.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
46                             [--plevel PLEVEL]
47                             [--datastore {operational,config}] [--no-auth]
48                             [--auth] [--debug]
49
50 optional arguments:
51   -h, --help            show this help message and exit
52   --odlhost ODLHOST     host where odl controller is running (default is
53                         127.0.0.1)
54   --odlport ODLPORT     port on which odl's RESTCONF is listening (default is
55                         8181)
56   --plevel PLEVEL       Print Level: 0 - Summary (stats only); 1 - Node names;
57                         2 - Node details;3 - Flow details
58   --datastore {operational,config}
59                         Which data store to crawl; default operational
60   --no-auth             Do not use authenticated access to REST (default)
61   --auth                Use authenticated access to REST (username: 'admin',
62                         password: 'admin').
63   --debug               List nodes that have not provided proper statistics
64                         data
65
66
67
68 The Flow Config Blaster:
69 ========================
70 To see the command line options, type:
71   > ./flow_config_blaster.py --help
72
73 usage: flow_config_blaster.py [-h] [--host HOST] [--port PORT] [--flows FLOWS]
74                               [--cycles CYCLES] [--threads THREADS]
75                               [--nodes NODES] [--delay DELAY] [--delete]
76                               [--no-delete] [--no-auth] [--auth]
77                               [--startflow STARTFLOW]
78
79 optional arguments:
80   -h, --help            show this help message and exit
81   --host HOST           Host where odl controller is running (default is
82                         127.0.0.1)
83   --port PORT           Port on which odl's RESTCONF is listening (default is
84                         8181)
85   --flows FLOWS         Number of flow add/delete requests to send in each
86                         cycle; default 10
87   --cycles CYCLES       Number of flow add/delete cycles to send in each
88                         thread; default 1
89   --threads THREADS     Number of request worker threads, default=1. Each
90                         thread will add/delete nflows.
91   --nodes NODES         Number of nodes if mininet is not connected;
92                         default=16. If mininet is connected, flows will be
93                         evenly distributed (programmed) into connected nodes.
94   --delay DELAY         Time to wait between the add and delete cycles;
95                         default=0
96   --delete              Delete all added flows one by one, benchmark delete
97                         performance.
98   --no-delete           Do not perform the delete cycle.
99   --no-auth             Do not use authenticated access to REST (default)
100   --auth                Use authenticated access to REST (username: 'admin',
101                         password: 'admin').
102   --startflow STARTFLOW
103                         The starting Flow ID; default=0
104
105 The 'startflow' command line parameter is used with multiple 
106 flow_config_blasters blasting flows at the same ODL instance. With Python's
107 GIL any given blastr can not use more than one CPU even when multiple blaster 
108 threads are specified. Therefore, multiple blaster processes must be used to
109 test ODL's preformance limits. The 'startflow' parameter gives each blaster 
110 process its own flow id space so that each injects unique flows into ODL's
111 config data store.
112
113  
114
115 The Config Cleanup
116 ==================
117 To see the command line options, type:
118   > ./config_cleanup.py --help
119
120 usage: config_cleanup.py [-h] [--odlhost ODLHOST] [--odlport ODLPORT]
121                          [--no-auth] [--auth]
122
123 Cleans up the config space
124
125 optional arguments:
126   -h, --help         show this help message and exit
127   --odlhost ODLHOST  host where odl controller is running (default is
128                      127.0.0.1)
129   --odlport ODLPORT  port on which odl's RESTCONF is listening (default is
130                      8181)
131   --no-auth          Do not use authenticated access to REST (default)
132   --auth             Use authenticated access to REST (username: 'admin',
133                      password: 'admin').
134
135
136
137 The Flow Add/Delete Test
138 ========================
139 To see the command line options, type:
140   >./flow_add_delete_test.py --help
141
142 usage: flow_add_delete_test.py [-h] [--host HOST] [--port PORT]
143                                [--flows FLOWS] [--cycles CYCLES]
144                                [--threads THREADS] [--nodes NODES]
145                                [--delay DELAY] [--timeout TIMEOUT] [--delete]
146                                [--bulk-delete] [--auth]
147                                [--startflow STARTFLOW]
148
149 Flow programming performance test: First adds and then deletes flows into the
150 config tree, as specified by optional parameters.
151
152 optional arguments:
153   -h, --help            show this help message and exit
154   --host HOST           Host where odl controller is running (default is
155                         127.0.0.1)
156   --port PORT           Port on which odl's RESTCONF is listening (default is
157                         8181)
158   --flows FLOWS         Number of flow add/delete requests to send in each
159                         cycle; default 10
160   --cycles CYCLES       Number of flow add/delete cycles to send in each
161                         thread; default 1
162   --threads THREADS     Number of request worker threads, default=1. Each
163                         thread will add/delete nflows.
164   --nodes NODES         Number of nodes if mininet is not connected;
165                         default=16. If mininet is connected, flows will be
166                         evenly distributed (programmed) into connected nodes.
167   --delay DELAY         Time to wait between the add and delete cycles;
168                         default=0
169   --timeout TIMEOUT     The maximum time to wait between the add and delete
170                         cycles; default=100
171   --delete              Delete all added flows one by one, benchmark delete
172                         performance.
173   --bulk-delete         Delete all flows in bulk; default=False
174   --auth                Use authenticated access to REST (username: 'admin',
175                         password: 'admin'); default=False
176   --startflow STARTFLOW
177                         The starting Flow ID; default=0