ow2-proactive/programming

Reduce number of threads created when using PNP

activeeon-bot opened this issue · 0 comments

Original issue created by Youri Bonnaffe on 05, Nov 2014 at 17:56 PM - PROACTIVE-1390


When using PNP, on a machine with a lot of CPUs, a large number of threads is created, mostly because of Netty which is use for PNP protocol.

It comes from Netty :

DEFAULT_IO_THREADS = Runtime.getRuntime().availableProcessors() * 2

used in org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory that is created in PNPAgent.

Maybe this can be limited to a lower value, or at least configurable through a property for nodes.

Reducing this number of thread will reduce the memory footprint of the node.
It can also be an issue on machines configured with a low "max process per user" value (ulimit).