Optimizing Netty for fast socket accept/creation

Jeanfrancois Arcand jfarcand at apache.org
Thu Jul 9 10:17:15 EDT 2009


Salut,

sorry for the delay...


이희승 (Trustin Lee) wrote:
> Hey JF,
> 
> Good to see you here. :)
> 
> On 07/09/2009 12:30 AM, Jeanfrancois Arcand wrote:
>> Salut,
>>
>> 이희승 (Trustin Lee) wrote:
>>> Hi Carl,
>>>
>>> One more question. :)
>>>
>>> Does the accept throughput increase linearly as the number of accept
>>> threads (the number of bound ports in your case) increases?
>>>
>>> If you take a look at NioServerSocketPipelineSink.java:161, you will see
>>> the following code:
>>>
>>>     bossExecutor.execute(new IoWorkerRunnable(
>>>             new ThreadRenamingRunnable(
>>>                     new Boss(channel),
>>>                     "New I/O server boss #" + id +
>>>                     " (channelId: " + channel.getId() +
>>>                     ", " + channel.getLocalAddress() + ')')));
>>>
>>> I increased the number of acceptor threads like the following:
>>>
>>>     for (int i = 0; i < 2; i ++) {
>> How many core your machine has? We usually use the number of core as an
>> indication.
> 
> 4.  Do you mean the same ServerSocketChannel is registered to multiple
> selectors with OP_ACCEPT in Grizzly?

Yes we did some test with multiple Selector for OP_ACCEPT. At the time I 
only tested using HTTP (which is far from representative) and the 
scalability was a little better, but throughput was lower. Did you have 
a chance to test it? I will try to test it using your echo benchmark to 
see what I'm getting.

A+

-- Jeanfrancois


> 
> Trustin
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users



More information about the netty-users mailing list