1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
5 .. _controlloop-s3p-label:
10 Policy Clamp Controlloop
11 ~~~~~~~~~~~~~~~~~~~~~~~~
13 Both the Performance and the Stability tests were executed by performing requests
14 against controlloop components installed as docker images in local environment.
19 - Controlloop runtime component docker image is started and running.
20 - Participant docker images policy-clamp-cl-pf-ppnt, policy-clamp-cl-http-ppnt, policy-clamp-cl-k8s-ppnt are started and running.
21 - Dmaap simulator for communication between components.
22 - mariadb docker container for policy and controlloop database.
23 - policy-api for communication between policy participant and policy-framework
24 - Both tests were run via jMeter, which was installed on a separate VM.
26 Stability Test of Controlloop components
27 ++++++++++++++++++++++++++++++++++++++++
31 The 72 hours stability test ran the following steps sequentially in a single threaded loop.
33 - **Create Policy defaultDomain** - creates an operational policy using policy/api component
34 - **Delete Policy sampleDomain** - deletes the operational policy sampleDomain using policy/api component
35 - **Commission Contorlloop definition** - commissions the controlloop definition in runtime
36 - **Instantiate controlloop** - Instantiate the controlloop towards participants
37 - **Check controlloop state** - check the current state of controlloop
38 - **Change State to PASSIVE** - change the state of the controlloop to PASSIVE
39 - **Check controlloop state** - check the current state of controlloop
40 - **Change State to UNINITIALISED** - change the state of the controloop to UNINITIALISED
41 - **Check controlloop state** - check the current state of controlloop
42 - **Delete instantiated controlloop** - delete the instantiated controlloop from all participants
43 - **Delete ControlLoop Definition** - delete the controlloop definition on runtime
45 The following steps can be used to configure the parameters of test plan.
47 - **HTTP Authorization Manager** - used to store user/password authentication details.
48 - **HTTP Header Manager** - used to store headers which will be used for making HTTP requests.
49 - **User Defined Variables** - used to store following user defined parameters.
51 ============================= ========================================================================
52 **Name** **Description**
53 ============================= ========================================================================
54 RUNTIME_HOST IP Address or host name of controlloop runtime component
55 RUNTIME_PORT Port number of controlloop runtime components for making REST API calls
56 POLICY_PARTICIPANT_HOST IP Address or host name of policy participant
57 POLICY_PARTICIPANT_HOST_PORT Port number of policy participant
58 ============================= ========================================================================
60 The test was run in the background via "nohup", to prevent it from being interrupted:
64 nohup ./jMeter/apache-jmeter-5.2.1/bin/jmeter -n -t stability.jmx -l testresults.jtl
71 Stability test plan was triggered for 72 hours.
75 .. container:: paragraph
77 The assertions of state changes are not completely taken care of, as the stability is ran with controlloop componenets
78 alone, and not including complete policy framework deployment, which makes it difficult for actual state changes from
79 PASSIVE to RUNNING etc to happen.
83 ======================= ================= ================== ==================================
84 **Total # of requests** **Success %** **Error %** **Average time taken per request**
85 ======================= ================= ================== ==================================
86 99992 100.00 % 0.00 % 192 ms
87 ======================= ================= ================== ==================================
89 **Controloop component Setup**
91 ================ ========================================================= =========================================== =========================
92 **CONTAINER ID** **IMAGE** **PORTS** **NAMES**
93 ================ ========================================================= =========================================== =========================
94 a9cb0cd103cf onap/policy-clamp-cl-runtime:latest 6969/tcp policy-clamp-cl-runtime
95 886e572b8438 onap/policy-clamp-cl-pf-ppnt:latest 6973/tcp policy-clamp-cl-pf-ppnt
96 035707b1b95f nexus3.onap.org:10001/onap/policy-api:latest 6969/tcp policy-api
97 d34204f95ff3 onap/policy-clamp-cl-http-ppnt:latest 6971/tcp policy-clamp-cl-http-ppnt
98 4470e608c9a8 onap/policy-clamp-cl-k8s-ppnt:latest 6972/tcp, 8083/tcp policy-clamp-cl-k8s-ppnt
99 62229d46b79c nexus3.onap.org:10001/onap/policy-models-simulator:latest 3905/tcp, 6666/tcp, 6668-6670/tcp, 6680/tcp simulator
100 efaf0ca5e1f0 nexus3.onap.org:10001/mariadb:10.5.8 3306/tcp mariadb
101 ================ ========================================================= =========================================== =========================
105 .. container:: paragraph
107 There were no failures during the 72 hours test.
109 **JMeter Screenshot**
111 .. image:: clamp-s3p-results/controlloop_stability_jmeter.png
113 **JMeter Screenshot**
115 .. image:: clamp-s3p-results/controlloop_stability_table.png
117 **Memory and CPU usage**
119 The memory and CPU usage can be monitored by running "docker stats" command. A snapshot is taken before and after test execution to monitor the changes in resource utilization.
121 Memory and CPU usage before test execution:
123 .. image:: clamp-s3p-results/Stability_before_stats.png
125 Memory and CPU usage after test execution:
127 .. image:: clamp-s3p-results/Stability_after_stats.png
130 Performance Test of Controlloop components
131 ++++++++++++++++++++++++++++++++++++++++++
136 Performance test of Controlloop components has the goal of testing the min/avg/max processing time and rest call throughput for all the requests with multiple requests at the same time.
141 The performance test is performed on a similar setup as Stability test. The JMeter VM will be sending a large number of REST requests to the runtime component and collecting the statistics.
147 Performance test plan is the same as the stability test plan above except for the few differences listed below.
149 - Increase the number of threads up to 5 (simulating 5 users' behaviours at the same time).
150 - Reduce the test time to 2 hours.
155 Running/Triggering the performance test will be the same as the stability test. That is, launch JMeter pointing to corresponding *.jmx* test plan. The *RUNTIME_HOST*, *RUNTIME_PORT*, *POLICY_PARTICIPANT_HOST*, *POLICY_PARTICIPANT_HOST_PORT* are already set up in *.jmx*
159 nohup ./jMeter/apache-jmeter-5.2.1/bin/jmeter -n -t performance.jmx -l testresults.jtl
161 Once the test execution is completed, execute the below script to get the statistics:
165 $ cd ./clamp/testsuites/performance/src/main/resources/testplans
166 $ ./results.sh resultTree.log
171 Test results are shown as below.
175 ======================= ================= ================== ==================================
176 **Total # of requests** **Success %** **Error %** **Average time taken per request**
177 ======================= ================= ================== ==================================
178 13809 100 % 0.00 % 206 ms
179 ======================= ================= ================== ==================================
181 **Controloop component Setup**
183 ================ ========================================================= =========================================== =========================
184 **CONTAINER ID** **IMAGE** **PORTS** **NAMES**
185 ================ ========================================================= =========================================== =========================
186 a9cb0cd103cf onap/policy-clamp-cl-runtime:latest 6969/tcp policy-clamp-cl-runtime
187 886e572b8438 onap/policy-clamp-cl-pf-ppnt:latest 6973/tcp policy-clamp-cl-pf-ppnt
188 035707b1b95f nexus3.onap.org:10001/onap/policy-api:latest 6969/tcp policy-api
189 d34204f95ff3 onap/policy-clamp-cl-http-ppnt:latest 6971/tcp policy-clamp-cl-http-ppnt
190 4470e608c9a8 onap/policy-clamp-cl-k8s-ppnt:latest 6972/tcp, 8083/tcp policy-clamp-cl-k8s-ppnt
191 62229d46b79c nexus3.onap.org:10001/onap/policy-models-simulator:latest 3905/tcp, 6666/tcp, 6668-6670/tcp, 6680/tcp simulator
192 efaf0ca5e1f0 nexus3.onap.org:10001/mariadb:10.5.8 3306/tcp mariadb
193 ================ ========================================================= =========================================== =========================
195 **JMeter Screenshot**
197 .. image:: clamp-s3p-results/cl-s3p-performance-result-jmeter.png