Given topic uncovers how to configure Handler in order to achieve maximal performance characteristics and lowest processing latency.
Under normal conditions, the Handler logs important events and market data transmitted by iMpact Multicast Price Feed into a log file. As far as log file uses text-based format, binary data like incoming market data is base64- encoded before stored in the log. That adds extra time into processing cycle. Finally, logging is file-based and thus is relatively slow.
To eliminate slowdowns caused by flushing data to filesystem and/or extra encoding operations, logging subsystem should be disabled by setting OnixS::ICE::iMpact::MarketData::HandlerSettings::logLevel
parameter to OnixS::ICE::iMpact::MarketData::LogLevels::Fatal
value and OnixS::ICE::iMpact::MarketData::HandlerSettings::advancedLogOptions
parameter to OnixS::ICE::iMpact::MarketData::AdvancedLogOptions::LogNothing
.
Market data processing is done asynchronously by using working threads. Under normal conditions, threads may be executed on any processor available in the system. That may have a negative influence on overall performance due to unnecessary thread context switching.
To avoid switching threads between processors, Handler allows to establish processor affinity for each working thread:
Under normal conditions, Handler effectively utilizes internal structures used to keep incoming market data. Packets and ICE iMpact messages are re-used once contained data is processed by Handler. Therefore, no data is allocated during real-time market data processing.
However, data may be copied within callbacks Handler invokes as listeners to various market data events. Thus, when a book is copied, that invokes memory allocation and thus has a negative effect on the performance and latency. To improve the results, copying should be minimized or strategies with preallocation should be used.