Expand my Community achievements bar.

SOLVED

AEM scheduler performace impact

Avatar

Level 4

Hi ,

As per one our project requirement we have execute some peace code Automatically every year on Jan-1.  We can implement this in AEM using Sling-schedulers. But as per our understanding if Any sling-scheduler is configured , A separate thread (For each scheduled-event) run allays on back end to check whether Trigger time for this scheduled event is reached and will execute code. In Our view this , this will have impact on Performance Of AEM (since thread corresponding to this scheduled event will always run continuously on back end). Please correct if our understanding is wrong.

Thanks

k Chaitanya

1 Accepted Solution

Avatar

Correct answer by
Level 9

 Yes. There is a daemon thread which keeps checking the scheduler timing. However, I don't think this could lead to a problem unless you are running scheduler very frequently.

-----Jitendra

krishna chaitanya wrote...

Hi ,

As per one our project requirement we have execute some peace code Automatically every year on Jan-1.  We can implement this in AEM using Sling-schedulers. But as per our understanding if Any sling-scheduler is configured , A separate thread (For each scheduled-event) run allays on back end to check whether Trigger time for this scheduled event is reached and will execute code. In Our view this , this will have impact on Performance Of AEM (since thread corresponding to this scheduled event will always run continuously on back end). Please correct if our understanding is wrong.

Thanks

k Chaitanya

 

View solution in original post

3 Replies

Avatar

Level 10

AEM is made up of services like this - that is - usnig SLing APIs.

Sling services are part of AEM and this will not have any more impact than other Sling based services. Many development teams use Sling Scheduling functionality in their projects, See this Sling documentation for more information:

https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html

https://sling.apache.org/apidocs/sling7/org/apache/sling/commons/scheduler/Scheduler.html

Having said this - create your service so its not fired too often. 

Avatar

Correct answer by
Level 9

 Yes. There is a daemon thread which keeps checking the scheduler timing. However, I don't think this could lead to a problem unless you are running scheduler very frequently.

-----Jitendra

krishna chaitanya wrote...

Hi ,

As per one our project requirement we have execute some peace code Automatically every year on Jan-1.  We can implement this in AEM using Sling-schedulers. But as per our understanding if Any sling-scheduler is configured , A separate thread (For each scheduled-event) run allays on back end to check whether Trigger time for this scheduled event is reached and will execute code. In Our view this , this will have impact on Performance Of AEM (since thread corresponding to this scheduled event will always run continuously on back end). Please correct if our understanding is wrong.

Thanks

k Chaitanya

 

Avatar

Employee Advisor

Hi,

Sling and AEM are using the Quartz scheduler. I haven't checked the source yet, but I don't think that for each scheduled job a separate thread is being created. I also haven't observed this behaviour you assume in any threaddump I did on AEM instances in the last 3 years.

So I do think, that it is safe to create many scheduled jobs from a performance and load point of view. Jobs which are not scheduled do not consume performance.

kind regards,
Jörg