Based on what you stated.. it seems to me that you could occupy all
your servers with long jobs if the messages come in the right order.
I.e. 10 long jobs come in and tie up all your servers and now the
small real time jobs will have to wait for those to finish.

Why don't you dedicate x server for the short jobs and y servers for
either jobs?  When calculating you SLA for the real time jobs you
could only count on the x servers since the y servers could be in use
the big jobs.  But when big jobs are not being crunched, the y servers
would be avail to help with the load of the real time jobs.

On 8/2/06, Vadim Pesochinsky <[EMAIL PROTECTED]> wrote:

Thanks a lot to both of you. Now I understand the issue, but I still need
prefetchSize=0 to fix it.

I have ~20 servers doing the same type of work, but in deferent contexts.
Some jobs are running for days or weeks, others are executed weekly and run
a few hours, and there are real-time user requests. To  implement this jobs
are split into small 1 sec - 5 min jobs and sent to different queues for
different types of jobs, e.g:

Queues:
   FIN.Q1,  FIN.Q2, FIN.Q3

Servers are configured to check different queues. E.g. n servers check
FIN.Q1 first, if no jobs, they go to FIN.Q2; m servers check FIN.Q2 first
and FIN.Q1 next; others check only one queue. When I check the queue I do
receiveNoWait(), if no jobs found on any of the queues I do recieve(
sleepTime ) on "FIN.>" queue. By changing number of servers configured one
way or the other I make sure that performance requirements are met. With
this setup some consumers are idle for some time and they hold some jobs.
This means that real-time job can be sitting in prefetch buffer for a long
time.

I am wondering how 'common' is this problem. Maybe there is some more
elegant solution, e.g. to allow external or very configurable (script like)
dispatch policy. Anyway, for now I need to fix prefetchSize. I searched the
code for prefetchSize, but I cannot find where it makes sure that 0 value is
ignored. Thanks again.
--
View this message in context: 
http://www.nabble.com/Trouble-with-prefetch-buffer.-tf2029800.html#a5624757
Sent from the ActiveMQ - User forum at Nabble.com.




--
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to