On Fri, Dec 11, 2009 at 4:39 AM, Christopher Popp
<[email protected]> wrote:
> Hi,
>
> Just ran into a little stumbling block and thought I'd send a note out seeing
> if anyone had any suggestions for things to try.
>
> I have a MINA system, running a test where nearly all of the traffic for the
> system is keep-alives. Each client sends/expects keep-alives every 60
> seconds. Three missed keep-alives cause a disconnect. I'm using the
> KeepAlive filter in MINA to handle this.
>
> Version: MINA 2.0.0 M6
> Server Hardware: 4 Core, 15 GB Ram (Extra large instance on EC2).
>
> The test involves simulated clients connecting in and simply maintaining
> their session. At first we connect in 4000 clients, and wait for the system
> to stabilize. We then add another 4000, and wait for it to stabilize, for a
> total of 8000 simultaneous connections. When we're adding another 4000,
> (somewhere between 8000-12000), we start to have the keep-alive timers pop on
> the clients, seeming to imply the server isn't keeping up. The CPU
> utilization of the system is low. Here's my filter chain definition:
> acceptor = new NioSocketAcceptor(Runtime.getRuntime().availableProcessors() +
> 1);
>
> acceptor.getFilterChain().addLast("protocol", new ProtocolCodecFilter(new
> MYCodecFactory()));
> acceptor.getFilterChain().addLast("threadPool", new ExecutorFilter());
>
> MYKeepAliveFilter keepAlives = new MYKeepAliveFilter(new
> MYKeepAliveMessageFactory());
> acceptor.getFilterChain().addLast("keepAlives", keepAlives);
>
> acceptor.setHandler(devHandler);
>
> My first thoughts are to up the number of I/O processor threads, or to
> possibly add a second ExecutorFilter after the first one configured only for
> WRITE events. Any thoughts?
Not sure! Tried digging around but in vein :-(
I remember something, this function in
AbstractPollingConnectionlessIoAcceptor.java could be key
private void notifyIdleSessions(long currentTime) {
// process idle sessions
if (currentTime - lastIdleCheckTime >= 1000) {
lastIdleCheckTime = currentTime;
AbstractIoSession.notifyIdleness(
getListeners().getManagedSessions().values().iterator(),
currentTime);
}
}
Can you try a Thread Dump or can even try YourKit.
> Thanks,
> Chris
>
>
>
--
thanks
ashish
Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal