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 | .. _api-s3p-label: |
| 6 | |
| 7 | .. toctree:: |
| 8 | :maxdepth: 2 |
| 9 | |
| 10 | Policy API S3P Tests |
| 11 | #################### |
| 12 | |
| 13 | |
| 14 | 72 Hours Stability Test of Policy API |
| 15 | +++++++++++++++++++++++++++++++++++++ |
| 16 | |
| 17 | Introduction |
| 18 | ------------ |
| 19 | |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 20 | The 72 hour stability test of policy API has the goal of verifying the stability of running policy design API REST |
| 21 | service by ingesting a steady flow of transactions in a multi-threaded fashion to |
| 22 | simulate multiple clients' behaviors. |
| 23 | All the transaction flows are initiated from a test client server running JMeter for the duration of 72 hours. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 24 | |
| 25 | Setup Details |
| 26 | ------------- |
| 27 | |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 28 | The stability test was performed on a default ONAP OOM installation in the Intel Wind River Lab environment. |
| 29 | JMeter was installed on a separate VM to inject the traffic defined in the |
| 30 | `API stability script |
| 31 | <https://git.onap.org/policy/api/tree/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx>`_ |
| 32 | with the following command: |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 33 | |
| 34 | .. code-block:: bash |
Chris Ramstad | 6fca679 | 2020-05-19 12:35:57 -0700 | [diff] [blame] | 35 | |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 36 | jmeter.sh --nongui --testfile policy_api_stability.jmx --logfile result.jtl |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 37 | |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 38 | |
Chris Ramstad | 6fca679 | 2020-05-19 12:35:57 -0700 | [diff] [blame] | 39 | Test Plan |
| 40 | --------- |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 41 | |
Chris Ramstad | 6fca679 | 2020-05-19 12:35:57 -0700 | [diff] [blame] | 42 | The 72+ hours stability test will be running the following steps sequentially |
| 43 | in multi-threaded loops. Thread number is set to 5 to simulate 5 API clients' |
| 44 | behaviors (they can be calling the same policy CRUD API simultaneously). |
| 45 | Each thread creates a different version of the policy types and policies to not |
| 46 | interfere with one another while operating simultaneously. The point version |
| 47 | of each entity is set to the running thread number. |
| 48 | |
| 49 | **Setup Thread (will be running only once)** |
| 50 | |
| 51 | - Get policy-api Healthcheck |
| 52 | - Get API Counter Statistics |
| 53 | - Get Preloaded Policy Types |
| 54 | |
| 55 | **API Test Flow (5 threads running the same steps in the same loop)** |
| 56 | |
| 57 | - Create a new Monitoring Policy Type with Version 6.0.# |
| 58 | - Create a new Monitoring Policy Type with Version 7.0.# |
| 59 | - Create a new Optimization Policy Type with Version 6.0.# |
| 60 | - Create a new Guard Policy Type with Version 6.0.# |
| 61 | - Create a new Native APEX Policy Type with Version 6.0.# |
| 62 | - Create a new Native Drools Policy Type with Version 6.0.# |
| 63 | - Create a new Native XACML Policy Type with Version 6.0.# |
| 64 | - Get All Policy Types |
| 65 | - Get All Versions of the new Monitoring Policy Type |
| 66 | - Get Version 6.0.# of the new Monitoring Policy Type |
| 67 | - Get Version 6.0.# of the new Optimzation Policy Type |
| 68 | - Get Version 6.0.# of the new Guard Policy Type |
| 69 | - Get Version 6.0.# of the new Native APEX Policy Type |
| 70 | - Get Version 6.0.# of the new Native Drools Policy Type |
| 71 | - Get Version 6.0.# of the new Native XACML Policy Type |
| 72 | - Get the Latest Version of the New Monitoring Policy Type |
| 73 | - Create Monitoring Policy Ver 6.0.# w/Monitoring Policy Type Ver 6.0.# |
| 74 | - Create Monitoring Policy Ver 7.0.# w/Monitoring Policy Type Ver 7.0.# |
| 75 | - Create Optimization Policy Ver 6.0.# w/Optimization Policy Type Ver 6.0.# |
| 76 | - Create Guard Policy Ver 6.0.# w/Guard Policy Type Ver 6.0.# |
| 77 | - Create Native APEX Policy Ver 6.0.# w/Native APEX Policy Type Ver 6.0.# |
| 78 | - Create Native Drools Policy Ver 6.0.# w/Native Drools Policy Type Ver 6.0.# |
| 79 | - Create Native XACML Policy Ver 6.0.# w/Native XACML Policy Type Ver 6.0.# |
| 80 | - Get Version 6.0.# of the new Monitoring Policy |
| 81 | - Get Version 6.0.# of the new Optimzation Policy |
| 82 | - Get Version 6.0.# of the new Guard Policy |
| 83 | - Get Version 6.0.# of the new Native APEX Policy |
| 84 | - Get Version 6.0.# of the new Native Drools Policy |
| 85 | - Get Version 6.0.# of the new Native XACML Policy |
| 86 | - Get the Latest Version of the new Monitoring Policy |
| 87 | - Delete Version 6.0.# of the new Monitoring Policy |
| 88 | - Delete Version 7.0.# of the new Monitoring Policy |
| 89 | - Delete Version 6.0.# of the new Optimzation Policy |
| 90 | - Delete Version 6.0.# of the new Guard Policy |
| 91 | - Delete Version 6.0.# of the new Native APEX Policy |
| 92 | - Delete Version 6.0.# of the new Native Drools Policy |
| 93 | - Delete Version 6.0.# of the new Native XACML Policy |
| 94 | - Delete Monitoring Policy Type with Version 6.0.# |
| 95 | - Delete Monitoring Policy Type with Version 7.0.# |
| 96 | - Delete Optimization Policy Type with Version 6.0.# |
| 97 | - Delete Guard Policy Type with Version 6.0.# |
| 98 | - Delete Native APEX Policy Type with Version 6.0.# |
| 99 | - Delete Native Drools Policy Type with Version 6.0.# |
| 100 | - Delete Native XACML Policy Type with Version 6.0.# |
| 101 | |
| 102 | **TearDown Thread (will only be running after API Test Flow is completed)** |
| 103 | |
| 104 | - Get policy-api Healthcheck |
| 105 | - Get Preloaded Policy Types |
| 106 | |
| 107 | |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 108 | Test Results |
| 109 | ------------ |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 110 | |
| 111 | **Summary** |
| 112 | |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 113 | No errors were found during the 72 hours of the Policy API stability run. |
| 114 | The load was performed against a non-tweaked ONAP OOM installation. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 115 | |
| 116 | **Test Statistics** |
| 117 | |
| 118 | ======================= ============= =========== =============================== =============================== =============================== |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 119 | **Total # of requests** **Success %** **TPS** **Avg. time taken per request** **Min. time taken per request** **Max. time taken per request** |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 120 | ======================= ============= =========== =============================== =============================== =============================== |
lapentafd | 76d34fa | 2021-03-29 11:29:00 +0100 | [diff] [blame] | 121 | 627746 100% 2.42 2058 ms 26 ms 72809 ms |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 122 | ======================= ============= =========== =============================== =============================== =============================== |
| 123 | |
lapentafd | 76d34fa | 2021-03-29 11:29:00 +0100 | [diff] [blame] | 124 | .. image:: images/api-s3p-jm-1_H.png |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 125 | |
| 126 | **JMeter Results** |
| 127 | |
jhh | ab948fc | 2020-10-23 17:30:34 -0500 | [diff] [blame] | 128 | The following graphs show the response time distributions. The "Get Policy Types" API calls are the most expensive calls that |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 129 | average a 10 seconds plus response time. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 130 | |
lapentafd | 76d34fa | 2021-03-29 11:29:00 +0100 | [diff] [blame] | 131 | .. image:: images/api-response-time-distribution_H.png |
| 132 | .. image:: images/api-response-time-overtime_H.png |
Chris Ramstad | 6fca679 | 2020-05-19 12:35:57 -0700 | [diff] [blame] | 133 | |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 134 | |
| 135 | Performance Test of Policy API |
| 136 | ++++++++++++++++++++++++++++++ |
| 137 | |
lapentafd | 76d34fa | 2021-03-29 11:29:00 +0100 | [diff] [blame] | 138 | A specific performance test was omitted in Honululu (as in Guilin). The JMeter script used in the stability run injected |
jhh | a4ff7b8 | 2020-10-23 09:15:35 -0500 | [diff] [blame] | 139 | back to back traffic with 5 parallel threads with no pauses between requests. Since the JMeter threads operate |
| 140 | in synchronous mode (waiting for a request's response before sending the next request), JMeter injection rates autoregulate |
| 141 | because of the backpressure imposed by the response times. Even though the response times are high, the |
| 142 | "Response over Time" graph above indicates that they remain constant at large, throughout the duration of the test. |
| 143 | This together with the absence of notorious spikes in the kubernetes node CPU utilization suggests that the API |
| 144 | component is not strained. A more enlightning set of tests, would plot jmeter threads (increasing load) |
| 145 | against response times. These tests have not been performed in this release. |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 146 | |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 147 | |
Pamela Dragosh | ba45dc6 | 2020-04-16 09:27:44 -0400 | [diff] [blame] | 148 | |