1

I use Eclipse with PDT. Most optimization solutions mention increasing the Xms and Xmx values to enable Eclipse to handle more Java objects. I am curious about XXMaxPermSize. Increasing its value increased the memory the java process used.

For a non-Java IDE usage, which of these three (or all three) should be increased? My eclipse.ini file contents are as below:

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m
-XX:+UseParallelGC

Update: The following is the updated eclipse.ini I am using.

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
/usr/lib/jvm/java-6-openjdk/jre/bin/java
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms512m
-Xmx1024m
-XX:MaxPermSize=256m
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
Rohit
  • 238
  • 2
  • 6

1 Answers1

0

For PDT or other non-Java development the size of these variables should be largely irrelevant as long as Eclipse itself is running fine (maybe regardless of that).

From the ini documentation page:

--launcher.XXMaxPermSize (Executable) If specified, and the executable detects that the VM being used is a Sun VM, then the launcher will automatically add the -XX:MaxPermSize= vm argument. The executable is not capable of detecting Sun VMs on all platforms.

This blog post is also helpful, specifically mentioning the Xms Xmx are separate from PermGen space, the syntax requirement that args must be on separate lines (as you have above), and:

The best way to know if your command line arguments actually has been passed in correctly is to go to Help/About [Product Name] and click “Configuration Details” and check that the property “eclipse.vmargs” contain the values you expected.

Finally, this page mentions which errors might be seen if the settings are too low:

1) Java.lang.OutOfMemoryError: Java heap space (The Xmx variable)
2) Java.lang.OutOfMemoryError: PermGen space (The XXMaxPermSize variable)
owenfi
  • 2,471
  • 1
  • 24
  • 37