1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
13 Both the Performance and the Stability tests were executed by performing requests
14 against Policy components installed as part of a full ONAP OOM deployment in Nordix lab.
19 - Policy-PAP along with all policy components deployed as part of a full ONAP OOM deployment.
20 - A second instance of APEX-PDP is spun up in the setup. Update the configuration file (OnapPfConfig.json) such that the PDP can register to the new group created by PAP in the tests.
21 - Both tests were run via jMeter.
28 The 72 hours stability test ran the following steps sequentially in a single threaded loop.
30 Setup Phase (steps running only once)
31 """""""""""""""""""""""""""""""""""""
33 - **Create Policy for defaultGroup** - creates an operational policy using policy/api component
34 - **Create NodeTemplate metadata for sampleGroup policy** - creates a node template containing metadata using policy/api component
35 - **Create Policy for sampleGroup** - creates an operational policy that refers to the metadata created above using policy/api component
36 - **Change defaultGroup state to ACTIVE** - changes the state of defaultGroup PdpGroup to ACTIVE
37 - **Create/Update PDP Group** - creates a new PDPGroup named sampleGroup.
38 A second instance of the PDP that is already spun up gets registered to this new group
39 - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that both PdpGroups are in ACTIVE state.
41 PAP Test Flow (steps running in a loop for 72 hours)
42 """"""""""""""""""""""""""""""""""""""""""""""""""""
44 - **Check Health** - checks the health status of pap
45 - **PAP Metrics** - Fetch prometheus metrics before the deployment/undeployment cycle
46 Save different counters such as deploy/undeploy-success/failure counters at API and engine level.
47 - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that both PdpGroups are in the ACTIVE state.
48 - **Deploy Policy for defaultGroup** - deploys the policy defaultDomain to defaultGroup
49 - **Check status of defaultGroup policy** - checks the status of defaultGroup PdpGroup with the defaultDomain policy 1.0.0.
50 - **Check PdpGroup Audit defaultGroup** - checks the audit information for the defaultGroup PdpGroup.
51 - **Check PdpGroup Audit Policy (defaultGroup)** - checks the audit information for the defaultGroup PdpGroup with the defaultDomain policy 1.0.0.
52 - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that 2 PdpGroups are in the ACTIVE state and defaultGroup has a policy deployed on it.
53 - **Deployment Update for sampleGroup policy** - deploys the policy sampleDomain in sampleGroup PdpGroup using pap api
54 - **Check status of sampleGroup** - checks the status of the sampleGroup PdpGroup.
55 - **Check status of PdpGroups** - checks the status of both PdpGroups.
56 - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that the defaultGroup has a policy defaultDomain deployed on it and sampleGroup has policy sampleDomain deployed on it.
57 - **Check Audit** - checks the audit information for all PdpGroups.
58 - **Check Consolidated Health** - checks the consolidated health status of all policy components.
59 - **Check Deployed Policies** - checks for all the deployed policies using pap api.
60 - **Undeploy policy in sampleGroup** - undeploys the policy sampleDomain from sampleGroup PdpGroup using pap api
61 - **Undeploy policy in defaultGroup** - undeploys the policy defaultDomain from PdpGroup
62 - **Check status of policies** - checks the status of all policies and make sure both the policies are undeployed
63 - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that PdpGroup is in the PASSIVE state.
64 - **PAP Metrics after deployments** - Fetch prometheus metrics after the deployment/undeployment cycle
65 Save the new counter values such as deploy/undeploy-success/failure counters at API and engine level, and check that the deploySuccess and undeploySuccess counters are increased by 2.
68 To avoid putting a large Constant Timer value after every deployment/undeployment, the status API is polled until the deployment/undeployment
69 is successfully completed, or until a timeout. This is to make sure that the operation is completed successfully and the PDPs gets enough time to respond back.
70 Otherwise, before the deployment is marked successful by PAP, an undeployment could be triggered as part of other tests,
71 and the operation's corresponding prometheus counter at engine level will not get updated.
73 Teardown Phase (steps running only once after PAP Test Flow is completed)
74 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
76 - **Change state to PASSIVE(sampleGroup)** - changes the state of sampleGroup PdpGroup to PASSIVE
77 - **Delete PdpGroup sampleGroup** - delete the sampleGroup PdpGroup using pap api
78 - **Change State to PASSIVE(defaultGroup)** - changes the state of defaultGroup PdpGroup to PASSIVE
79 - **Delete policy created for defaultGroup** - deletes the operational policy defaultDomain using policy/api component
80 - **Delete Policy created for sampleGroup** - deletes the operational policy sampleDomain using policy/api component
81 - **Delete Nodetemplate metadata for sampleGroup policy** - deleted the nodetemplate containing metadata for sampleGroup policy
83 The following steps can be used to configure the parameters of test plan.
85 - **HTTP Authorization Manager** - used to store user/password authentication details.
86 - **HTTP Header Manager** - used to store headers which will be used for making HTTP requests.
87 - **User Defined Variables** - used to store following user defined parameters.
89 =========== ===================================================================
90 **Name** **Description**
91 =========== ===================================================================
92 PAP_HOST IP Address or host name of PAP component
93 PAP_PORT Port number of PAP for making REST API calls
94 API_HOST IP Address or host name of API component
95 API_PORT Port number of API for making REST API calls
96 =========== ===================================================================
98 The test was run in the background via "nohup", to prevent it from being interrupted:
102 nohup ./apache-jmeter-5.4.1/bin/jmeter.sh -n -t stability.jmx -l stabilityTestResults.jtl
109 Stability test plan was triggered for 72 hours. There were no failures during the 72 hours test.
114 ======================= ================= ================== ==================================
115 **Total # of requests** **Success %** **Error %** **Average time taken per request**
116 ======================= ================= ================== ==================================
117 140980 100 % 0.00 % 717 ms
118 ======================= ================= ================== ==================================
122 There were no failures during the 72 hours test.
124 **JMeter Screenshot**
126 .. image:: pap-s3p-results/pap_stability_jmeter_results.jpg
128 **Memory and CPU usage**
130 The memory and CPU usage can be monitored by running "top" command in the PAP pod.
131 A snapshot is taken before and after test execution to monitor the changes in resource utilization.
132 Prometheus metrics is also collected before and after the test execution.
134 Memory and CPU usage before test execution:
136 .. image:: pap-s3p-results/pap_top_before_72h.jpg
138 :download:`Prometheus metrics before 72h test <pap-s3p-results/pap_metrics_before_72h.txt>`
140 Memory and CPU usage after test execution:
142 .. image:: pap-s3p-results/pap_top_after_72h.jpg
144 :download:`Prometheus metrics after 72h test <pap-s3p-results/pap_metrics_after_72h.txt>`
146 Performance Test of PAP
147 ++++++++++++++++++++++++
152 Performance test of PAP 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.
157 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 PAP component and collecting the statistics.
163 Performance test plan is the same as the stability test plan above except for the few differences listed below.
165 - Increase the number of threads up to 10 (simulating 10 users' behaviours at the same time).
166 - Reduce the test time to 2 hours.
167 - Usage of counters (simulating each user) to create different pdpGroups, update their state and later delete them.
168 - Removed the tests to deploy policies to newly created groups as this will need a larger setup with multiple pdps registered to each group, which will also slow down the performance test with the time needed for registration process etc.
169 - Usage of counters (simulating each user) to create different drools policies and deploy them to defaultGroup.
170 In the test, a thread count of 10 is used resulting in 10 different drools policies getting deployed and undeployed continuously for 2 hours.
171 Other standard operations like checking the deployment status of policies, checking the metrics, health etc remains.
176 Running/Triggering the performance test will be the same as the stability test. That is, launch JMeter pointing to corresponding *.jmx* test plan. The *API_HOST* , *API_PORT* , *PAP_HOST* , *PAP_PORT* are already set up in *.jmx*.
180 nohup ./apache-jmeter-5.4.1/bin/jmeter.sh -n -t performance.jmx -l performanceTestResults.jtl
185 Test results are shown as below.
189 ======================= ================= ================== ==================================
190 **Total # of requests** **Success %** **Error %** **Average time taken per request**
191 ======================= ================= ================== ==================================
192 24276 100 % 0.00 % 2556 ms
193 ======================= ================= ================== ==================================
195 **JMeter Screenshot**
197 .. image:: pap-s3p-results/pap_performance_jmeter_results.jpg