direct buffer memory issues

"Trustin Lee (이희승)" trustin at gmail.com
Wed Mar 17 01:38:17 EDT 2010


Yes, it is more efficient to use a single ChannelFactory instance to
handle many connections.

HTH,
Trustin

Adam Fisk wrote:
> That's a great point, Stephen. I've been much more concerned up until
> now with the correctness and functionality of the proxy than with
> optimizing its use of Netty, so the NioClientSocketChannelFactory per
> client was more a function of simply getting everything up and running
> quickly.
> 
> Trustin can undoubtedly answer this better. Would it make more sense
> for me to use a single NioClientSocketChannelFactory across all
> connections? I'm assuming so, which also makes the task of cleaning
> them up much easier (using Stephen's shutdown hook approach).
> 
> Thanks guys.
> 
> -Adam
> 
> 
> On Mon, Mar 8, 2010 at 9:25 AM, Stephen Haberman
> <stephen at exigencecorp.com> wrote:
>> Hi Adam,
>>
>>> I wasn't calling releaseExternalResources in all cases.
>> For my own education, am I right that this means LittleProxy has
>> multiple NioClientSocketChannelFactorys? Perhaps one per proxy client?
>>
>> This is not that big of a deal given the little to no traffic my
>> fakehttp proxy has to deal with, but I currently have it creating just
>> one NioClientSocketChannelFactory on startup and then having all client
>> connections come from that one single factory.
>>
>> It turns out I was not calling releaseExternalResources at all, on
>> either the server or client nio factories, but adding the call for both
>> was just two lines in my shutdown hook Runnable given I have only a
>> single instance of both.
>>
>> Is there a good reason to have multiple NioClientSocketChannelFactorys,
>> or am I just misreading your post?
>>
>> Thanks,
>> Stephen
>>
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
> 
> 
> 

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100317/cc2a5a77/attachment.bin 


More information about the netty-users mailing list