Increase JVM Maximum Heap Size for Eclipse

I am trying to increase the maximum heap size for my Eclipse. I tried to specify in eclipse.ini or through the command line, but it does not work.

The maximum heap size has the same limit before (running jconsole) and after ( System.out.println(java.lang.Runtime.getRuntime().maxMemory()); ) starting with Eclipse. 1.8G

  • Is there a way to resize the JVM heap before it starts (e.g. a configuration file?)
  • What can I do wrong when specifying heap size for Eclipse?

This is the command:

 ./eclipse/eclipse -debug -consoleLog -vmargs -Xms1000m -Xmx6000m -XX:-UseGCOverheadLimitcl 

This is my eclipse.ini (whose values ​​are overwritten with the specified eclipse start parameters):

 -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.6 -Dhelp.lucene.tokenizer=standard -XX:MaxPermSize=6000m -Xms1000m -Xmx6000m 
+15
heap eclipse jvm
Jan 17 '13 at 15:54
source share
5 answers

You can increase the heap size allocated by the Java Virtual Machine (JVM) using command-line options.

 -Xms<size> set initial Java heap size -Xmx<size> set maximum Java heap size -Xss<size> set java thread stack size 

If you are using the tomcat server, you can resize the heap by going to Eclipse / Run / Run Configuration and select Apache Tomcat / your_server_name / Arguments and in the VM arguments section use the following:

 -XX:MaxPermSize=256m -Xms256m -Xmx512M 

If you are not using any server, you can enter the following at a command prompt before running your code:

 java -Xms64m -Xmx256m HelloWorld 

More information on increasing heap size can be found here.

+23
Jan 17 '13 at 16:54
source share

You can use this configuration:

 -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807 -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Xms512m -Xmx1024m -XX:+UseParallelGC -XX:PermSize=256M -XX:MaxPermSize=512M 
+12
Dec 05 '13 at 12:02
source share

There is also an optimizer for Eclipse that can increase the heap size with one click.

http://marketplace.eclipse.org/content/optimizer-eclipse

+5
Mar 13 '15 at 4:38
source share

Try modifying eclipse.ini so that both Xms and Xms have the same value:

 -Xms6000m -Xmx6000m 

This forces the Eclipse virtual machine to allocate 6GB heaps from the start.

But be careful either with eclipse.ini or from the command line ./eclipse/eclipse -vmargs ... It should work in both cases, but choose one and try to stick to it.

+4
Jan 17 '13 at 23:33
source share

--launcher.XXMaxPermSize

256m

Try to increase this value!

+2
Apr 12 '13 at 18:02
source share



All Articles