Dear Claus, I did that as below
<threadPoolProfile id="myDefaultProfile" defaultProfile="true" poolSize="50" maxPoolSize="100" /> 2GB of memory and 50 threads, inflight exchange now 1 or 2 or zero and processing is very fast when having huge load. Thanks, Omar Atia -----Original Message----- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Tuesday, January 03, 2012 12:40 PM To: users@camel.apache.org Subject: Re: inflight exchange and queue of apache camel... On Sat, Dec 31, 2011 at 6:01 PM, Omar Atia <omar.a...@its.ws> wrote: > Dears, > > I have tcp mina endpoint (many sessions opened and closed concurrently) , I > was using default camel threading profile with 10 thread , the inflight > exchange was always 10 when having heavy load , then I change the default > profile to be 50 thread pool size with maximum pool size 100 and queue size > =1000 ... > You use the sync option on the mina endpoint which is the route consumer (eg input of the route). That means the consumer is synchronous and thus take up 1 thread to process incoming TCP request. The mina consumer will use the default thread pool profile which has a 10-20 pool size with a backlog of 1000 in the task queue. So that is why under heavy load the mina consumer is maxed up at 10 threads. You can change the default profile, or setup a custom thread pool profile with the id = MinaThreadPool to configure explicit for Mina. That said, we should probably improve the documentation how to do this. > While I was monitoring the system after the above change seems that inflight > exchange when heavy load it becomes zero to three maximum , and processed > quickly . > > Can you explain before and after applying the change what happen ? in the > beginning request or exchange was having a lot of delay after the change only > seconds. > > How camel queue works ? if no of threads is 10 and how it works if number of > threads is 50. > > Thanks, > Omar Atia > > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/