Strategies for reducing CPU footprint when creating multiple client threads
fatzopilot
fatzopilot at gmx.net
Tue Jul 28 05:22:02 EDT 2009
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
--
View this message in context: http://n2.nabble.com/Strategies-for-reducing-CPU-footprint-when-creating-multiple-client-threads-tp3340958p3340958.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list