Hi Trustin, 

Thanks For your Reply ! 

Yes I am adding ExcutorFilter to the filter chain (which increases the
latency)

Basically, I want to remove the context switch from Handler thread to
SocketIOProcessor's Worker Thread(response part), by directly writing to raw
socket of a channel. I want to achive this with ExecutorFilter In place. 

I am looking for an intermediate solution to this problem so that latency
will be better with little compromise on 
scalability..

Thanks Once Again !!!


Regards,
Yogs


Trustin Lee wrote:
> 
> Hi Yogs,
> 
> On 3/29/07, Yogs <[EMAIL PROTECTED]> wrote:
>> We have two thread context switches in MINA, SocketIOProcessor Worker
>> Thread
>> to Handler Thread (read) and Handler to SocketIOProcessor (write). Am I
>> supposing it right? This may have increased the latency of the request.
> 
> Do you mean that you added an ExecutorFilter with a thread pool?  If
> you did, it will increase the latency.
> 
> To avoid the latency, you can remove the ExecutorFilter, then you will
> send read and write request in the I/O processor thread, which doesn't
> cause context switching.  But, this also means I/O will slow down if
> your event handler implementation performs expensive operations such
> as database access.  You will have to manage an additional thread pool
> dedicated to such operations.
> 
> Please refer to our documentation for more detailed information:
> 
> http://mina.apache.org/documentation.html
> (Find 'Configuring Thread Model')
> 
> Unfortunately, our web site is down.  Please check the URL a few hours
> later.
> 
> HTH,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Two-Thread-context-switches-in-MINA-tf3481740.html#a9726056
Sent from the mina dev mailing list archive at Nabble.com.

Reply via email to