Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Quartz underlying configuration in Quarkus/quartz for perfomance tuning #29319

Closed
fikrutm opened this issue Nov 16, 2022 · 6 comments
Closed

Comments

@fikrutm
Copy link
Contributor

fikrutm commented Nov 16, 2022

Currently we are using Quarkus/quartz cluster mode with store-type: jdbc_tx, in a situations where the scheduler has very large numbers of triggers that need to be fired at or near the same time.

Per quartz official documentation http://www.quartz-scheduler.org/documentation/quartz-2.3.0/configuration/ConfigMain.html#configuration-reference the performance expected to improve by setting:

org.quartz.scheduler.batchTriggerAcquisitionFireAheadTimeWindow (the larger the number, the more efficient firing is (in situations where there are very many triggers needing to be fired all at once)

org.quartz.scheduler.batchTriggerAcquisitionMaxCount (the larger the number, the more likely batch acquisition of triggers to fire will be able to select and fire more than 1 trigger at a time)

org.quartz.jobStore.acquireTriggersWithinLock (to avoid data corruption).

But Quarkus/quartz does not expose these properties as configurable. Would it be possible to expose the underlying default quartz configuration so that we can leverage the quartz batch mode?

Quartz provides these configurations: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/configuration/ConfigMain.html
And Quarkus/Quartz provides these: https://quarkus.io/guides/quartz#quartz-configuration-reference

@cescoffier

@quarkus-bot
Copy link

quarkus-bot bot commented Nov 16, 2022

/cc @machi1990, @mkouba

@geoand
Copy link
Contributor

geoand commented Nov 17, 2022

Seems reasonable to me

@machi1990
Copy link
Member

Makes sense to me as well.

@fikrutm will you be interested in implementing it? We are happy and will be here to guide you. Thanks

@fikrutm
Copy link
Contributor Author

fikrutm commented Nov 18, 2022

@machi1990 I am glad to take the implementation, and needs a guide how to get started?

@machi1990
Copy link
Member

Thanks @fikrutm

The configuration could be declared in https://github.com/quarkusio/quarkus/blob/main/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzRuntimeConfig.java

The way it was done for https://github.com/quarkusio/quarkus/blob/main/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzRuntimeConfig.java#L22-L32 could be used as inspiration.
The key thing to ensure is that the default value respects the current default behavior so that we do not break existing functionality.

As for property naming:

  1. batchTriggerAcquisitionFireAheadTimeWindow
  2. batchTriggerAcquisitionMaxCount
  3. acquireTriggersWithinLock

Are okay names to me.
Ensure that the declared configuration are properly commented as they are used as documentation.

If this is your first time contributing to the repo, I'd suggest you to have a quick look at https://github.com/quarkusio/quarkus/blob/main/CONTRIBUTING.md

@machi1990
Copy link
Member

Fixed by #29395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants