Disruptor v3 – Faster Hopefully

LMAX Exchange

I’ve be working sporadically on the next major revision of the Disruptor, but still making steady progress. I’ve merged my experimental branch into the main line and I’m working on ensure comprehensive test coverage and re-implement the Disruptor DSL.

As a matter of course I’ve been running performance tests to ensure that we don’t regress performance. While I’ve not been focusing on performance, just some refactoring and simplification I got a nice surprise. The new version is over twice as fast for the 1P1C simple test case; approximately 85M ops/sec versus 35M ops/sec. This is on my workstation which is an Intel(R) Xeon(R) CPU [email protected].

Current released version (2.10.1)


[barkerm@snake disruptor-2]$ taskset -c 4-8,12-15 ant througput:single-test
througput:single-test:
[junit] Running
com.lmax.disruptor.OnePublisherToOneProcessorUniCastThroughputTest
[junit] Started Disruptor run 0
[junit] Disruptor=21,141,649 ops/sec
[junit] Started Disruptor run 1
[junit] Disruptor=20,597,322 ops/sec
[junit] Started Disruptor run 2
[junit] Disruptor=33,233,632 ops/sec
[junit] Started Disruptor run 3
[junit] Disruptor=32,883,919 ops/sec
[junit] Started Disruptor run 4
[junit] Disruptor=33,852,403 ops/sec
[junit] Started Disruptor run 5
[junit] Disruptor=32,819,166 ops/sec
[junit] Started Disruptor run 6

Current trunk.


[barkerm@snake disruptor]$ taskset -c 4-8,12-15 ant througput:single-test
througput:single-test:
[junit] Running
com.lmax.disruptor.OnePublisherToOneProcessorUniCastThroughputTest
[junit] Started Disruptor run 0
[junit] Disruptor=23,288,309 ops/sec
[junit] Started Disruptor run 1
[junit] Disruptor=23,573,785 ops/sec
[junit] Started Disruptor run 2
[junit] Disruptor=86,805,555 ops/sec
[junit] Started Disruptor run 3
[junit] Disruptor=87,183,958 ops/sec
[junit] Started Disruptor run 4
[junit] Disruptor=86,956,521 ops/sec
[junit] Started Disruptor run 5
[junit] Disruptor=87,260,034 ops/sec
[junit] Started Disruptor run 6
[junit] Disruptor=88,261,253 ops/sec
[junit] Started Disruptor run 7

There is still more to come. In addition to improvement for the single producer use case the next version will include a new multiple producer algorithm that will replace the two that we currently have and work better than both of them in all scenarios.

Any opinions, news, research, analyses, prices or other information ("information") contained on this Blog, constitutes marketing communication and it has not been prepared in accordance with legal requirements designed to promote the independence of investment research. Further, the information contained within this Blog does not contain (and should not be construed as containing) investment advice or an investment recommendation, or an offer of, or solicitation for, a transaction in any financial instrument. LMAX Group has not verified the accuracy or basis-in-fact of any claim or statement made by any third parties as comments for every Blog entry.

LMAX Group will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information. No representation or warranty is given as to the accuracy or completeness of the above information. While the produced information was obtained from sources deemed to be reliable, LMAX Group does not provide any guarantees about the reliability of such sources. Consequently any person acting on it does so entirely at his or her own risk. It is not a place to slander, use unacceptable language or to promote LMAX Group or any other FX and CFD provider and any such postings, excessive or unjust comments and attacks will not be allowed and will be removed from the site immediately.