By Tim Dexter on May 22, 2008
Scheduling tidbits today ...
Chatting to Kei about our scheduling engine for the standalone release today. We use an open source scheduler, Quartz from OpenSymphony- seems to have everything we need. The conversation stemmed from question about how the engine handle multiple requests at a time and can priorities be set on a given job.
The first question was asking if multiple jobs arrive at the scheduler at the same time either from multiple users or may be from web service calls are they then run in parallel or series? The scheduling engine can be set up with a number of given threads to execute jobs. By default we set this to 3, if you want more or less you can change this. We do not currently provide an UI for this but its easier enough to change. Under the reports repository directory you can get to the quartz config file:
In that file you'll an entry to set the number of threads:
If you make a change then you'll need to bounce the server for the change to take effect. Quartz makes some recommendations that we would echo on the thread count:
Can be any positive integer, although you should realize that only numbers between 1 and 100 are very practical. This is the number of threads that are available for concurrent execution of jobs. If you only have a few jobs that fire a few times a day, then 1 thread is plenty! If you have tens of thousands of jobs, with many firing every minute, then you probably want a thread count more like 50 or 100 (this highly depends on the nature of the work that your jobs perform, and your systems resources!).
The second question on prioritizing jobs is tougher, the Quartz scheduler does not currently support prioritization although I have mention of plans to support it sometime in the future, so we are a little stuck. We are looking at handling that from our side to queue up the jobs we send to quartz but no commitments or dates, sorry.