Iurii Smyrnov created SYNCOPE-1199:
--------------------------------------

             Summary: Syncope performance: AnyObjetcTO's creation time grows 
with it's quantity
                 Key: SYNCOPE-1199
                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1199
             Project: Syncope
          Issue Type: Bug
    Affects Versions: 2.0.4, 2.0.2
         Environment: Syncope 2.0.2 and 2.0.4 + PostgreSQL 9; Jmeter;
https://github.com/Talend/platform-services/tree/master/iam/idp
            Reporter: Iurii Smyrnov
         Attachments: Latency for 1000 create roles (directly syncope 2.0.4) no 
SCIM.csv, Latency for 1000 create roles (directly syncope 2.0.4).png, Latency 
for 1037 create roles (directly syncope 2.0.2) no SCIM.csv, Latency for 1037 
create roles (directly syncope 2.0.2).png, Latency for 3000 create roles 
(directly syncope 2.0.2).csv, Latency for 3000 create roles (directly syncope 
2.0.2).png

*AnyObjetcTO's creation time (latency) grows with it's quantity.*
We create AnyObjetcTO entities (our custom RoleAT type).

Testing results are attached (Latency in milliseconds).

Note: We've tested PostgreSQL DB directly (without Syncope) and we've got 
stable AnyObjetcTO's creation time (not increasing).

To reproduce the issue please do next :
User Syncope 2.0.4 or 2.0.4 and  + PostgreSQL 9 - you could test our 
environment IDP project .
To install it you should have docker.

To build IDP project:
 1. build https://github.com/Talend/platform-services/tree/master/btools
        1.1 cd ../platform-services/btools
        1.2 call: gradle clean build publish
        
 2. build https://github.com/Talend/platform-services/tree/master/microservices
  2.1 cd ../platform-services/microservices
  2.2 call: gradle clean buildDocker - it will create microservices docker image
  
 3. build https://github.com/Talend/platform-services/tree/master/iam/idp
  3.1 cd ../platform-services/iam/idp
  3.2 call: gradle clean buildDocker - it will create idp docker image
  3.3 cd ../platform-services/iam/idp/build
  3.4 call: docker-compose up - start containers
  3.5 call: docker-compose ps - you will see containers list like:
  
     Name                  Command              State                           
      Ports
------------------------------------------------------------------------------------------------------------------------
build_db_1    docker-entrypoint.sh postgres   Up      0.0.0.0:5432->5432/tcp
build_idp_1   sh bin/start_tomcat.sh jpda     Up      0.0.0.0:8000->8000/tcp, 
8080/tcp, 8443/tcp, 0.0.0.0:9080->9080/tcp
 
 4. wait for IDP is started: ←[33midp_1  |←[0m 16-Aug-2017 15:33:57.506 INFO 
[main] org.apache.catalina.startup.Catalina.start Server startup in 95832 ms
 
 5. To test syncope performance you  could use our test with jmeter:
  5.1 install jmeter
  5.2 our test 
https://github.com/Talend/platform-services/blob/master/performance-tests/src/main/resources/CreateRoleTestSyncope.jmx
 open by jmeter
  5.3 update test:
      5.3.1 quntity to create in jmeter here: CreateRoleTestSyncope -> 
${__P(nbOfAccountsToCreate, 3000)} to set ${__P(nbOfAccountsToCreate, 1000)} 
for example
          5.3.2 if you use UNIX - updated CreateRoleTestSyncope -> from 
${__P(host, 192.168.99.100)}  to ${__P(host, localhost)}  - 192.168.99.100 host 
for Windows
  5.4 results are saved in ../<jmeter_path>/bin/CreateRoleSyncopeResults.csv 
(you could update) in CreateRoleTestSyncope ->  View Results Tree Report -> 
Filename
  5.5 request is here: CreateRoleTestSyncope -> CreateRoleThread -> Loop 
Controller -> Create Role Request
  5.6 run it
  5.7 responses list you will see : CreateRoleTestSyncope ->  View Results Tree 
Report
  
 6. if you want use some other way to test here are options to create requests:
  6.1 URI: http://192.168.99.100:9080/syncope/rest/anyObjects -for WIndows, for 
Unix http://localhost:9080/syncope/rest/anyObjects
  6.2 http headers:
    6.2.1 Content-Type / application/json
        6.2.2 Accept / application/json
        6.2.3 Authorization / Basic YWRtaW46cGFzc3dvcmQ=
  6.3 verb: POST
  6.4 body:
    {
     "plainAttrs":[
      {
       "values":[
         "TDP_DATASET_CERTIFY"
       ],
       "schema":"roleEntitlements"
      }
     ],
    "type":"RoleAT",
    "realm":"/",
    "@class":"org.apache.syncope.common.lib.to.AnyObjectTO",
    "auxClasses":["RoleATClass"],
    "name":"Role_Account_1"
  }
  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to