quickfixgo / quickfix

The Go FIX Protocol Library :rocket:
https://www.quickfixgo.org/
Other
723 stars 282 forks source link

Sessions Table Row Lock and Performance #643

Open MemiMem opened 1 month ago

MemiMem commented 1 month ago

Hello,

We have recently encountered a performance issue with quickFIXGo. We see that when we have considerable outgoing orders our rate of processing of incoming messages decreases significantly. From our testing we see that we slow down our outgoing message processing by 40-50% in such cases. We are on FIX 4.2, using postgres as the message_store and are using the latest version of quickFIXGo.

We have seen no resource issues on our side at all. As such, we are under the suspicion that this might be a logical performance bottleneck.

Looking through, we see that the table sessions contains both the incoming and outgoing seq_num. We speculate that during updates to this table (like store.SetNextSenderMsgSeqNum()) this row is locked and this might be a major factor in the slowdowns that we experience.

EDIT: We are talking about the initiator in this case