15% performance-boost and 40% less memory-usage using GraalVM
82 replies
geektrader
4 years ago #257329
Hi 🙂
I just wanted to share my “new” find. As always, I am exploring options about how to increase the speed of SQX for my daily workflow by tuning parameters, garbage collectors, etc. Lately, I´ve learned about GraalVM, which is a relatively new JIT-compiler that has maximum performance as its goal and has been shown sometimes to be up to 30x faster than if executing code in the standard JRE / OpenJDK runtimes that SQX is using right now. Over here is an excellent video about how it works, why it has been made and with some performance tests: https://www.youtube.com/watch?v=GinNxS3OSi0 For example: Twitter is running all their Java stuff on GraalVM instead of JRE / OpenJDK for a while now and have noticed a considerable drop in CPU and RAM usage.
And now the great part: using it with SQX is as easy as downloading the latest Windows binary from here https://github.com/graalvm/graalvm-ce-builds/releases
Simply unpack the ZIP file into the J64 of SQX (previously delete or rename the folder) and just continue working with SQX as you always did. Personally here is what I have experienced since replacing it and of course, using the same settings in SQX as before:
– about a 15% performance increase in strategy generation speed
– approximately a 40% drop in memory consumption (which is AMAZING given that I can now work with less RAM)
– no errors or crashes of SQX just works the same as with JRE / OpenJDK
As this is open-source, I would highly recommend that SQX is being shipped with GraalVM in its default configuration, as this seems to be amazing! There also is an Enterprise Edition available that seems to be even faster, but it´s 193 Euro/year and I haven´t tested it yet.
Have fun crunching strategies 😉
Mark Fric
4 years ago #257333
thank you very much for this idea, I’ll check it. If it is really true we can ship the new SQ build with GraalVM 🙂
Mark
StrategyQuant architect
geektrader
4 years ago #257335
You are most welcome. I am in 48 hours now and it keeps going at +15% performance and half to the RAM it used before for the same task. What an amazing JVM!
The best thing is, that you can download and use the enterprise version by using the “TRY FROM OTN” button at https://www.oracle.com/technetwork/graalvm/downloads/index.html and quickly registering with Oracle. And indeed, that version is even faster (+20% performance for me) as promised by them.
Gianfranco
4 years ago #257351
I can confirm that sqx generates about 20% faster and the program is more responsive
very    OK
Gianfranco
4 years ago #257352
same builder  from   850.000  str/hour     to   1.050.000   str/hour
hankeys
4 years ago #257355
good finding – testing and its seems that the graal EE version is faster
You want to be a profitable algotrader? We started using StrateQuant software in early 2014. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM.
Gianfranco
4 years ago #257356
Gianfranco
4 years ago #257357
i7  8750 intel  plus  15/20%  up      amd ryzen 9 3900x     about  minus  5/10 %   ………
my friend  dual xeon intel  plus about 15/20%
geektrader
4 years ago #257359
Yes, the Enterprise Edition is clearly a good bit faster than the open-source one (which is already much faster than the typical JRE / OpenJDK stuff). Once again, you can grab the Enterprise Edition for free here:
Have fun 🙂
Gianfranco
4 years ago #257369
have you the same problem about intel cpu and amd ?
geektrader
4 years ago #257375
No, I don´t have a problem with AMD. I am running a AMD Ryzen 3950X overclocked to 4.2GHz, that is where my measurements are based on like mentioned in the first post (~+20% performance boost and about 40% less memory).
geektrader
4 years ago #257391
3 days in use now and I am especially surprised by the huge reduction of RAM that the same task requires in OpenJDK / JRE. Speed advantage seems to settle somewhere between 10% to 15% now too. Pretty nice!
Gianfranco
4 years ago #257393
Csaba
4 years ago #257394
Hello Everyone!
@ Geektrader: I want to say thank you for this topic! I realized also, that I have now more strategies over the same running period. Thx!
Brg, Csaba
geektrader
4 years ago #257395
Nothing to complain here on my 3950X, +15% on average. Maybe thermal issue (lower CPU clock) as GraalVM is using AVX2. You should check that.
geektrader
4 years ago #257396
Hello Everyone! @ Geektrader: I want to say thank you for this topic! I realized also, that I have now more strategies over the same running period. Thx! Brg, Csaba
You are most welcome 🙂