Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Best JVM settings for backtesting using JForex API
 Post subject: Best JVM settings for backtesting using JForex API Post rating: 0   New post Posted: Tue 14 Dec, 2010, 16:25 

User rating: 1
Joined: Sun 05 Dec, 2010, 08:44
Posts: 21
I develop and backtest/optimize my strategies in Eclipse for the JForex API. I was wondering whether there any particular JVM arguments that should be used for optimal backtesting speed.

At the moment I just set the lower and upper limits of the heap size using these arguments:

-Xms512m -Xmx2048m


I've been wondering if there is a type of Garbage Collector for JForex backtesting that is better than the default one, such as the Throughput Collector, which does Garbage collection in multiple threads and is enabled using the argument:

-XX:+UseParallelGC


The problem with Garbage Collection is that in some situations it can be a performance bottleneck instead of improving performance.

Here is a good article: Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine
Here is a summary of an older version of the article: Tuning Garbage Collection Outline

Maybe the JForex platform developers already have in-depth knowledge about performance tuning in Java, so it would be good if they could share their knowledge of what the best JVM settings are for backtesting using the JForex API.


 
 Post subject: Re: Best JVM settings for backtesting using JForex API Post rating: 0   New post Posted: Sat 25 Dec, 2010, 17:43 

User rating: 0
Joined: Tue 30 Jun, 2009, 13:18
Posts: 3
I like the following settings for general Java non gui stuff - never tried in JForex though

You also might like to look at the G1 garbage collector


My favourites are:
-Xms64m -Xmx192m -server -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=16M -XX:SurvivorRatio=7 -XX:TargetSurvivorRatio=1

and add this as well to get a cheap and cheerful gc audit:
-verbose:gc -XX:+PrintGCTimeStamps -Xloggc:../logs/gc.log

alter 192m to suit what you are doing - we use around 200m for servers and anything up to 800 for gui's that require low latency - allthough GUI and low latency are not really compatible


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com