Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
NioServerSocketChannelFactory needs the maximum number of worker thre…
Browse files Browse the repository at this point in the history
…ads.

Summary: The worker thread factory had enough maximum threads, but netty assumes number of cores * 2.  This is likely not adequate for our clusters.

Test Plan: Passed all corona unittests.

Reviewers: dms, rvadali, pyang

Reviewed By: rvadali

CC: mattwkelly

Task ID: 1152668
  • Loading branch information
aching authored and Alex Feinberg committed Jul 7, 2012
1 parent db64d91 commit bc5947b
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -91,9 +91,11 @@ public synchronized void init(Configuration conf) {
} catch (ClassCastException e) {
LOG.warn("Netty worker thread pool is not of type ThreadPoolExecutor", e);
}
LOG.info("Netty starting up with a maximum of " + maximumPoolSize +
" worker threads");
channelFactory = new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(bossFactory),
workerThreadPool);
workerThreadPool, maximumPoolSize);
}

public synchronized int start(ChannelPipelineFactory pipelineFactory) {
Expand Down

0 comments on commit bc5947b

Please sign in to comment.