Add s3p docs for xacml and drools
[policy/parent.git] / docs / development / devtools / xacml-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 .. _xacml-s3p-label:
6
7 .. toctree::
8    :maxdepth: 2
9
10 ##########################
11
12 Performance Test of Policy XACML PDP (Jakarta)
13 **********************************************
14
15 The Performance test was executed by performing requests
16 against the Policy RESTful APIs.
17
18 A default ONAP installation in the Policy tenant in UNH was used to run the tests.
19
20 The Agent VMs in this lab have the following configuration:
21
22 - 16GB RAM
23 - 8 VCPU
24
25 Summary
26 =======
27
28 The Performance test was executed, and the result analysed, via:
29
30 .. code-block:: bash
31
32     jmeter -Jduration=1200 -Jusers=10 \
33         -Jxacml_ip=$ip -Jpap_ip=$ip -Japi_ip=$ip \
34         -Jxacml_port=30111 -Jpap_port=30197 -Japi_port=30664 \
35         -n -t perf.jmx -l testresults.jtl
36
37 Note: the ports listed above correspond to port 6969 of the respective components.
38
39 The performance tests runs the following, all in parallel:
40
41 - Healthcheck, 10 simultaneous threads
42 - Statistics, 10 simultaneous threads
43 - Decisions, 10 simultaneous threads, each running the following in sequence:
44
45    - Monitoring Decision
46    - Monitoring Decision, abbreviated
47    - Naming Decision
48    - Optimization Decision
49    - Default Guard Decision (always "Permit")
50    - Frequency Limiter Guard Decision
51    - Min/Max Guard Decision
52
53 When the script starts up, it uses policy-api to create, and policy-pap to deploy,
54 the policies that are needed by the test.  It assumes that the "naming" policy has
55 already been created and deployed.  Once the test completes, it undeploys and deletes
56 the policies that it previously created.
57
58 Results
59 =======
60
61 The test was run for 20 minutes with 10 users (i.e., threads), with the following results:
62
63 .. csv-table::
64    :header: "Number of Users", "Throughput (requests/second)", "Average Latency (ms)"
65
66    10, 4603, 2
67
68 .. image:: images/s3p-perf-xacml.png
69
70
71 Stability Test of Policy XACML PDP
72 **********************************
73
74 This test was run using jmeter on a default
75 ONAP installation in the Policy tenant in UNH.
76
77 The Agent VMs in this lab have the following configuration:
78
79 - 16GB RAM
80 - 8 VCPU
81
82 Summary
83 =======
84
85 The stability test was performed on a default ONAP OOM installation in the Policy tenant of the UNH lab.
86 JMeter injected the traffic defined in the
87 `XACML PDP stability script
88 <https://git.onap.org/policy/xacml-pdp/tree/testsuites/stability/src/main/resources/testplans/stability.jmx>`_
89 with the following command:
90
91 .. code-block:: bash
92
93     jmeter.sh -Jduration=259200 -Jusers=2 -Jxacml_ip=$ip -Jpap_ip=$ip -Japi_ip=$ip \
94         -Jxacml_port=30111 -Jpap_port=30197 -Japi_port=30664 --nongui --testfile stability.jmx
95
96 Note: the ports listed above correspond to port 6969 of the respective components.
97
98 The default log level of the root and org.eclipse.jetty.server.RequestLog loggers in the logback.xml
99 of the XACML PDP
100 (om/kubernetes/policy/components/policy-xacml-pdp/resources/config/logback.xml)
101 was set to WARN since the OOM installation did have log rotation enabled of the
102 container logs in the kubernetes worker nodes.
103
104 The stability test, stability.jmx, runs the following, all in parallel:
105
106 - Healthcheck, 2 simultaneous threads
107 - Statistics, 2 simultaneous threads
108 - Decisions, 2 simultaneous threads, each running the following tasks in sequence:
109    - Monitoring Decision
110    - Monitoring Decision, abbreviated
111    - Naming Decision
112    - Optimization Decision
113    - Default Guard Decision (always "Permit")
114    - Frequency Limiter Guard Decision
115    - Min/Max Guard Decision
116
117 When the script starts up, it uses policy-api to create, and policy-pap to deploy
118 the policies that are needed by the test.  It assumes that the "naming" policy has
119 already been created and deployed.  Once the test completes, it undeploys and deletes
120 the policies that it previously created.
121
122 Results
123 =======
124
125 The stability summary results were reported by JMeter with the following summary line:
126
127 .. code-block:: bash
128
129     summary = 941639699 in 71:59:36 = 3633.2/s Avg:     1 Min:     0 Max:   842 Err:     0 (0.00%)
130
131 The XACML PDP offered very good performance with JMeter for the traffic mix described above.
132 The average transaction time is insignificant.  The maximum transaction time of 842 ms.
133 There was a Drools stability test running in parallel, hence the actual load was higher.
134