64a3cfe8d5536cf4cddb7121d885b4bdd1a5997d
[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
13 ************************************
14
15 The Performance test was executed by performing requests
16 against the Policy RESTful APIs residing on the XACML PDP installed on a Cloud based Virtual Machine.
17
18 VM Configuration:
19 - 16GB RAM
20 - 4 VCPU
21 - 40GB Disk
22
23 ONAP was deployed using a K8s Configuration on the same VM.
24 Running jmeter and ONAP OOM on the same VM may adversely impact the performance of the XACML-PDP being tested.
25
26 Summary
27 =======
28
29 The Performance test was executed, and the result analysed, via:
30
31 .. code-block:: bash
32
33     jmeter -Jduration=1200 -Jusers=10 \
34         -Jxacml_ip=$ip -Jpap_ip=$ip -Japi_ip=$ip \
35         -Jxacml_port=30111 -Jpap_port=30197 -Japi_port=30664 \
36         -n -t perf.jmx -l testresults.jtl
37
38 Note: the ports listed above correspond to port 6969 of the respective components.
39
40 The performance test, perf.jmx, runs the following, all in parallel:
41
42 - Healthcheck, 10 simultaneous threads
43 - Statistics, 10 simultaneous threads
44 - Decisions, 10 simultaneous threads, each running the following in sequence:
45
46    - Monitoring Decision
47    - Monitoring Decision, abbreviated
48    - Naming Decision
49    - Optimization Decision
50    - Default Guard Decision (always "Permit")
51    - Frequency Limiter Guard Decision
52    - Min/Max Guard Decision
53
54 When the script starts up, it uses policy-api to create, and policy-pap to deploy,
55 the policies that are needed by the test.  It assumes that the "naming" policy has
56 already been created and deployed.  Once the test completes, it undeploys and deletes
57 the policies that it previously created.
58
59 Results
60 =======
61
62 The test was run for 20 minutes at a time, for different numbers of users (i.e.,
63 threads), with the following results:
64
65 .. csv-table::
66    :header: "Number of Users", "Throughput (requests/second)", "Average Latency (ms)"
67
68    10, 309.919, 5.83457
69    20, 2527.73, 22.2634
70    40, 3184.78, 35.1173
71    80, 3677.35, 60.2893
72
73
74 Stability Test of Policy XACML PDP
75 ************************************
76
77 The stability test was executed by performing requests
78 against the Policy RESTful APIs residing on the XACML PDP installed in the citycloud
79 lab.  This was running on a kubernetes pod having the following configuration:
80
81 - 16GB RAM
82 - 4 VCPU
83 - 40GB Disk
84
85 The test was run via jmeter, which was installed on the same VM.
86 Running jmeter and ONAP OOM on the same VM may adversely impact the performance of the XACML-PDP being tested.
87 Due to the minimal nature of this setup, the K8S cluster became overloaded on a couple of occasions during the test.
88 This resulted in a small number of errors and a greater maximum transaction time than normal.
89
90 Summary
91 =======
92
93 The stability test was performed on a default ONAP OOM installation in the city Cloud Lab environment.
94 JMeter was installed on the same VM to inject the traffic defined in the
95 `XACML PDP stability script
96 <https://git.onap.org/policy/xacml-pdp/tree/testsuites/stability/src/main/resources/testplans/stability.jmx>`_
97 with the following command:
98
99 .. code-block:: bash
100
101     jmeter.sh -Jduration=259200 -Jusers=2 -Jxacml_ip=$ip -Jpap_ip=$ip -Japi_ip=$ip \
102         -Jxacml_port=30111 -Jpap_port=30197 -Japi_port=30664 --nongui --testfile stability.jmx
103
104 Note: the ports listed above correspond to port 6969 of the respective components.
105
106 The default log level of the root and org.eclipse.jetty.server.RequestLog loggers in the logback.xml
107 of the XACML PDP
108 (om/kubernetes/policy/components/policy-xacml-pdp/resources/config/logback.xml)
109 was set to WARN since the OOM installation did have log rotation enabled of the
110 container logs in the kubernetes worker nodes.
111
112 The stability test, stability.jmx, runs the following, all in parallel:
113
114 - Healthcheck, 2 simultaneous threads
115 - Statistics, 2 simultaneous threads
116 - Decisions, 2 simultaneous threads, each running the following tasks in sequence:
117    - Monitoring Decision
118    - Monitoring Decision, abbreviated
119    - Naming Decision
120    - Optimization Decision
121    - Default Guard Decision (always "Permit")
122    - Frequency Limiter Guard Decision
123    - Min/Max Guard Decision
124
125 When the script starts up, it uses policy-api to create, and policy-pap to deploy
126 the policies that are needed by the test.  It assumes that the "naming" policy has
127 already been created and deployed.  Once the test completes, it undeploys and deletes
128 the policies that it previously created.
129
130 Results
131 =======
132
133 The stability summary results were reported by JMeter with the following summary line:
134
135 .. code-block:: bash
136
137     summary = 222450112 in 72:00:39 =  858.1/s Avg:     5 Min:     1 Max: 946942 Err:    17 (0.00%)
138
139 The XACML PDP offered good performance with JMeter for the traffic mix described above, using 858 threads per second
140 to inject the traffic load.   A small number of errors were encountered, and no significant CPU spikes were noted.
141 The average transaction time was 5ms. with a maximum of 946942ms.
142