On 08/10/2012 21:18, ernst Developer wrote:
Hi,

When Syncope is not being used, I still see a substantial MySql workload, caused by Syncope. I was wondering what is causing this behavior, and I found out that a specific quartz related set of queries is the reason for this.

One of the queries:

UPDATE QRTZ_TRIGGERS SET TRIGGER_STATE = 'WAITING' WHERE TRIGGER_NAME = 'Trigger_job-1' AND TRIGGER_GROUP = 'DEFAULT' AND TRIGGER_STATE = 'ACQUIRED'

This query takes a long time to run, and is consuming a substantial part of the processing power of the hardware.

What is the reason for this statement? What can I do about it, I mean, what can I do to decrease the amount of queries being executed?

Hi Ernst,
this happens because Syncope delegates to Quartz the handling of scheduled jobs. Jobs take care of reporting, notification, propagation, synchronization from external resources and also user-defined actions.

Quartz will then need to check whether it's time to fire a new trigger or not once in a while, and this is the kind of workload you are seeing at the moment.
In order to change this you can:
  a. check if the MySQL DB schema for QRTZ_* tables is lacking some indexes
b. since the highest frequency is probably due to NotificanJob which is triggered every 2 minutes, you can override JobInstanceLoader.load() and replace the cron expression "0 0/2 * * * ?" with something more suitable for you

(b) is clearly far from perfection, so I've opened SYNCOPE-216 for this.

Regards.

--
Francesco Chicchiriccò

ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/

Reply via email to