You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Aleksandar <al...@gmail.com> on 2007/02/12 15:04:14 UTC

Mina performance problems

Hello,
I have server with 200 clients. Every client connects to server with
two sockets. The first socket is used by server for sending messages
to clients and is one-way communication. The second socket is used for
sending messages from client to server and sending back responce.

Communication on second socket is very slow in comparison with the
first socket, where everyting is ok.

Server machine has 4 processors.

This is io acceptor's creation:
IoAcceptor acceptor = new SocketAcceptor(4, Executors.newCachedThreadPool());

Is there some other configuration?

Re: Mina performance problems

Posted by peter royal <pr...@apache.org>.
On Feb 12, 2007, at 6:04 AM, Aleksandar wrote:
> I have server with 200 clients. Every client connects to server with
> two sockets. The first socket is used by server for sending messages
> to clients and is one-way communication. The second socket is used for
> sending messages from client to server and sending back responce.
>
> Communication on second socket is very slow in comparison with the
> first socket, where everyting is ok.
>
> Server machine has 4 processors.
>
> This is io acceptor's creation:
> IoAcceptor acceptor = new SocketAcceptor(4,  
> Executors.newCachedThreadPool());
>
> Is there some other configuration?

You many want to set the threading to manual, and add your own  
ExecutorFilter that has a larger pool of threads.

And on multi-processor machines, I've found that you want a higher  
multiple of the number of cores, try passing in 8 or 12 to the  
SocketAcceptor cxtor
-pete


-- 
proyal@apache.org - http://fotap.org/~osi