Add s3p docs for xacml and drools
[policy/parent.git] / docs / development / devtools / xacml-s3p.rst
index 5cca4af..c52a21a 100644 (file)
 .. toctree::
    :maxdepth: 2
 
-Policy XACML PDP component
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+##########################
 
-Performance Test of Policy XACML PDP
-++++++++++++++++++++++++++++++++++++
+Performance Test of Policy XACML PDP (Jakarta)
+**********************************************
 
-Summary
--------
+The Performance test was executed by performing requests
+against the Policy RESTful APIs.
+
+A default ONAP installation in the Policy tenant in UNH was used to run the tests.
 
-The Performance test was executed by performing requests against the Policy RESTful APIs residing on the XACML PDP installed in the windriver lab to get policy decisions for monitoring and guard policy types.  This was running on a kubernetes host having the following configuration:
+The Agent VMs in this lab have the following configuration:
 
 - 16GB RAM
 - 8 VCPU
-- 160GB Disk
 
-The performance test runs 10 simultaneous threads calling XACML PDP RESTful APIs to get decisions for Monitoring, Guard Min Max, and Guard Frequency Limiter policy types, with at duration of 6000 seconds.  The test execution lasted approximately 50 minutes resulting in the following summary:
+Summary
+=======
+
+The Performance test was executed, and the result analysed, via:
+
+.. code-block:: bash
+
+    jmeter -Jduration=1200 -Jusers=10 \
+        -Jxacml_ip=$ip -Jpap_ip=$ip -Japi_ip=$ip \
+        -Jxacml_port=30111 -Jpap_port=30197 -Japi_port=30664 \
+        -n -t perf.jmx -l testresults.jtl
+
+Note: the ports listed above correspond to port 6969 of the respective components.
+
+The performance tests runs the following, all in parallel:
 
-- 37,305 Healthcheck requests
-- 33,716 Statistics requests
-- 25,294 Monitoring decision requests
-- 25,288 Guard Min Max decisions
-- 25,286 Guard Frequency Limiter requests
+- Healthcheck, 10 simultaneous threads
+- Statistics, 10 simultaneous threads
+- Decisions, 10 simultaneous threads, each running the following in sequence:
 
-The average throughput was about 9.8 transactions per second. CPU and memory usage along with a screenshot of the JMeter Summary Report are provided in this document.
+   - Monitoring Decision
+   - Monitoring Decision, abbreviated
+   - Naming Decision
+   - Optimization Decision
+   - Default Guard Decision (always "Permit")
+   - Frequency Limiter Guard Decision
+   - Min/Max Guard Decision
+
+When the script starts up, it uses policy-api to create, and policy-pap to deploy,
+the policies that are needed by the test.  It assumes that the "naming" policy has
+already been created and deployed.  Once the test completes, it undeploys and deletes
+the policies that it previously created.
 
 Results
--------
+=======
+
+The test was run for 20 minutes with 10 users (i.e., threads), with the following results:
+
+.. csv-table::
+   :header: "Number of Users", "Throughput (requests/second)", "Average Latency (ms)"
+
+   10, 4603, 2
 
-**CPU Utilization**
+.. image:: images/s3p-perf-xacml.png
 
-Total CPU used by the PDP was measured before and after the test, using "ps -l".
 
-===================  ==================  ================  ===================  ===============  ==================
-**Intial CPU time**  **Final CPU time**  **Intial CPU %**  **Intial Memory %**  **Final CPU %**  **Final Memory %**   
-===================  ==================  ================  ===================  ===============  ==================
-00:60:27             00:73:45            3.5%              4.0%                 94.12.3%         4.0%
-===================  ==================  ================  ===================  ===============  ==================
+Stability Test of Policy XACML PDP
+**********************************
 
-**Memory Utilization**
+This test was run using jmeter on a default
+ONAP installation in the Policy tenant in UNH.
+
+The Agent VMs in this lab have the following configuration:
+
+- 16GB RAM
+- 8 VCPU
+
+Summary
+=======
+
+The stability test was performed on a default ONAP OOM installation in the Policy tenant of the UNH lab.
+JMeter injected the traffic defined in the
+`XACML PDP stability script
+<https://git.onap.org/policy/xacml-pdp/tree/testsuites/stability/src/main/resources/testplans/stability.jmx>`_
+with the following command:
+
+.. code-block:: bash
+
+    jmeter.sh -Jduration=259200 -Jusers=2 -Jxacml_ip=$ip -Jpap_ip=$ip -Japi_ip=$ip \
+        -Jxacml_port=30111 -Jpap_port=30197 -Japi_port=30664 --nongui --testfile stability.jmx
+
+Note: the ports listed above correspond to port 6969 of the respective components.
+
+The default log level of the root and org.eclipse.jetty.server.RequestLog loggers in the logback.xml
+of the XACML PDP
+(om/kubernetes/policy/components/policy-xacml-pdp/resources/config/logback.xml)
+was set to WARN since the OOM installation did have log rotation enabled of the
+container logs in the kubernetes worker nodes.
+
+The stability test, stability.jmx, runs the following, all in parallel:
+
+- Healthcheck, 2 simultaneous threads
+- Statistics, 2 simultaneous threads
+- Decisions, 2 simultaneous threads, each running the following tasks in sequence:
+   - Monitoring Decision
+   - Monitoring Decision, abbreviated
+   - Naming Decision
+   - Optimization Decision
+   - Default Guard Decision (always "Permit")
+   - Frequency Limiter Guard Decision
+   - Min/Max Guard Decision
+
+When the script starts up, it uses policy-api to create, and policy-pap to deploy
+the policies that are needed by the test.  It assumes that the "naming" policy has
+already been created and deployed.  Once the test completes, it undeploys and deletes
+the policies that it previously created.
+
+Results
+=======
+
+The stability summary results were reported by JMeter with the following summary line:
 
 .. code-block:: bash
 
-    Number of young garbage collections used during the test: 518
-    Avg. Young garbage collection time: ~11.56ms per collection
-    Total number of Full garbage collection: 32
-    Avg. Full garbage collection time: ~315.06ms per collection
-     
-    
-     S0C         S1C        S0U    S1U      EC              EU             OC              OU            MC          MU         CCSC      CCSU     YGC     YGCT    FGC     FGCT     GCT  
-    
-    16768.0   16768.0  0.0   5461.0    134144.0    71223.6   334692.0     138734.5    50008.0   48955.8  5760.0    5434.3   4043    45.793  32        10.082   55.875
-    
-    16768.0   16768.0  0.0   4993.4    134144.0    66115.7   334692.0     252887.4    50264.0   49036.5  5760.0    5439.7   4561    53.686  32        10.082   63.768
-
-**Jmeter Results Summary**
-
-.. image:: images/xacml-s3p.PNG
+    summary = 941639699 in 71:59:36 = 3633.2/s Avg:     1 Min:     0 Max:   842 Err:     0 (0.00%)
+
+The XACML PDP offered very good performance with JMeter for the traffic mix described above.
+The average transaction time is insignificant.  The maximum transaction time of 842 ms.
+There was a Drools stability test running in parallel, hence the actual load was higher.
+