Gentoo Archives: gentoo-java

From: gnul <nullchar@×××××.com>
To: Adam Carter <Adam.Carter@×××××××××.au>
Cc: "gentoo-java@l.g.o" <gentoo-java@l.g.o>
Subject: Re: [gentoo-java] Memory heap size problem
Date: Mon, 04 May 2009 17:09:17
Message-Id: 95c99b0e0905041009j12aa862cpb7d557fddd714278@mail.gmail.com
In Reply to: [gentoo-java] Memory heap size problem by Adam Carter
1 You might try some other flags such as -server (which just uses a
2 different set of JVM defaults) as well as -XX:MaxPermSize
3
4 http://www.unixville.com/~moazam/stories/2004/05/17/maxpermsizeAndHowItRelatesToTheOverallHeap.html
5
6 You may also try to enable logging in the app or check the logs to see
7 if it is an OutOfMemory exception (heap) or a PermGen error.
8
9 There are also JVM flags such as -Xss and -XX:ThreadStackSize you can
10 play with too.
11
12 good luck.
13 -gnul
14
15 On Sun, May 3, 2009 at 8:15 PM, Adam Carter <Adam.Carter@×××××××××.au> wrote:
16 > A cisco web java gui is complaing "Your current java memory heap size is less than 256 MB. You must increate the Java memory heap size" etc. On windows and on a previous gentoo x86 box putting -Xmx256m in the java applet runtime settings makes it work. This box is a newly build amd64.
17 >
18 > Looks like the .jnlp is setting the memory;
19 >
20 > sphinx deployment # grep max /tmp/idm-1.jnlp
21 >    <j2se version="1.4+" initial-heap-size="64m" max-heap-size="256m"/>
22 >
23 > And the app is running with the required Xmx256m parameter;
24 >
25 > sphinx deployment # pgrep -lf java
26 > 10147 /opt/sun-jdk-1.6.0.13/jre/bin/java -Xmx256m -Xbootclasspath/a:/opt/sun-jdk-1.6.0.13/jre/lib/javaws.jar:/opt/sun-jdk-1.6.0.13/jre/lib/deploy.jar:/opt/sun-jdk-1.6.0.13/jre/lib/plugin.jar -classpath /opt/sun-jdk-1.6.0.13/jre/lib/deploy.jar -Djnlpx.vmargs=-Xmx256m -Djnlpx.jvm=/opt/sun-jdk-1.6.0.13/jre/bin/java -Djnlpx.splashport=36054 -Djnlpx.home=/opt/sun-jdk-1.6.0.13/jre/bin -Djnlpx.remove=false -Djnlpx.offline=false -Djnlpx.relaunch=true -Djnlpx.heapsize=67108864,268435456 -Djava.security.policy=file:/opt/sun-jdk-1.6.0.13/jre/lib/security/javaws.policy -DtrustProxy=true -Xverify:remote com.sun.javaws.Main file:///tmp/idm-9.jnlp
27 >
28 > So it looks like it should work - any ideas on how to fix this? (sun-jdk-1.6.0.13, also tried a 1.5 but had the same problem).
29 >
30 >
31 >