09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Propagation Issues<br />

Optimizing Propagation<br />

In setting the number of JOB_QUEUE_PROCESSES, DBAs should be aware that this<br />

number is determined by the number of queues from which the messages have to<br />

be propagated and the number of destinations (rather than queues) to which<br />

messages have to be propagated.<br />

A scheduling algorithm handles propagation. The algorithm optimizes available job<br />

queue processes and minimizes the time it takes for a message to show up at a<br />

destination after it has been enqueued into the source queue, thereby providing<br />

near-OLTP behavior. The algorithm can handle an unlimited number of schedules<br />

and various types of failures. While propagation tries to make the optimal use of the<br />

available job queue processes, the number of job queue processes to be started also<br />

depends on the existence of nonpropagation-related jobs such as replication jobs.<br />

Hence, it is important to use the following guidelines to get the best results from the<br />

scheduling algorithm.<br />

The scheduling algorithm uses the job queue processes as follows (for this<br />

discussion, an active schedule is one that has a valid current window):<br />

If the number of active schedules is less than half the number of job queue<br />

<br />

processes, the number of job queue processes acquired corresponds to the<br />

number of active schedules.<br />

If the number of active schedules is more than half the number of job queue<br />

<br />

processes, after acquiring half the number of job queue processes, multiple<br />

active schedules are assigned to an acquired job queue process.<br />

If the system is overloaded (all schedules are busy propagating), depending on<br />

<br />

availability, additional job queue processes will be acquired up to one less than<br />

the total number of job queue processes.<br />

If none of the active schedules handled by a process has messages to be<br />

<br />

propagated, then that job queue process will be released.<br />

The algorithm performs automatic load balancing by transferring schedules<br />

<br />

from a heavily loaded process to a lightly load process such that no process is<br />

excessively loaded.<br />

Handling Failures in Propagation<br />

The scheduling algorithm also has robust support for handling failures. It may not<br />

be able to propagate messages from a queue due to various types of failures. Some<br />

of the common reasons include failure of the database link, non-availability of the<br />

remote database, non-existence of the remote queue, remote queue not started and<br />

security violation while trying to enqueue messages into the remote queue. Under<br />

4-12 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!