In this article we present the performance numbers of CoralFIX when it comes to parsing messages. We measure the time it takes to generate a ByteBuffer
from a FixMessage
and the time it takes to generate a FixMessage
from a ByteBuffer
. For that we use three FIX messages: a simple one without repeating groups, one with a repeating group and lastly one with repeating groups inside repeating groups.
The machine used for the benchmarks below was an Intel i7 quad-core (4 x 3.50GHz) Ubuntu box overclocked to 4.50Ghz.
Simple FIX Message
For our test we randomize 2.5 million FIX messages like the one below:
BeginString(8)=FIX.4.2 BodyLength(9)=101 MsgType(35)=SecurityStatusRequest("e") SenderCompID(49)=TTTTTTT6 TargetCompID(56)=872 Unknown(5555)=6236.83333333 MsgSeqNum(34)=99 SendingTime(52)=20140709-14:43:12.934 Unknown(7777)=Y TargetSubID(57)=ARCA HeartBtInt(108)=60 EncryptMethod(98)=0 CheckSum(10)=114
From FixMessage
to ByteBuffer
:
Messages: 2,500,000 Avg Time: 474.51 nanos Min Time: 443.0 nanos Max Time: 38.514 micros Garbage: no garbage created for the GC 75% = [avg: 470.0 nanos, max: 475.0 nanos] 90% = [avg: 471.0 nanos, max: 481.0 nanos] 99% = [avg: 473.0 nanos, max: 522.0 nanos] 99.9% = [avg: 473.0 nanos, max: 632.0 nanos] 99.99% = [avg: 474.0 nanos, max: 1.671 micros] 9.999% = [avg: 474.0 nanos, max: 3.557 micros]
From ByteBuffer
to FixMessage
:
Messages: 2,500,000 Avg Time: 481.55 nanos Min Time: 438.0 nanos Max Time: 8.929 micros Garbage: no garbage created for the GC 75% = [avg: 475.0 nanos, max: 499.0 nanos] 90% = [avg: 478.0 nanos, max: 501.0 nanos] 99% = [avg: 480.0 nanos, max: 521.0 nanos] 99.9% = [avg: 480.0 nanos, max: 644.0 nanos] 99.99% = [avg: 481.0 nanos, max: 1.71 micros] 99.999% = [avg: 481.0 nanos, max: 3.345 micros]
FIX message with repeating groups
For our test we randomize 2.5 million FIX messages like the one below:
BeginString(8)=FIX.4.2 BodyLength(9)=157 MsgType(35)=QuoteStatusRequest("a") SenderCompID(49)=TTTTTTT6 TargetCompID(56)=44611 Unknown(5555)=11855.33 MsgSeqNum(34)=58 SendingTime(52)=20140709-15:01:26.209 [NoRelatedSym(146)=2 | Symbol(55)=AAPL FutSettDate(64)=65912 SecurityDesc(107)=blah1 | Symbol(55)=IBM FutSettDate(64)=56132 SecurityDesc(107)=blah2] Unknown(7777)=Y TargetSubID(57)=ARCA HeartBtInt(108)=60 EncryptMethod(98)=0 CheckSum(10)=114
From FixMessage
to ByteBuffer
:
Messages: 2,500,000 Avg Time: 879.73 nanos Min Time: 818.0 nanos Max Time: 15.48 micros Garbage: no garbage created for the GC 75% = [avg: 869.0 nanos, max: 888.0 nanos] 90% = [avg: 873.0 nanos, max: 903.0 nanos] 99% = [avg: 877.0 nanos, max: 956.0 nanos] 99.9% = [avg: 878.0 nanos, max: 1.26 micros] 99.99% = [avg: 879.0 nanos, max: 2.733 micros] 99.999% = [avg: 879.0 nanos, max: 4.483 micros]
From ByteBuffer
to FixMessage
:
Messages: 2,500,000 Avg Time: 1.132 micros Min Time: 1.044 micros Max Time: 13.381 micros Garbage: no garbage created for the GC 75% = [avg: 1.118 micros, max: 1.146 micros] 90% = [avg: 1.124 micros, max: 1.165 micros] 99% = [avg: 1.129 micros, max: 1.224 micros] 99.9% = [avg: 1.13 micros, max: 1.646 micros] 99.99% = [avg: 1.131 micros, max: 3.947 micros] 99.999% = [avg: 1.132 micros, max: 5.948 micros]
Note: This shows a known weakness of the FIX protocol: parsing repeating groups is expensive.
FIX message with repeating groups inside repeating groups
For our test we randomize 2.5 million FIX messages like the one below:
BeginString(8)=FIX.4.2 BodyLength(9)=272 MsgType(35)=QuoteStatusRequest("a") SenderCompID(49)=TTTTTTT6 TargetCompID(56)=63016 Unknown(5555)=4592.00 MsgSeqNum(34)=64 SendingTime(52)=20140709-19:38:42.653 [NoRelatedSym(146)=2 | Symbol(55)=AAPL FutSettDate(64)=61245 SecurityDesc(107)=blah1 [NoTestSubgroup(10000)=2 | TestTag1(10001)=61245 TestTag2(10002)=21785 | TestTag1(10001)=foo421 TestTag2(10002)=foo422] | Symbol(55)=IBM FutSettDate(64)=21785 SecurityDesc(107)=blah2 [NoTestSubgroup(10000)=2 | TestTag1(10001)=15732 TestTag2(10002)=39740 | TestTag1(10001)=foo421 TestTag2(10002)=foo422]] Unknown(7777)=Y TargetSubID(57)=ARCA HeartBtInt(108)=60 EncryptMethod(98)=0 CheckSum(10)=114
From FixMessage
to ByteBuffer
:
Messages: 2,500,000 Avg Time: 1.792 micros Min Time: 1.656 micros Max Time: 14.2 micros Garbage: no garbage created for the GC 75% = [avg: 1.771 micros, max: 1.815 micros] 90% = [avg: 1.78 micros, max: 1.844 micros] 99% = [avg: 1.788 micros, max: 1.92 micros] 99.9% = [avg: 1.79 micros, max: 2.106 micros] 99.99% = [avg: 1.791 micros, max: 5.73 micros] 99.999% = [avg: 1.791 micros, max: 6.249 micros]
From ByteBuffer
to FixMessage
:
Messages: 2,500,000 Avg Time: 1.932 micros Min Time: 1.832 micros Max Time: 16.903 micros Garbage: no garbage created for the GC 75% = [avg: 1.913 micros, max: 1.95 micros] 90% = [avg: 1.921 micros, max: 1.976 micros] 99% = [avg: 1.928 micros, max: 2.084 micros] 99.9% = [avg: 1.93 micros, max: 2.319 micros] 99.99% = [avg: 1.931 micros, max: 5.932 micros] 99.999% = [avg: 1.932 micros, max: 6.324 micros]
Note: This shows a known weakness of the FIX protocol: parsing repeating groups is expensive.