mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Tracking Number of active session
Date Fri, 27 Jul 2012 18:01:06 GMT
Le 7/27/12 7:28 PM, Rajiv Kasera a écrit :
> Hi,
>
>   
>
> I have couple of questions related to Mina:
>
>   
>
> 1.       Is there any API which can provide the information on the number of
> active sessions on a MINA server instance? Or this has to be built based on
> the call of sessionCreated and sessionClosed method.

You can get an approximate number of running session by calling this 
method :

IoSession.getService().getManagedSessionCount()

This is approximate as some session might have been closed by some other 
thread.
>
> 2.       Is there any limitation to the number of concurrent sessions that
> can exist for a Mina server?
No.
> I have seen instances where during a load
> testing, from one physical machine if around 150 concurrent request are
> initiated other clients are not able to make connection to the server.
It all depends on what you do on the server. For instance, if each 
request does a search in a database, with a 100ms roundtrip, then don't 
expect to get a high number of concurrent requests being processed, 
unless you add an executor in the filter chain, or increase the number 
of IoProcessors associated with the server.

> Is
> there any workaround for addressing this issue.

See upper.
> Also with so many request
> the CPU utilization jumps to 150% on a linux box with 2 cores.
Again, if your application is crunching numbers, then you should see 
where it east CPU. MINA per se is not consuming a lot of CPU. FYI, 
Apache DS which is based on MINA can easily cope with more than 4000 
requests per second on my laptop...


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Mime
View raw message