directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irving, Dave" <>
Subject [mina] SocketIoProcessor.Worker creation under heavy load
Date Thu, 27 Oct 2005 07:45:08 GMT

I've been doing some profiling on an application which sits on Mina -
and I came across something interesting.
My test application is creating "single-shot" connections using multiple
client threads at a high rate:

	- open connection to MINA server
	- send some data
	- receive reply data
	- close connection

The Mina server seems very stable, but Im noticing that theres a fairly
high creation / destruction rate of SocketIoProcessor.Worker threads. 
After processing sessions from a select, the worker thread checks for
more work, and exits if there is none to do:

if( selector.keys().isEmpty() && newSessions.isEmpty() ) {
  worker = null;

In my case it seems that quite frequently a new session for a new
connection is registered just after this check - and consequently a new
worker thread is immediately created.

Do you think there would be any advantage in leaving the worker about
for a bit longer? E.g: Maybe if there's still nothing to do after a
further (max 1 second) select -- then -- kill the worker? Or is this
likely to not be of any gain?

Many thanks,


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

View raw message