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.

does jforex have a maximum usage of memory up to 494M ?
 Post subject: does jforex have a maximum usage of memory up to 494M ? Post rating: 0   New post Posted: Mon 28 Jun, 2010, 13:11 

User rating: 0
Joined: Thu 24 Jun, 2010, 04:04
Posts: 27
every time when jforex got its memory usage up to 494M, i found that it stopped increasing,even though there was still free memory to use.

if so how can i make jforex to use more memory than 494M?

and i found that collect buttom sometimes not useful when i wanted to release some memory. is that a bug?


 
 Post subject: Re: does jforex have a maximum usage of memory up to 494M ? Post rating: 0   New post Posted: Mon 28 Jun, 2010, 20:15 

User rating: 0
Joined: Fri 07 May, 2010, 02:59
Posts: 61
In a *nix or cygwin environment, you can do the following:

wget https://www.dukascopy.com/client/demo/jclient/jforex.jnlp


... and view the file in a text editor of your choice. You'll see the following (or something similar, depending on the current version at download time):

<?xml version="1.0"?>
<jnlp spec="1.6+" codebase="https://www.dukascopy.com/client/demo/jclient/" href="jforex.jnlp">
  <information>
    <title>JForex Client</title>
    <vendor>FX Marketplace Platform</vendor>
    <description kind="one-line">JForex Trading Platform</description>
    <description kind="short">JForex Trading Platform</description>
    <description kind="tooltip">JForex Trading Platform</description>
    <icon href="../../images/jforex_icon.png"/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <property name="jnlp.client.version" value="2.4.1"/>
    <property name="jnlp.platform.mode" value="jforex"/>
    <property name="jnlp.client.mode" value="DEMO"/>
    <property name="jnlp.login.url" value="https://www1.dukascopy.com/authorization/demo,https://www2.dukascopy.com/authorization/demo,https://www3.dukascopy.com/authorization/demo"/>
    <property name="sun.java2d.d3d" value="false"/>
    <java version="1.6+" initial-heap-size="32m" max-heap-size="512m"/>
    <jar href="lib/7zip-4.65.jar" main="false"/>
    <jar href="lib/DDS2-Connector-1.1.1.jar" main="false"/>
    <jar href="lib/JForex-API-2.6.7.jar" main="false"/>
    <jar href="lib/RSyntaxTextArea-1.3.4a.jar" main="false"/>
    <jar href="lib/ecj-3.4.jar" main="false"/>
    <jar href="lib/jForex-2.4.1.jar" main="true"/>
    <jar href="lib/jcalendar-1.3.3.jar" main="false"/>
    <jar href="lib/mina-core-1.1.7.jar" main="false"/>
    <jar href="lib/mina-filter-ssl-1.1.7.jar" main="false"/>
    <jar href="lib/nlink-1.jar" main="false"/>
    <jar href="lib/slf4j-api-1.5.8.jar" main="false"/>
    <jar href="lib/slf4j-jdk14-1.5.8.jar" main="false"/>
    <jar href="lib/ta-lib-0.4.4dc.jar" main="false"/>
  </resources>
  <application-desc main-class="com.dukascopy.dds2.greed.GreedClient"/>
</jnlp>


An executable named javaws (in linux anyway) is used to execute these jnlp files, but you can see what settings it passes to the java engine on startup. In particular, the following line:

<java version="1.6+" initial-heap-size="32m" max-heap-size="512m"/>


... specifies that it must use java 1.6 or higher, an initial heap size of 32mb, and a max heap size of 512m. When you see it hit a ceiling of around 490, the total heap space used by the java virtual machine is capping at 512m.

To work around this, you can download the .jnlp file, manually alter it to use a larger value (eg, 768m, 1024m, 4G, etc) then run it using javaws.

-Brian


 
 Post subject: Re: does jforex have a maximum usage of memory up to 494M ? Post rating: 0   New post Posted: Tue 29 Jun, 2010, 02:55 

User rating: 0
Joined: Thu 24 Jun, 2010, 04:04
Posts: 27
thank you


but why does jforex take so many memory ,even though i give 1000M which is taken up all ?

can jforex release memory automaticlly?


 
 Post subject: Re: does jforex have a maximum usage of memory up to 494M ? Post rating: 0   New post Posted: Mon 05 Jul, 2010, 06:46 

User rating: 0
Joined: Mon 28 Jun, 2010, 11:07
Posts: 4
liyinan wrote:
thank you

but why does jforex take so many memory ,even though i give 1000M which is taken up all ?

can jforex release memory automaticlly?


All Java/JavaWS apps use what is called a memory heap. This heap is maintained by a garbage collector that periodically goes through and releases unused memory. Normally, this is done during off cycles when your Java app doesn't need CPU cycles so that the trading app's performance is not adversely affected. So, even though the app seems to be taking up 1000M, it isn't likely using all that memory at the same time. Periodically, JavaWS will go and free up memory and you will see that number decrease. You can manually initiate garbage collection by clicking on the "trashcan icon" at the bottom of the window.


 

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