Netty performance question

omsdw mgiedt at gmail.com
Tue Apr 28 20:57:45 EDT 2009


Bingo -- I should have tested the MemoryAwareThreadPool before that last
post. I'm not saying that it would have clicked immediately, but I would add
your first paragraph to the Javadoc for
OrderedMemoryAwareThreadPoolExecutor...

Thanks again for the patience!

Kind regards,
-Matt


Trustin Lee-2 wrote:
> 
> Hi Matt,
> 
> OrderedMemoryAwareThreadPool executes the queued task in the same
> thread if an existing thread is running a task associated with the
> same channel.  This behavior is to make sure the events from the same
> channel are handled in a correct order.  A different thread might be
> chosen only when the task queue of the channel is empty.
> 
>>From the log, your decoder is faster than your last handler so that
> the decoded strings are being queued in the task queue of
> OrderedMemoryAwareThreadPool.  You decoded 16 * 8 (128) frames while
> the last handler handled 26 frames.
> 
> If you don't need the correct order, you could use
> MemoryAwareThreadPool, which is not ordered.
> 
> If you can discard old message of the same symbol, you could use
> MemoryAwareThreadPool, add some sort of sequence ID generated by
> AtomicInteger to the decoded message, and discard older one when a
> newer one has been processed already.
> 
> HTH,
> 
> — Trustin Lee, http://gleamynode.net/
> 
-- 
View this message in context: http://n2.nabble.com/Netty-performance-question-tp2712571p2737990.html
Sent from the Netty User Group mailing list archive at Nabble.com.





More information about the netty-users mailing list