Closed wsky closed 11 years ago
using fixed pool
Executors.newFixedThreadPool(1)
after init more than 100 netty clientbootstrap, load up to 100+, even no request
more than 1600+ threads for the process
ClientBootstrap bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool()));
shared NioClientSocketChannelFactory can resovle it
static NioClientSocketChannelFactory channelFactory=new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool());
but release will also close channelFactory...
bootstrap.releaseExternalResources();
in RemotingPerfTest
https://github.com/wsky/top-link/blob/master/java/src/test/java/com/taobao/top/link/remoting/RemotingPerf.java
if using ClientChannelPooledSelector, low tps and high load that upper to 30+,
while ClientChannelSharedSelector, load only 2+
more concurrent, more io threads
currently, netty client init with following code:
the threadpool usage so bad for remoting usage, maybe we need sharded threadpool