I promised to some colleagues that someday, I will make a short post about my Eclipse eclipse.ini file, there it is!
Using Eclipse with some fancy plugins, you may experience a lot of the infamous quite annoying OutOfMemoryException or some incredible slowness sometime.
Don't panic! There is a remedy. Reading some outdated post arround the internet, I wrote a clean eclipse.ini file that compile the most interesting stuff I found, here it is :
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519
-product
org.eclipse.epp.package.php.product
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:PermSize=256m
-XX:MaxPermSize=256m
-Xms512m
-Xmx512m
-Dide.gc=true
Note that the custom stuff happens after the plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519 line.
Ok, now, let me explain why I did wrote all this stuff.
First, handle the PermSize parameter :
-XX:PermSize=256m
-XX:MaxPermSize=256m
Reading some old posts on the internet, which were written in the old days in which the default PermSize parameter was 64m, I did not override this value, 256m is fine for my usage. If you are using 2g+ of ram, and experience out of memory exceptions, just write 512m.
Some people would arg that Eclipse runs faster if you give a lower PermSize and let Eclipse raise its own heap size until it reaches the MaxPermSize value; I would says, don't do that. Forcing the same value for both of them will force Eclipse to raise it to the maximum value at its startup, which means it does not have to handle it later, Eclipse will be faster.
Next, this :
-Xms512m
-Xmx512m
Ok, not sure about what they really do, but a lot of developers blog post says that you should give higher values here, what I did, and it works fine.
And this :
-Dide.gc=true
If I understand well, this will force Eclipse to run the garbage collector when idle. I did add this parameter this morning, Eclipse is running well since.
Post new comment