0
votes

When running my Gwt app in eclipse environment & especially when refreshing the page I often have either "Out Of Memory Perm Size" problem or the page took very long time to load & finally die out.

Some instructions from other questions are not very clear & each person produces a different solution to set memory, which made me really confused.

Here is my eclipse.ini file in C:\eclipse-jee-juno-SR1-win32-x86_64\eclipse:

-clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m

Also, in my eclipse, Run--> Debug Configurations --> Arguments tab --> I saw

VM arguments: -Xmx2048m // this is quite high number why it still very slow??

I need the simplest way to fix it. so What is the simplest way to fix this problem?

1

1 Answers

1
votes

Start up Visual VM and see what each generation of memory is doing.

I would focus on the perm gen. You can increase its setting like this:

-Xms256m -Xmx512m -XX:MaxPermSize=256m

You'd better be running on a 64-bit operating system. The 32 bit JVM won't allow max heap larger than 1.2-1.5MB.