Giter Site home page Giter Site logo

marketdata-analysis's Introduction

marketdata-analysis

Analysis of market data in context of optimising SBE-Aeron stack

CPU: Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz Num cores: 4 Num iterations per samples: 1000 Num samples: 300

  1. CAS latency on a single shared cache line Min latency: 10.3ns ±0.4 cores: (3,1) Max latency: 54.2ns ±2.7 cores: (1,0) Mean latency: 24.9ns

Please Note: Your mileage may vary

Using the above hardware, I conduct a number of tests (some of which are found in jmh-playground:

  • Aeron raw message rate just sending bytes of different sizes
  • Reading longs out of an Unsafe buffer
  • Hoisting data out of an Unsafe buffer
  • Testing the rate at which fields can be read by bit packing

I also used iextrading4j with HDRHistogram to build distributions of the number of relevant messages (price level updates and quotes) per packet. I used IEX as the pcap data is freely available online For that particular venue there is only approx 1% of packets where there are multiple messages.

In conclusion, I found reading bit packed fields much slower in comparison to just reading longs out of an UnsafeBuffer.

The rate of performance degredation with message size increase in the Aeron stack is offset by the ammortization of the long decoding for larger message sizes.

When we calculate the theoretical difference between sending a single large message vs breaking up that message into smaller messages, we see that the larger the original message the more benefit we can get by breaking up the message.

Whilst this is not that great of a performance booster for the sample IEX data, it illustrates the approach and benefit that could occur for venues which produce more updates and at a much faster rate.

marketdata-analysis's People

Contributors

bhf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.