directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Panicker <vino...@gmail.com>
Subject Re: [mina] Performance issues
Date Tue, 22 Mar 2005 07:10:20 GMT
Hi,

On Tue, 22 Mar 2005 15:50:19 +0900, Trustin Lee <trustin@gmail.com> wrote:
> Hi,
>
> On Tue, 22 Mar 2005 10:48:52 +0530, Vinod Panicker <vinod.p@gmail.com> wrote:
> > Hi,
> >
> > I was just trying to do some tests using mina.  I've got a server and
> > a client, both of which are using mina and the thread pool filter.
> >
> > The server and the client have been run on multiple OS's - both
> > Windows (2000 & 2003) and Linux (Fedora Core 3).
> >
> > Max fd limits have been upped.
> >
> > The server uses the IoProtocolAcceptor class.  The client uses the
> > SocketConnector class.
> >
> > The client application is basically just connecting to the server and
> > maintaining a concurrent connection.
> >
> > When the client app is run, and told to establish 2000 connections to
> > the server for eg, the connection rate suddenly (no pattern observed)
> > drops to about 1 connection per second.  This has been tried on all
> > the OS's mentioned above.  The server is apparently not the cause of
> > this issue because when a different instance of the client is started
> > (on the same machine, even) the connection rate remains normal.  This
> > behaviour is not consistent, though it happens on every other run of
> > the client.
> >
> > There are no sleep()'s in the client / server code.
> >
> > Any pointers on what is happening?
> >
> > Also, is there a way using which the server connection accept backlog
> > (i forget the exact term) can be set?
>
> There is a 'bind()' method with backlog parameter in SocketAcceptor.
> IoAcceptor doesn't have it, so you'll have to down-cast it.

In the code, the IoProtocolAcceptor class is being used for the
server, which doesnt have a bind that has the functionality of
configuring a backlog.  Also, since this class is not derived from
SocketAcceptor, no question of downcasting arises.

>
> > PS: This same test has been carried out using our own code (non-mina)
> > and works perfectly on all the above OS's (over 20k connections on the
> > server)
>
> I don't have any test machines to do that massive test.  Can that kind
> of test be reproducable in two PCs?  If so, I'll test by myself and
> figure out why.

Its not a massive test.  The Linux machine i'm using has got 512 MB
RAM.  The Windows box has 1 GB.  You should be able to run both client
and server on the same machine without any issues, on a machine with
even 256 MB RAM IMO.

Do you want me to send you the source files so you can test it out?

>
> Regards,
> Trustin.
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>

Regards,
Vinod.

Mime
View raw message