Netty performance question

Trustin Lee tlee at redhat.com
Tue Apr 28 22:09:26 EDT 2009


Javadoc updated as requested.  Thanks for the input!

Cheers,

— Trustin Lee, http://gleamynode.net/

On Wed, Apr 29, 2009 at 9:57 AM, omsdw <mgiedt at gmail.com> wrote:
>
> 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.
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>




More information about the netty-users mailing list