1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
10 Policy APEX PDP component
11 ~~~~~~~~~~~~~~~~~~~~~~~~~
13 Both the Stability and the Performance tests were executed in a full Policy Framework deployment in a VM.
18 Deploying ONAP using OOM
19 ------------------------
21 APEX-PDP along with all policy components are deployed as part of a full Policy Framework deployment.
22 At a minimum, the following components are needed: policy, mariadb-galera, prometheus and dmaap.
24 The S3P tests utilise the ./run-s3p-tests script in the apex component. This will setup the microk8s environment, deploy
25 policy and prometheus, expose the services so they can be reached by JMeter, install JMeter and run the tests based on
26 the arguments provided.
28 Set up policy-models-simulator
29 ------------------------------
31 Policy-models-simulator is deployed to use the DMaaP simulator during policy execution.
32 Simulator configurations used are available in apex-pdp repository:
33 testsuites/apex-pdp-stability/src/main/resources/simulatorConfig/
35 The published port 30904 is used in JMeter for the DMaaP simulator.
40 Two APEX policies are executed in the APEX-PDP engine, and are triggered by multiple threads during the tests.
41 Both tests were run via jMeter.
43 Stability test script is available in apex-pdp repository:
44 testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx
46 Performance test script is available in apex-pdp repository:
47 testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx
50 Policy executions are validated in a stricter fashion during the tests.
51 There are test cases where up to 80 events are expected on the DMaaP topic.
52 DMaaP simulator is used to keep it simple and avoid any message pickup timing related issues.
54 Stability Test of APEX-PDP
55 ++++++++++++++++++++++++++
60 The 72 hours stability test ran the following steps.
65 Policies are created and deployed to APEX-PDP during this phase. Only one thread is in action and this step is done only once.
67 - **Create Policy onap.policies.apex.Simplecontrolloop** - creates the first APEX policy using policy/api component.
68 This is a sample policy used for PNF testing.
69 - **Create Policy onap.policies.apex.Example** - creates the second APEX policy using policy/api component.
70 This is a sample policy used for VNF testing.
71 - **Deploy Policies** - Deploy both the policies created to APEX-PDP using policy/pap component
76 Once the policies are created and deployed to APEX-PDP by the setup thread, five threads execute the below tests for 72 hours.
78 - **Healthcheck** - checks the health status of APEX-PDP
79 - **Prometheus Metrics** - checks that APEX-PDP is exposing prometheus metrics
80 - **Test Simplecontrolloop policy success case** - Send a trigger event to *unauthenticated.DCAE_CL_OUTPUT* DMaaP topic.
81 If the policy execution is successful, 3 different notification events are sent to *APEX-CL-MGT* topic by each one of the 5 threads.
82 So, it is checked if 15 notification messages are received in total on *APEX-CL-MGT* topic with the relevant messages.
83 - **Test Simplecontrolloop policy failure case** - Send a trigger event with invalid pnfName to *unauthenticated.DCAE_CL_OUTPUT* DMaaP topic.
84 The policy execution is expected to fail due to AAI failure response. 2 notification events are expected on *APEX-CL-MGT* topic by a thread in this case.
85 It is checked if 10 notification messages are received in total on *APEX-CL-MGT* topic with the relevant messages.
86 - **Test Example policy success case** - Send a trigger event to *unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT* DMaaP topic.
87 If the policy execution is successful, 4 different notification events are sent to *APEX-CL-MGT* topic by each one of the 5 threads.
88 So, it is checked if 20 notification messages are received in total on *APEX-CL-MGT* topic with the relevant messages.
89 - **Test Example policy failure case** - Send a trigger event with invalid vnfName to *unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT* DMaaP topic.
90 The policy execution is expected to fail due to AAI failure response. 2 notification events are expected on *APEX-CL-MGT* topic by a thread in this case.
91 So, it is checked if 10 notification messages are received in total on *APEX-CL-MGT* topic with the relevant messages.
92 - **Clean up DMaaP notification topic** - DMaaP notification topic which is *APEX-CL-MGT* is cleaned up after each test to make sure that one failure doesn't lead to cascading errors.
98 Policies are undeployed from APEX-PDP and deleted during this phase.
99 Only one thread is in action and this step is done only once after the Main phase is complete.
101 - **Undeploy Policies** - Undeploy both the policies from APEX-PDP using policy/pap component
102 - **Delete Policy onap.policies.apex.Simplecontrolloop** - delete the first APEX policy using policy/api component.
103 - **Delete Policy onap.policies.apex.Example** - delete the second APEX policy also using policy/api component.
108 The following steps can be used to configure the parameters of test plan.
110 - **HTTP Authorization Manager** - used to store user/password authentication details.
111 - **HTTP Header Manager** - used to store headers which will be used for making HTTP requests.
112 - **User Defined Variables** - used to store following user defined parameters.
114 =================== ===============================================================================
115 **Name** **Description**
116 =================== ===============================================================================
117 HOSTNAME IP Address or host name to access the components
118 PAP_PORT Port number of PAP for making REST API calls such as deploy/undeploy of policy
119 API_PORT Port number of API for making REST API calls such as create/delete of policy
120 APEX_PORT Port number of APEX for making REST API calls such as healthcheck/metrics
121 SIM_HOST IP Address or hostname running policy-models-simulator
122 DMAAP_PORT Port number of DMaaP simulator for making REST API calls such as reading notification events
123 wait Wait time if required after a request (in milliseconds)
124 threads Number of threads to run test cases in parallel
125 threadsTimeOutInMs Synchronization timer for threads running in parallel (in milliseconds)
126 =================== ===============================================================================
131 The test was run in the background via "nohup", to prevent it from being interrupted.
138 Stability test plan was triggered for 72 hours. There were no failures during the 72 hours test.
143 ======================= ================= ================== ==================================
144 **Total # of requests** **Success %** **Error %** **Average time taken per request**
145 ======================= ================= ================== ==================================
146 112245 99.47 % 0.53 % 2.309 sec.
147 ======================= ================= ================== ==================================
149 **JMeter Screenshot**
151 .. image:: apex-s3p-results/apex_stability_results.png
154 These results show a huge dip in the number of requests compared to the previous release of Apex-PDP>
155 Further investigation and improvement is needed in the coming release.
157 Performance Test of APEX-PDP
158 ++++++++++++++++++++++++++++
163 Performance test of APEX-PDP is done similar to the stability test, but in a more extreme manner using higher thread count.
168 The performance test is performed on a similar setup as Stability test.
174 Performance test plan is the same as the stability test plan above except for the few differences listed below.
176 - Increase the number of threads used in the Main Phase from 5 to 20.
177 - Reduce the test time to 2 hours.
182 The test was run in the background via "nohup", to prevent it from being interrupted.
187 Test results are shown as below.
191 ======================= ================= ================== ==================================
192 **Total # of requests** **Success %** **Error %** **Average time taken per request**
193 ======================= ================= ================== ==================================
194 12486 99.32 % 0.68 % 576.64 ms
195 ======================= ================= ================== ==================================
197 **JMeter Screenshot**
199 .. image:: apex-s3p-results/apex_performance_results.png
202 These results show a huge dip in the number of requests compared to the previous release of Apex-PDP>
203 Further investigation and improvement is needed in the coming release.
208 Multiple policies were executed in a multi-threaded fashion for both stability and performance tests.
209 Both tests showed a dip in performance and stability.