Strategies for reducing CPU footprint when creating multiple client threads

Frederic Bregier fredbregier at free.fr
Tue Jul 28 06:13:18 EDT 2009


Hi,

I think you've seen the most. Some other ideas (may be not related to your
need):

- If the client are using the same kind of ClientBootStrap, you can use a
unique shared ClientBootStrap for all and not creating one new for each.
- If you use a ThreadPoolExecutor in the pipeline (like Ordedered or not
MemoryAware), you can try to pass more agument at creation like : the
keepAliveTime in millisecond (which keeps as long as the time you specify
the current thread active in case there are some other works to do).
- Try some options like tcpNoDelay, keepAlive, reuseAddress to add to the
ClientBootStrap.

HTH,
Frederic


fatzopilot wrote:
> 
> Hi,
> 
> I'd like to load-test my socket server by emulating client connections.
> What I did so far was creating muliple threads (one per emulated client),
> each creating the full set of instances and threads that I think are
> necessary to run a single client (so essentially the ClientBootstrap with
> a NioClientSocketChannelFactory).
> That way, I am able to load-test the machines (10 in total, each 2,2GHz
> Core Duo and 2GB) I use for emulating the clients, but not my server. Each
> client machine is able to emulate about 100 clients before it  is under
> full load (100% CPU).
> Although that's generally very nice because it means my server could deal
> with a larger set of concurrent connections (~1000) easily, I would like
> to fully load-test it as well.
> Thus, I need a way to reduce the client emulator thread footprint.
> I already tried using a shared CachedThreadPool for all clients on a
> machine by creating a static instance of a CachedThreadPool which I pass
> down to each  ClientBootstrap constructor, and I also tried using a
> SingleThreadExecutor() for each client (boss and worker), but I wasn't
> able to significantly reduce the client load with these approaches.
> So I wonder whether there are other things my clients could share on a
> client machine or whether there are other methods in general to reduce
> client load. Any ideas?
> 
> Thanks
> fatzopilot
> 


-----
Hardware/Software Architect
-- 
View this message in context: http://n2.nabble.com/Strategies-for-reducing-CPU-footprint-when-creating-multiple-client-threads-tp3340958p3341304.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list