robthewolf
robthewolf

Reputation: 7624

how can I process fix message quicker when sending through quickfixj

I am having a problem with processing speed in QuickfixJ. I read in this question that its possible to process 300messages/sec. I also saw elsewhere numbers reported in the thousands. My Quickfix session code receives a list of messages and sends them one by one through Sesssion.SendToTarget();

It is possible that the loop in which I send the messages is slowing me down, but I was wondering is there a way to send a list of message or to speed up the process of sending these messages. It may also be possible that because I am logging to the screen that this is slowing me down. Would I benefit from running it headless and logging to just a file log?

Upvotes: 3

Views: 4736

Answers (3)

Jordan
Jordan

Reputation: 530

Loging to the screen slow you down very much. With loging on the screen i was making like 30-40 messages per sec and whitout loging i`m making over 400. So simple do not display anything on the screen. Also the slow part in the process is the answer from the Acceptor. The Initiator manage to send more then 2000 messages per second but the respond of the Acceptor is slowing down the overall process.

Upvotes: 1

Frank Smith
Frank Smith

Reputation: 988

I've seen QuickFIX/J processing messages in the thousands per second. However, you will have trouble getting that peformance in a single FIX session. The scenario I'm describing involved multiple sessions. The reason this is signficant is that the FIX protocol is inherently sequential per session due to the FIX sequence numbers. This effectively means you have one thread processing messages if you have one session. With multiple sessions, the engine can take advantage of multiple threads and processors.

Generally speaking, file I/O is the primary overhead. Look for ways to optimize the file system access. If you run the engine with no logging and a MemoryStore you'll see it is quite fast. I wouldn't use it for extreme low latency applications but it's not bad.

Upvotes: 4

MD-Tech
MD-Tech

Reputation: 1224

Are you creating each message in the loop as that could be your overhead? This could be done asynchronously and then the messages sent as and when they are complete. Logging asynchronously would take away that additional overhead if you want to make sure that the sending time is minimized, just make sure to send any time data through to the logging thread so that it is accurate when logs get written.

Upvotes: 0

Related Questions