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.

heap size max
 Post subject: heap size max Post rating: 0   Post Posted: Wed 13 May, 2015, 10:32 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Hello support,

I set in jForex.jnlp (from yesterday) max-heap-size="13512m" (I have RAM 16 GB only for testing). But JForex platform show max allocated 507 M (on live account). And I get OutOfMemoryError. I have Java ver. 8 upd. 45.

How is possible to increase heap size max? I need it very much.

Thanks for help.


 
 Post subject: Re: heap size max Post rating: 0   Post Posted: Fri 15 May, 2015, 10:48 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please try using this line:
<java version="1.7+" java-vm-args="-Xmx1024m -Xms32m" />


 
 Post subject: Re: heap size max Post rating: 0   Post Posted: Sat 16 May, 2015, 13:56 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
It works. Thanks very much.

I now use: <java version="1.7+" java-vm-args="-Xms32M -Xmx4G"/>


 
 Post subject: Re: heap size max Post rating: 0   Post Posted: Wed 30 Dec, 2015, 03:15 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Here's how to allocate a larger heap from the WebStart bash command line.
Instead of editing the jnlp file, prior to execution; the command line can
be used to do it with the "-J" construct as followed.

Here's what I tried, but wasn't sure it had worked. The -J construct
is suppose to pass the -Xms1g (or 1000m) , etc. to the VM in theory. It's a
24gigabyte server, and I needed the extra headroom in heap to run
a number of Swing-based GUI strategy modules.

#!/bin/bash
# Proper header for a Bash script.
curl https://platform.dukascopy.com/demo/jforex.jnlp > jforex.jnlp
# allocate a gigabyte min and max for heap
javaws -Xnosplash -J-Xms1g -J-Xmx1g jforex.jnlp

The Java Server version:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)


The JForex platform showed an allocation of about 924m in the heap display
which I'm confident is the 1g allocation, just a bit of rounding error
in the heap widget display on JForex :)

hyperscalper


 
 Post subject: Re: heap size max Post rating: 0   Post Posted: Mon 25 Jan, 2016, 21:35 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Hello support,

from Friday (22.1.) I can not start JForex platform if I use JForex.jnl with Xmx params 2G and more. Several minutes ago I made tests with newest jnl file (for 2.45.35) and if Xmx params is 1500M or less started. If params Xmx is 1900M or more, don't start. I have enough free memory.
Maybe is this caused by last java update or is this some Dukascopy restriction?

Thank you.


 
 Post subject: Re: heap size max Post rating: 0   Post Posted: Thu 28 Jan, 2016, 11:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This is system issue. One issue that can cause this is if 32-bit java is used rather than 64-bit version.


 
 Post subject: Re: heap size max Post rating: 0   Post Posted: Fri 29 Jan, 2016, 06:59 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Support, you are right. I had only 32 bit Java. During Java update I was not enough watchfull.

I uninstall it and install 64 bit Java. And I can not run JForex platform. System was almost freezing. Task manager was showing tens of "Java[TM] Web launcher". I have two days Windows 10.
I have installed Java 32 bit again and can run JForex platform, but no more memory.

For further update I will use Java "offline" downloads.


 

Jump to:  

  © 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