[QFJ-156] Is MINA (using java NIO) good for streaming applications Created: 12/Mar/07  Updated: 10/Apr/07  Resolved: 10/Apr/07

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.0.5
Fix Version/s: None

Type: Other Priority: Default
Reporter: rohit Assignee: Steve Bate
Resolution: Fixed Votes: 0
Labels: None
Environment:

test



 Description   

Hi Steve,
I have been doing some testing with quickfix and mina 1.0.1 and found it's very inefficient w.r.t the speed/latencies. Any advise would be really appreciated. We have a FIX engine that's implemented using QFJ and want to support 500 users and may be each getting about 250-500 messages per second. All users get the data at the same time as the marekt changes for everyone. When the data changes and as MINA uses "n" number of SocketIOProcessors, I notice delay of couple of mill seconds more on NIO compared to blocking I/O. Any advise of how I can achive more sessions and also less latency?

Thanks for your help.



 Comments   
Comment by rohit [ 12/Mar/07 ]

This is for an acceptor which streams market data.

Comment by Steve Bate [ 13/Mar/07 ]

How are you measuring the relative latency between NIO and blocking IO? Are you setting TCP_NODELAY? Are you wanting to process 25000 msg/sec (500 users x 500 msg/sec) with a single QFJ process? To anything close to that performance, I'd recommend studying the QFJ acceptor implementation and MINA. There are tuning options that might be useful for your application that are currently not directly supported by QFJ (but could be added). Which acceptor implementation are you using (single thread or thread-per-session)?

Comment by rohit [ 13/Mar/07 ]

1) I am running couple of worker clients that initiate 50 fix client sessions per worker and check the delay between current time the fix sending time.
2) I have the nagle algorithm disabled (TcpNoDelay=true)
3) I tried with 1-10 QFJ processors
4) I am using SingleThread as I don't get many messages to the server. It's a streaming server. So, one thread is sufficinet for me.

Could you pls. advise some of the tuning options to achieve better results?

Thanks for the quick response.

Comment by rohit [ 13/Mar/07 ]

Hi Steve,
Also, the throughput on blocked I/O is 5% less compared to non-blocking i/o. But, latency is more important than the throughput for us. The reason for going to non-blocking to avoid delays due to context switching when running 500+ users and our app already uses 2 threads for other purposes.

Comment by Steve Bate [ 10/Apr/07 ]

Hi rohit,

I saw your questions in the MINA list. If I understand them correct, we are doing what they suggested to minimize latency.

Generated at Sat Nov 23 10:36:08 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.