“AutherizationEnabled” creating a lot of performance issue

Is there any way i can improve the performance on loading camunda tasks ? I have 30k tasks on mysql with AutherizationEnabled=true . When i login to camunda webapp it takes 5/6 minutes to load results, Which is very bad. Not able to figure-out how to improve the loading time. Here are the queries running while i login to camunda tasklist page.

Please Note : I can’t make AutherizationEnabled=false.

SELECT DISTINCT RES.REV,
                RES.ID,
                RES.NAME,
                RES.PARENT_TASK_ID,
                RES.DESCRIPTION,
                RES.PRIORITY,
                RES.CREATE_TIME,
                RES.OWNER,
                RES.ASSIGNEE,
                RES.DELEGATION,
                RES.EXECUTION_ID_,
                RES.PROC_INST_ID,
                RES.PROC_DEF_ID,
                RES.CASE_EXECUTION_ID,
                RES.CASE_INST_ID,
                RES.CASE_DEF_ID,
                RES.TASK_DEF_KEY,
                RES.DUE_DATE,
                RES.FOLLOW_UP_DATE,
                RES.SUSPENSION_STATE,
                RES.TENANT_ID
FROM ACT_RU_TASK RES
LEFT JOIN ACT_RE_PROCDEF PROCDEF ON RES.PROC_DEF_ID = PROCDEF.ID
LEFT JOIN
  ( SELECT A.*
   FROM ACT_RU_AUTHORIZATION A
   WHERE A.TYPE_ < 2
     AND (A.USER_ID_ IN ('jena',
                         '*')
          OR A.GROUP_ID_ IN ('camunda-admin'))
     AND ( (A.RESOURCE_TYPE = 7
            AND A.PERMS & 2 = 2
            OR A.RESOURCE_TYPE = 6
            AND A.PERMS & 64 = 64 )) ) AUTH ON (AUTH.RESOURCE_ID IN (RES.ID,
                                                                     PROCDEF.KEY_,
                                                                     '*'))
WHERE UPPER(RES.NAME_) = UPPER('Task Name1')
  AND RES.DUE_DATE_ < '2017-04-24 03:15:00'
  AND RES.DUE_DATE_ IS NOT NULL

Looks like it’s a open bug. Do anyone know when is it going to be resolved ?

https://app.camunda.com/jira/browse/CAM-7441

What authorization are you referring to? The internal authorization that the Camunda server uses (accessible through the “Admin” section of the Camunda web app)?

Performance is influenced by so many factors it’s difficult to say what the issue is without knowing a lot about your environment like server resources, messages per minute, number of messages active, how active are they, etc.

One thing you can do is set a lower history level. Check this reference for details: https://docs.camunda.org/manual/7.5/user-guide/process-engine/history/

If you turn off history entirely, you will see an enormous increase in performance, but you won’t have any history of process execution.

Hi,

Jena_Sthitaprajna is referring to this authorization: https://docs.camunda.org/manual/7.6/user-guide/process-engine/authorization-service/

Its the camunda internal ACL concept.

I already noticed this performance problems. It is a huge difference in performance of loading tasks with authorization enabled or disabled.

Unfortunatly I actually do not know how to solve this.

Best regards,

Markus

1 Like

Let me try. Thanks for your input.

I just found something interesting. After analysing this above mysql script, i tried to find out why this query is taking longer time and found that some of the columns are not being indexed in mysql. I added index to these and it helps me a lot and drastically improved my task list loading time. Hopefully someone get help with this.

Table : ACT_RU_AUTHORIZATION
Column names:
TYPE_
USER_ID_
RESOURCE_TYPE_
PERMS_

Table : ACT_RE_PROCDEF
Column names: KEY_

Table: ACT_RU_TASK
Column names: SUSPENSE_STATE_