val executor = new OrderedMemoryAwareThreadPoolExecutor(
settings.ExecutionPoolSize,
settings.MaxChannelMemorySize,
settings.MaxTotalMemorySize,
settings.ExecutionPoolKeepalive.length,
settings.ExecutionPoolKeepalive.unit,
system.threadFactory)
The Netty remoting in 2.0-M4 shares the following amongst it's Active outbound connections:
val clientChannelFactory = new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(system.threadFactory),
Executors.newCachedThreadPool(system.threadFactory))
private val executionHandler = new ExecutionHandler(netty.executor)
And the server:
private val factory = new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(netty.system.threadFactory),
Executors.newCachedThreadPool(netty.system.threadFactory))
private val executionHandler = new ExecutionHandler(netty.executor)
They are all also sharing the same HashedWheelTimer.
So essentially the remoting uses its own threads, which mean that remoting is decoupled, processing-wise, from the actors, which means that serialization etc is handled by other threads.
There's a lot of potential tuning you can make. Are you seeing any problems?
Cheers,
√