/
FIX Engine latency tuning guide
FIX Engine latency tuning guide
Latency tuning
FixEngine::createSession
Session persistent mode (ordered by latency: the best is on the top):
null_storageType
– should be chosen if session will not resend last sent messages by request and recovery on start will be performed by usertransient_storageType
– should be chosen if session will resend last sent messages by request and recovery on start will be performed by userpersistentMM_storageType
– should be chosen if session will resend last sent messages by request and recovery on start will be performed by FIX antennapersistent_storageType
– should be chosen if persistentMM_storageType is not supported by OS
Receiving
engine.properties
LogIncomingMessages = false
ThirdPartyRoutingIsEnabled = false
EnableIncrementalLogFileCreation = true
(for persistent mode)TimestampsInLogs = false
DictionariesFilesList
– to get best latency user should create FIX protocol XML file with minimal message/field set. Only used fields should be listed in the message. Path to the XML file should be passed toDictionariesFilesList
parameter in the engine.properties.SessionExtraParameters::validation_.ignoreUnknownFields_
should be true.
SessionExtraParameters
SessionExtraParameters::validation_.isEnabled = false
SessionExtraParameters::validation_.ignoreUnknownFields_ = true
validateCheckSum_ = false;
More about validation parameters is here: How to configure FIX messages validationRecvCpuAffinity_
– you can find the description of this parameter here: FIX Engine parameters#RecvCpuAffinitysocketPriority_ |= Engine::AGGRESSIVE_RECEIVE_SOCKET_OP_PRIORITY
aggressiveReceiveDelay_ = 0
; this will cause 100% core usage. For Linux see also: How to use SO_BUSY_POLL socket option
Sending
engine.properties
CheckVersionOfOutgoingMessages = false
TimestampsInLogs = false
EnableIncrementalLogFileCreation = true
(for persistent mode)DictionariesFilesList
– to get best latency user should create FIX protocol XML file with minimal message/field set. Only used fields should be listed in the message. Path to the XML file should be passed toDictionariesFilesList
parameter in the engine.properties.SessionExtraParameters::validation_.ignoreUnknownFields_
should be true.
SessionExtraParameters
SessionExtraParameters::validation_.isEnabled = false
SessionExtraParameters::validation_.ignoreUnknownFields_ = true
generateCheckSum_ = false
; if remote side does not validate CheckSum(10) field, user can disable calculation of this fieldSendCpuAffinity_
– you can find the description of this parameter here: FIX Engine parameters#SendCpuAffinitydisableTCPBuffer_ = true
socketPriority_ |= Engine::AGGRESSIVE_SEND_SOCKET_OP_PRIORITY
Session::put
PutOptions.overrideSendingTime_ = false
; With this option user should get current system time only once and copy obtained value to SendingTime and TransactTime (if defined) fieldPreparedMessage
– where it is possible user should use this class instead of FIXMessage- If
PreparedMessage
is not suitable, you should reuse sent FIXMessge objects
, multiple selections available,
Related content
How to set strategy for processing out-of-sequence messages
How to set strategy for processing out-of-sequence messages
More like this
How to manage incoming FIX message flow with low latency TCP dispatcher
How to manage incoming FIX message flow with low latency TCP dispatcher
More like this
How to use "RejectMessageWhileNoConnection" parameter
How to use "RejectMessageWhileNoConnection" parameter
More like this
Configuring FIX Sessions
Configuring FIX Sessions
More like this
How to configure FIX messages validation
How to configure FIX messages validation
More like this
How to measure and reduce latency in FIX Antenna HFT
How to measure and reduce latency in FIX Antenna HFT
More like this