You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by rohit chithirala <ro...@yahoo.co.uk> on 2007/03/12 20:16:44 UTC

using MINA for low latency applications

Hi Team,
      We are currently looking at using QuickFix which uses MINA (1.0.1) and have few questions. Firstly, thanks a lot for your work. We are implementing a market data server using TCP and we want to support many users (500+) and also maintain low latency. But, our initial tests revealed that the blocking I/O is performing better then the NIO w.r.t the latencies. Any advise would be really appreciated.
   
  Some info on our app requiremet:
  1) handles 500+ users
  2) need to distribute 500+ messages per second and the updates happen at the same time for all
  3) we can't use UDP as it's FIX
  4) have low latency and not compromising on the throughput
   
  Thanks for the help in advance.
   
  Rohit

 		
---------------------------------
 New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.

Re: using MINA for low latency applications

Posted by Vinod Panicker <vi...@gmail.com>.
On 3/13/07, rohit chithirala <ro...@yahoo.co.uk> wrote:
> Hi Team,
>       We are currently looking at using QuickFix which uses MINA (1.0.1) and have few questions. Firstly, thanks a lot for your work. We are implementing a market data server using TCP and we want to support many users (500+) and also maintain low latency. But, our initial tests revealed that the blocking I/O is performing better then the NIO w.r.t the latencies. Any advise would be really appreciated.
>
>   Some info on our app requiremet:
>   1) handles 500+ users
>   2) need to distribute 500+ messages per second and the updates happen at the same time for all
>   3) we can't use UDP as it's FIX
>   4) have low latency and not compromising on the throughput
>
>   Thanks for the help in advance.

What version of the Java Runtime are you using?
In my tests, JDK 1.4 NIO performance was not always better than
blocking I/O performance.

Also, I think it would be quite acceptable for you to use a single
thread per user and service requests in this scenario using blocking
I/O since you are serving only 500 users.

MINA would make things more abstract and easier for you, but use JDK
1.6 or JDK 1.5 Update 10+ with epoll functionality enabled for max
performance.

HTH,
Vinod.

Re: using MINA for low latency applications

Posted by Trustin Lee <tr...@gmail.com>.
Hi Rohit,

On 3/13/07, rohit chithirala <ro...@yahoo.co.uk> wrote:
>
> Hi Team,
>       We are currently looking at using QuickFix which uses MINA (1.0.1)
> and have few questions. Firstly, thanks a lot for your work. We are
> implementing a market data server using TCP and we want to support many
> users (500+) and also maintain low latency. But, our initial tests revealed
> that the blocking I/O is performing better then the NIO w.r.t the
> latencies. Any advise would be really appreciated.
>
>   Some info on our app requiremet:
>   1) handles 500+ users
>   2) need to distribute 500+ messages per second and the updates happen at
> the same time for all
>   3) we can't use UDP as it's FIX
>   4) have low latency and not compromising on the throughput


What is your business logic?  If it doesn't take up a lot of time, you can
remove any thread pool between IoHandler and IoAcceptor to minimize
latency.  (Please refer to our tutorial:
http://mina.apache.org/configuring-thread-model.html)

Even if the business logic takes up time, you can remove the default thread
pool and employ your own thread pool in your IoHandler implementation if the
order of message doesn't matter.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6