Job scheduling continued
Nil desh, April 02, 2009 - 12:44 am UTC
Thanks for your reply. I understand your point. However I have one doubt in my mind. How does the same setting runs well in production server which also has one CPU. Is it then something related to how the jobs need to be scheduled or something else also? Please comment on this. It will be very usefull for us
April 02, 2009 - 9:42 am UTC
it works the same in production as it does on whatever this machine is.
However, on production - it is likely you do not have the same jobs scheduled, if you did - you would see the SAME EXACT THING.
this parameter just (as in only) controls the number of jobs that will run simultaneously. If you have a single cpu, you shouldn't really set it above 2 - and if you have jobs in the queue, you should expect (as in HOPE, ANTICIPATE) that the CPU jumps to 100% - if not, something is wrong.
You have a single cpu, if you ask to do N things on it, you expect it to be fully utilized.
Job scheduling continued
Nil desh, April 03, 2009 - 12:45 am UTC
Thanks for your comments. We have reset the value of parameter job_queue_processes to 5 now. Its working fine now. I have one question, if the machine has 1 cpu and i set the parameter job_queue_processes=2 as you have suggested then what will be the effect if there are 3 jobs scheduled like this:-
1st jobs is scheduled at 12:00 AM and expected to complete in 30 minutes (means at 12:30 AM)
2nd job is scheduled at 12:10 AM and expected to complete in 30 minutes (means at 12:40 AM)
3rd job is scheduled at 12:20 AM and is expected to complete in another 30 mins (means at 12:50 AM).
What will be the effect on scheduled jobs, because we see here 2 jobs are overlapping the execution time of 1st job.
Also another last question - is there any other database parameter on which job_queue_processes depends or is affected and vice-versa.
Thanks in advance for your replies.
April 03, 2009 - 7:27 am UTC
use logic....
the job queue will pull off the first job at 12:00 am and start it.
the job queue will pull off the second job at 12:10 am and start it.
The job queue will do nothing until one of the two finish.
at 12:30am, job from 12:00am finishes, the 12:20am job is selected and run
job_queue_processes is as simple and basic as it sounds - it is simply YOU telling US how many jobs to allow to run at the SAME TIME. Nothing more, nothing less.