303a6bebd6815c16620a02083b201c8133faf245
[policy/parent.git] / docs / development / devtools / drools-s3p.rst
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 .. _drools-s3p-label:
6
7 .. toctree::
8    :maxdepth: 2
9
10 Policy Drools PDP component
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
12
13 Both the Performance and the Stability tests were executed against a default ONAP installation in the policy-k8s tenant in the windriver lab, from an independent VM running the jmeter tool to inject the load.
14
15 General Setup
16 *************
17
18 The kubernetes installation allocated all policy components in the same worker node VM and some additional ones.
19 The worker VM hosting the policy components has the following spec:
20
21 - 16GB RAM
22 - 8 VCPU
23 - 160GB Ephemeral Disk
24
25 The standalone VM designated to run jmeter has the same configuration.  The jmeter JVM
26 was instantiated with a max heap configuration of 12G.
27
28 The drools-pdp container uses the default JVM memory settings from a default OOM installation:
29
30 .. code-block:: bash
31
32     VM settings:
33         Max. Heap Size (Estimated): 989.88M
34         Using VM: OpenJDK 64-Bit Server VM
35
36
37 Other ONAP components used during the stability tests are:
38
39 - Policy XACML PDP to process guard queries for each transaction.
40 - DMaaP to carry PDP-D and jmeter initiated traffic to complete transactions.
41 - Policy API to create (and delete at the end of the tests) policies for each
42   scenario under test.
43 - Policy PAP to deploy (and undeploy at the end of the tests) policies for each scenario under test.
44
45 The following components are simulated during the tests.
46
47 - SO actor for the vDNS use case.
48 - APPC responses for the vCPE and vFW use cases.
49 - AAI to answer queries for the use cases under test.
50
51 In order to avoid interferences with the APPC component while running the tests,
52 the APPC component was disabled.
53
54 SO, and AAI actors were simulated within the PDP-D JVM by enabling the
55 feature-controlloop-utils before running the tests.
56
57 PDP-D Setup
58 ***********
59
60 The kubernetes charts were modified previous to the installation with
61 the changes below.
62
63 The feature-controlloop-utils was started by adding the following script:
64
65 .. code-block:: bash
66
67     oom/kubernetes/policy/charts/drools/resources/configmaps/features.pre.sh:
68
69     #!/bin/sh
70     sh -c "features enable controlloop-utils"
71
72 Stability Test of Policy PDP-D
73 ******************************
74
75 PDP-D performance
76 =================
77
78 The test set focused on the following use cases:
79
80 - vCPE
81 - vDNS
82 - vFirewall
83
84 For 72 hours the following 5 scenarios ran in parallel:
85
86 - vCPE success scenario
87 - vCPE failure scenario (failure returned by simulated APPC recipient through DMaaP).
88 - vDNS success scenario.
89 - vDNS failure scenario.
90 - vFirewall success scenario.
91
92 Five threads ran in parallel, one for each scenario.   The transactions were initiated
93 by each jmeter thread group.   Each thread initiated a transaction, monitored the transaction, and
94 as soon as the transaction ending was detected, it initiated the next one, so back to back with no
95 pauses.
96
97 All transactions completed successfully as it was expected in each scenario, with no failures.
98
99 The command executed was
100
101 .. code-block:: bash
102
103     ./jmeter -n -t /home/ubuntu/drools-applications/testsuites/stability/src/main/resources/s3p.jmx  -l /home/ubuntu/jmeter_result/jmeter.jtl -e -o /home/ubuntu/jmeter_result > /dev/null 2>&1
104
105 The results were computed by monitoring the statistics REST endpoint accessible through the telemetry shell or APIs.
106
107
108 vCPE Success scenario
109 =====================
110
111 ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e:
112
113 .. code-block:: bash
114
115     # Times are in milliseconds
116
117     # Previous to the run, there was 1 failure as a consequence of testing
118     # the flows before the stability load was initiated.   There was
119     # an additional failure encountered during the execution.
120
121     "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e": {
122         "policyExecutedCount": 161328,
123         "policyExecutedSuccessCount": 161326,
124         "totalElapsedTime": 44932780,
125         "averageExecutionTime": 278.5181741545175,
126         "birthTime": 1616092087842,
127         "lastStart": 1616356511841,
128         "lastExecutionTime": 1616356541972,
129         "policyExecutedFailCount": 2
130     }
131
132
133 vCPE Failure scenario
134 =====================
135
136 ControlLoop-vCPE-Fail:
137
138 .. code-block:: bash
139
140     # Times are in milliseconds
141
142     "ControlLoop-vCPE-Fail": {
143         "policyExecutedCount": 250172,
144         "policyExecutedSuccessCount": 0,
145         "totalElapsedTime": 63258856,
146         "averageExecutionTime": 252.8614553187407,
147         "birthTime": 1616092143137,
148         "lastStart": 1616440688824,
149         "lastExecutionTime": 1616440689010,
150         "policyExecutedFailCount": 250172
151     }
152
153 vDNS Success scenario
154 =====================
155
156 ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3:
157
158 .. code-block:: bash
159
160     # Times are in milliseconds
161
162     "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3": {
163         "policyExecutedCount": 235438,
164         "policyExecutedSuccessCount": 235438,
165         "totalElapsedTime": 37564263,
166         "averageExecutionTime": 159.550552587093,
167         "birthTime": 1616092578063,
168         "lastStart": 1616356511253,
169         "lastExecutionTime": 1616356511653,
170         "policyExecutedFailCount": 0
171     }
172
173 vDNS Failure scenario
174 =====================
175
176 ControlLoop-vDNS-Fail:
177
178 .. code-block:: bash
179
180     # Times are in milliseconds
181
182     "ControlLoop-vDNS-Fail": {
183         "policyExecutedCount": 2754574,
184         "policyExecutedSuccessCount": 0,
185         "totalElapsedTime": 14396495,
186         "averageExecutionTime": 5.22639616869977,
187         "birthTime": 1616092659237,
188         "lastStart": 1616440696444,
189         "lastExecutionTime": 1616440696444,
190         "policyExecutedFailCount": 2754574
191     }
192
193
194 vFirewall Success scenario
195 ==========================
196
197 ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a:
198
199 .. code-block:: bash
200
201     # Times are in milliseconds
202
203     # Previous to the run, there were 2 failures as a consequence of testing
204     # the flows before the stability load was initiated.   There was
205     # an additional failure encountered during the execution.
206
207     "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a": {
208         "policyExecutedCount": 145197,
209         "policyExecutedSuccessCount": 145194,
210         "totalElapsedTime": 33100249,
211         "averageExecutionTime": 227.96785746261975,
212         "birthTime": 1616092985229,
213         "lastStart": 1616356511732,
214         "lastExecutionTime": 1616356541972,
215         "policyExecutedFailCount": 3
216     }