nautechsystems / nautilus_trader

A high-performance algorithmic trading platform and event-driven backtester
https://nautilustrader.io
GNU Lesser General Public License v3.0
2.02k stars 460 forks source link

Fix streaming backend mem usage #1693

Closed twitu closed 3 months ago

twitu commented 3 months ago

Pull Request

Choosing the right combination of query and config to achieve high perf with constant mem usage. This gives a 50% improvement over single and multi stream benchmarks.

Type of change

How has this change been tested?

Ran benchmarks and smaller tests in experiments repo^1. The best combination is no order by clause and turning off repartitioning.

order repartition wall time (s) memory (mb) read sorted order
true true 1.24 654
true false 1.65 944
false false 0.55 45
false true 0.41 151