Idle connections keep threads on epollWait()

이희승 (Trustin Lee) trustin at gmail.com
Mon Jan 31 18:21:46 EST 2011


There is no way to adjust the maximum number of I/O threads in Netty.  I don't think it's a good idea to implement such a feature considering its complexity and no performance gain.

NettyUser5325 <subhirn3 at yahoo.de> wrote:

>
>Hi. Thanks for the quick answer.
>
>I did some testing using the HexDumpProxy, and made the following
>observations.
>
>When limiting the number of threads by passing the proper limit as a
>constructor argument to NioClientSocketChannelFactory and
>NioServerSocketChannelFactory, the program works all fine. It keeps the
>maximum number of threads on epollWait() as long as there are more open
>connections than the thread limit.
>
>However, I would like to dynamically set the thread limit during
>runtime,
>which these classes do not allow me to do. So I tried to use the
>java.util.concurrent.ThreadPoolExecutor class to do the limiting, and
>creating the channel factories with a very high number. But this does
>not
>seem to be feasible because the channel factories do not return the
>threads
>for open connections, and the program does not get a thread to handle
>any
>new connections anymore.
>
>Is there any way to achieve a dynamic thread limiting in Netty?
>
>Is it possible to specify an extra thread pool for threads that just
>manage
>idle connections (and thereby limiting the number of threads on
>epollWait())?
>
>Is there a way to change this behavior that the channel factories
>always use
>the maximum number of threads to do epollWait() on idle connections?
>
>Thanks
>-- 
>View this message in context:
>http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Idle-connections-keep-threads-on-epollWait-tp5962446p5963802.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

--
Trustin Lee, http://gleamynode.net/
Sent from a mobile device. Please excuse my brevity.



More information about the netty-users mailing list