Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 1 | .. This work is licensed under a |
| 2 | .. Creative Commons Attribution 4.0 International License. |
| 3 | .. http://creativecommons.org/licenses/by/4.0 |
| 4 | |
| 5 | .. _pap-s3p-label: |
| 6 | |
| 7 | .. toctree:: |
| 8 | :maxdepth: 2 |
| 9 | |
| 10 | Policy PAP component |
| 11 | ~~~~~~~~~~~~~~~~~~~~ |
| 12 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 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. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 15 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 16 | Setup Details |
| 17 | +++++++++++++ |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 18 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 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, which was installed on a separate VM. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 22 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 23 | Stability Test of PAP |
| 24 | +++++++++++++++++++++ |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 25 | |
| 26 | Test Plan |
| 27 | --------- |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 28 | The 72 hours stability test ran the following steps sequentially in a single threaded loop. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 29 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 30 | - **Create Policy defaultDomain** - creates an operational policy using policy/api component |
| 31 | - **Create Policy sampleDomain** - creates an operational policy using policy/api component |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 32 | - **Check Health** - checks the health status of pap |
| 33 | - **Check Statistics** - checks the statistics of pap |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 34 | - **Change state to ACTIVE** - changes the state of defaultGroup PdpGroup to ACTIVE |
| 35 | - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that PdpGroup is in the ACTIVE state. |
| 36 | - **Deploy defaultDomain Policy** - deploys the policy defaultDomain in the existing PdpGroup |
waynedunican | 4c791c8 | 2021-03-30 09:16:46 +0100 | [diff] [blame] | 37 | - **Check status of defaultGroup** - checks the status of defaultGroup PdpGroup with the defaultDomain policy 1.0.0. |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 38 | - **Check PdpGroup Audit defaultGroup** - checks the audit information for the defaultGroup PdpGroup. |
| 39 | - **Check PdpGroup Audit Policy (defaultGroup)** - checks the audit information for the defaultGroup PdpGroup with the defaultDomain policy 1.0.0. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 40 | - **Create/Update PDP Group** - creates a new PDPGroup named sampleGroup. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 41 | - **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. |
| 42 | - **Deployment Update sampleDomain** - deploys the policy sampleDomain in sampleGroup PdpGroup using pap api |
waynedunican | 4c791c8 | 2021-03-30 09:16:46 +0100 | [diff] [blame] | 43 | - **Check status of sampleGroup** - checks the status of the sampleGroup PdpGroup. |
| 44 | - **Check status of PdpGroups** - checks the status of both PdpGroups. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 45 | - **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. |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 46 | - **Check Audit** - checks the audit information for all PdpGroups. |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 47 | - **Check Consolidated Health** - checks the consolidated health status of all policy components. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 48 | - **Check Deployed Policies** - checks for all the deployed policies using pap api. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 49 | - **Undeploy Policy sampleDomain** - undeploys the policy sampleDomain from sampleGroup PdpGroup using pap api |
| 50 | - **Undeploy Default Policy** - undeploys the policy defaultDomain from PdpGroup |
| 51 | - **Change state to PASSIVE(sampleGroup)** - changes the state of sampleGroup PdpGroup to PASSIVE |
| 52 | - **Delete PdpGroup SampleGroup** - delete the sampleGroup PdpGroup using pap api |
| 53 | - **Change State to PASSIVE(defaultGroup)** - changes the state of defaultGroup PdpGroup to PASSIVE |
| 54 | - **Check PdpGroup Query** - makes a PdpGroup query request and verifies that PdpGroup is in the PASSIVE state. |
| 55 | - **Delete Policy defaultDomain** - deletes the operational policy defaultDomain using policy/api component |
| 56 | - **Delete Policy sampleDomain** - deletes the operational policy sampleDomain using policy/api component |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 57 | |
| 58 | The following steps can be used to configure the parameters of test plan. |
| 59 | |
| 60 | - **HTTP Authorization Manager** - used to store user/password authentication details. |
| 61 | - **HTTP Header Manager** - used to store headers which will be used for making HTTP requests. |
| 62 | - **User Defined Variables** - used to store following user defined parameters. |
| 63 | |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 64 | =========== =================================================================== |
| 65 | **Name** **Description** |
| 66 | =========== =================================================================== |
| 67 | PAP_HOST IP Address or host name of PAP component |
| 68 | PAP_PORT Port number of PAP for making REST API calls |
| 69 | API_HOST IP Address or host name of API component |
| 70 | API_PORT Port number of API for making REST API calls |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 71 | =========== =================================================================== |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 72 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 73 | The test was run in the background via "nohup", to prevent it from being interrupted: |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 74 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 75 | .. code-block:: bash |
| 76 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 77 | nohup ./jMeter/apache-jmeter-5.3/bin/jmeter.sh -n -t stability.jmx -l testresults.jtl |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 78 | |
| 79 | Test Results |
| 80 | ------------ |
| 81 | |
| 82 | **Summary** |
| 83 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 84 | Stability test plan was triggered for 72 hours. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 85 | |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 86 | .. Note:: |
| 87 | |
| 88 | .. container:: paragraph |
| 89 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 90 | As part of the OOM deployment, another APEX-PDP pod is spun up with the pdpGroup name specified as 'sampleGroup'. |
| 91 | After creating the new group called 'sampleGroup' as part of the test, a time delay of 2 minutes is added, |
| 92 | so that the pdp is registered to the newly created group. |
| 93 | This has resulted in a spike in the Average time taken per request. But, this is required to make proper assertions, |
| 94 | and also for the consolidated health check. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 95 | |
| 96 | **Test Statistics** |
| 97 | |
| 98 | ======================= ================= ================== ================================== |
| 99 | **Total # of requests** **Success %** **Error %** **Average time taken per request** |
| 100 | ======================= ================= ================== ================================== |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 101 | 34053 99.14 % 0.86 % 1051 ms |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 102 | ======================= ================= ================== ================================== |
| 103 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 104 | .. Note:: |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 105 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 106 | .. container:: paragraph |
| 107 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 108 | There were some failures during the 72 hour stability tests. These tests were caused by the apex-pdp pods restarting |
| 109 | intermitently due to limited resources in our testing environment. The second apex instance was configured as a |
| 110 | replica of the apex-pdp pod and therefore, when it restarted, registered to the "defaultGroup" as the configuration |
| 111 | was taken from the original apex-pdp pod. This meant a manual change whenever the pods restarted to make apex-pdp-"2" |
| 112 | register with the "sampleGroup". |
| 113 | When both pods were running as expected, no errors relating to the pap functionality were observed. These errors are |
| 114 | strictly caused by the environment setup and not by pap. |
aditya.puthuparambil | 4bccfbc | 2020-05-06 11:18:25 +0100 | [diff] [blame] | 115 | |
| 116 | **JMeter Screenshot** |
| 117 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 118 | .. image:: images/pap-s3p-stability-result-jmeter.png |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 119 | |
| 120 | **Memory and CPU usage** |
| 121 | |
| 122 | The memory and CPU usage can be monitored by running "top" command on the PAP pod. A snapshot is taken before and after test execution to monitor the changes in resource utilization. |
| 123 | |
| 124 | Memory and CPU usage before test execution: |
| 125 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 126 | .. image:: images/pap-s3p-mem-bt.png |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 127 | |
| 128 | Memory and CPU usage after test execution: |
| 129 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 130 | .. image:: images/pap-s3p-mem-at.png |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 131 | |
aditya.puthuparambil | 4750e51 | 2020-05-13 11:51:04 +0100 | [diff] [blame] | 132 | |
| 133 | Performance Test of PAP |
| 134 | ++++++++++++++++++++++++ |
| 135 | |
| 136 | Introduction |
| 137 | ------------ |
| 138 | |
| 139 | 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. |
| 140 | |
| 141 | Setup Details |
| 142 | ------------- |
| 143 | |
| 144 | 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. |
| 145 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 146 | |
aditya.puthuparambil | 4750e51 | 2020-05-13 11:51:04 +0100 | [diff] [blame] | 147 | Test Plan |
| 148 | --------- |
| 149 | |
| 150 | Performance test plan is the same as the stability test plan above except for the few differences listed below. |
| 151 | |
| 152 | - Increase the number of threads up to 5 (simulating 5 users' behaviours at the same time). |
| 153 | - Reduce the test time to 2 hours. |
| 154 | - Usage of counters to create different groups by the 'Create/Update PDP Group' test case. |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 155 | - Removed the delay to wait for the new PDP to be registered. Also removed the corresponding assertions where the Pdp instance registration to the newly created group is validated. |
aditya.puthuparambil | 4750e51 | 2020-05-13 11:51:04 +0100 | [diff] [blame] | 156 | |
| 157 | Run Test |
| 158 | -------- |
| 159 | |
| 160 | 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*. |
| 161 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 162 | .. code-block:: bash |
| 163 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 164 | nohup ./jMeter/apache-jmeter-5.3/bin/jmeter.sh -n -t performance.jmx -l perftestresults.jtl |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 165 | |
aditya.puthuparambil | 4750e51 | 2020-05-13 11:51:04 +0100 | [diff] [blame] | 166 | Once the test execution is completed, execute the below script to get the statistics: |
| 167 | |
| 168 | .. code-block:: bash |
| 169 | |
| 170 | $ cd /home/ubuntu/pap/testsuites/performance/src/main/resources/testplans |
| 171 | $ ./results.sh /home/ubuntu/pap_perf/resultTree.log |
| 172 | |
| 173 | Test Results |
| 174 | ------------ |
| 175 | |
a.sreekumar | 43ec4a4 | 2020-10-22 11:24:58 +0100 | [diff] [blame] | 176 | Test results are shown as below. |
aditya.puthuparambil | 4750e51 | 2020-05-13 11:51:04 +0100 | [diff] [blame] | 177 | |
| 178 | **Test Statistics** |
| 179 | |
waynedunican | 4c791c8 | 2021-03-30 09:16:46 +0100 | [diff] [blame] | 180 | ======================= ================= ================== ================================== |
| 181 | **Total # of requests** **Success %** **Error %** **Average time taken per request** |
| 182 | ======================= ================= ================== ================================== |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 183 | 24092 100 % 0.00 % 2467 ms |
waynedunican | 4c791c8 | 2021-03-30 09:16:46 +0100 | [diff] [blame] | 184 | ======================= ================= ================== ================================== |
aditya.puthuparambil | 4750e51 | 2020-05-13 11:51:04 +0100 | [diff] [blame] | 185 | |
| 186 | **JMeter Screenshot** |
| 187 | |
waynedunican | e4e7f62 | 2021-10-15 15:09:35 +0100 | [diff] [blame] | 188 | .. image:: images/pap-s3p-performance-result-jmeter.png |