[
https://issues.apache.org/jira/browse/BOOKKEEPER-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15897528#comment-15897528
]
Robert Joseph Evans commented on BOOKKEEPER-1008:
-------------------------------------------------
[~eolivelli]
asked on the mailing list about using EPoll in netty 4. At Yahoo we have that
code in place. It more or less ends up looking like
{code}
static EventLoopGroup getDefaultEventLoopGroup() {
ThreadFactory threadFactory = new DefaultThreadFactory("bookkeeper-io");
final int numThreads = Runtime.getRuntime().availableProcessors() * 2;
if (SystemUtils.IS_OS_LINUX) {
try {
return new EpollEventLoopGroup(numThreads, threadFactory);
} catch (Throwable t) {
if (LOG.isDebugEnabled()) {
LOG.debug("Could not use Netty Epoll event loop: {}",
t.getMessage());
}
return new NioEventLoopGroup(numThreads, threadFactory);
}
} else {
return new NioEventLoopGroup(numThreads, threadFactory);
}
}
...
if (eventLoopGroup instanceof EpollEventLoopGroup) {
bootstrap.channel(EpollServerSocketChannel.class);
} else {
bootstrap.channel(NioServerSocketChannel.class);
}
{code}
If this is added in as part of the normal netty4 port, that is fine, if not
I'll add it in as a follow on JIRA.
> Move to netty4
> --------------
>
> Key: BOOKKEEPER-1008
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-1008
> Project: Bookkeeper
> Issue Type: Improvement
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.5.0
> Reporter: Robert Joseph Evans
> Assignee: Robert Joseph Evans
>
> As part of the Yahoo push back and in general we would like to move to netty
> 4, preferably netty 4.1.x for the client and server communication.
> This lays the ground work for zero copy, or very nearly zero copy handling on
> the server side.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)