Re: R12

Posted by ErmanArslansOracleBlog on
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/R12-tp3336p3372.html

Lawrence,

Sleep seconds is per process.
Let's give an example to make you understand better.

Suppose you want to make your concurrent programs  to wait in the queue 20 seconds max.
In order to do this, you need mainly 2 things. 1) appropriate concurrent manager count 2) appropriate sleep time setting.

Concurrent manager processes sleeps (does not do any queue checking) till they reach the given sleep time.

so, if you set 10 concurrent manager processes ( for ex: 10 standard manager processes) and if you set 20 seconds for the sleep time look whats happens;

in second 1- > std mgr process 1 will check its queue (and start waiting for 20 seconds)
in second 2 -> std mgr process 2 will check its queue (and start waiting for 20 seconds)
in second 3 -> std mgr process 3 will check its queue (and start waiting for 20 seconds)

--> you see we checked the queues 3 times in 3 seconds..

in seconds 4 -> std mgr process 4 will check its queue (and start waiting for 20 seconds)
in seconds 5 -> std mgr process 5 will check its queue (and start waiting for 20 seconds)

..
...
....
in seconds 10 -> std mgr process 10 will check its queue (and start waiting for 20 seconds)  at this time std manager above has 10 seconds left to check its queue again.

in second 20 -> std mgr process 1 will check its queue (and start waiting for 20 seconds -- this is the second time for process 1)
in second 21 -> std mgr process 2 will check its queue (and start waiting for 20 seconds -- this is the second time for process 1)


You see, we check the queues very often.. If you do the math, you ll see we check the queues almost 30 times. Checking the queues 30 times in a minute with 10 managers to supply max 20 second wait? No , it is not necessary.

The formula and the logic to calculate the sleep times is as follows;

Sleep time= "# of process" * (1-Avg Utilization percentage ) * Avg Time(seconds) for a request allowed to be pending

#of process= 30
suppose we have only 1 hour peak time , 1 hour in a day whic we have important conc requests
Suppose these concurrent requests are critical and they should be wait max 10 seconds

30 * (1-1/24)*10 =  280  -> sleep time should be 280 seconds. (approximately.)

So, as we have 30 processes and they are idle most of the time, they will check the  queues in every 280/30=  9 seconds. (in average)

If this formula calculates a sleep time lower than the  "Avg Time(seconds) for a request allowed to be pending", then it means "the concurrent manager process count is not enough", the solution should be adding concurrent manager processes.