What are the best JVM settings you have found for running Eclipse?
相关问题
- Eclipse and Mylyn : how to disable grey files in t
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- How to remove unused imports using Eclipse and not
- Assume/switch role in aws toolkit for eclipse 2.0
相关文章
- java项目突然挂掉,日志无报错信息
- Java引用分为强引用、软引用、弱引用、虚引用,我怎么能判断出一个对象是哪个引用?
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- java.lang.VerifyError: Stack map does not match th
- Eclipse cleanup - what are the “.index” files - ca
Eclipse Indigo 3.7.2 settings (64 bit linux)
Settings for Sun/Oracle java version "1.6.0_31" and Eclipse 3.7 running on x86-64 Linux:
Note that this uses only 200 MB for the heap and 150 MB for the non-heap. If you're using huge plugins, you might want to increase both the "-Xmx200m" and "-XX:MaxPermSize=150m" limits.
The primary optimization target for these flags has been to minimize latency in all cases and as a secondary optimization target minimize the memory usage.
If you're going with jdk6 update 14, I'd suggest using using the G1 garbage collector which seems to help performance.
To do so, remove these settings:
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
and replace them with these:
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
It is that time of year again: "eclipse.ini take 3" the settings strike back!
Eclipse Helios 3.6 and 3.6.x settings
alt text http://www.eclipse.org/home/promotions/friends-helios/helios.png
After settings for Eclipse Ganymede 3.4.x and Eclipse Galileo 3.5.x, here is an in-depth look at an "optimized" eclipse.ini settings file for Eclipse Helios 3.6.x:
some some Sun proprietary options may be involved).(by "optimized", I mean able to run a full-fledge Eclipse on our crappy workstation at work, some old P4 from 2002 with 2Go RAM and XPSp3. But I have also tested those same settings on Windows7)
Eclipse.ini
WARNING: for non-windows platform, use the Sun proprietary option
-XX:MaxPermSize
instead of the Eclipse proprietary option--launcher.XXMaxPermSize
.That is: Unless you are using the latest jdk6u21 build 7. See the Oracle section below.
Note:
Adapt the
p2.reconciler.dropins.directory
to an external directory of your choice.See this SO answer. The idea is to be able to drop new plugins in a directory independently from any Eclipse installation.
The following sections detail what are in this
eclipse.ini
file.The dreaded Oracle JVM 1.6u21 (pre build 7) and Eclipse crashes
Andrew Niefer did alert me to this situation, and wrote a blog post, about a non-standard vm argument (
-XX:MaxPermSize
) and can cause vms from other vendors to not start at all.But the eclipse version of that option (
--launcher.XXMaxPermSize
) is not working with the new JDK (6u21, unless you are using the 6u21 build 7, see below).The
finalsolution is on the Eclipse Wiki, and for Helios on Windows with 6u21 pre build 7 only:That's it. No setting to tweak here (again, only for Helios on Windows with a 6u21 pre build 7).
For non-Windows platform, you need to revert to the Sun proprietary option
-XX:MaxPermSize
.The issue is based one a regression: JVM identification fails due to Oracle rebranding in java.exe, and triggered bug 319514 on Eclipse.
Andrew took care of Bug 320005 - [launcher]
--launcher.XXMaxPermSize: isSunVM
should return true for Oracle, but that will be only for Helios 3.6.1.Francis Upton, another Eclipse committer, reflects on the all situation.
Update u21b7, July, 27th:
Oracle have regressed the change for the next Java 6 release and won't implement it again until JDK 7.
If you use jdk6u21 build 7, you can revert to the
--launcher.XXMaxPermSize
(eclipse option) instead of-XX:MaxPermSize
(the non-standard option).The auto-detection happening in the C launcher shim
eclipse.exe
will still look for the "Sun Microsystems
" string, but with 6u21b7, it will now work - again.For now, I still keep the
-XX:MaxPermSize
version (because I have no idea when everybody will launch eclipse the right JDK).Implicit `-startup` and `--launcher.library`
Contrary to the previous settings, the exact path for those modules is not set anymore, which is convenient since it can vary between different Eclipse 3.6.x releases:
org.eclipse.equinox.launcher
bundle with the highest version.plugins
directory for the appropriateorg.eclipse.equinox.launcher.[platform]
fragment with the highest version and uses the shared library namedeclipse_*
inside.Use JDK6
The JDK6 is now explicitly required to launch Eclipse:
This SO question reports a positive incidence for development on Mac OS.
+UnlockExperimentalVMOptions
The following options are part of some of the experimental options of the Sun JVM.
They have been reported in this blog post to potentially speed up Eclipse.
See all the JVM options here and also in the official Java Hotspot options page.
Note: the detailed list of those options reports that
UseFastAccessorMethods
might be active by default.See also "Update your JVM":
Opening files in Eclipse from the command line
See the blog post from Andrew Niefer reporting this new option:
See bug 301033 for reference. Originally bug 4922 (October 2001, fixed 9 years later).
p2 and the Unsigned Dialog Prompt
If you are tired of this dialog box during the installation of your many plugins:
, add in your
eclipse.ini
:See this blog post from Chris Aniszczy, and the bug report 235526.
---------- http://www.eclipse.org/home/categories/images/wiki.gif alt text http://www.eclipse.org/home/categories/images/wiki.gif alt text http://www.eclipse.org/home/categories/images/wiki.gif
Additional options
Those options are not directly in the
eclipse.ini
above, but can come in handy if needed.The `user.home` issue on Windows7
When eclipse starts, it will read its keystore file (where passwords are kept), a file located in
user.home
.If for some reason that
user.home
doesn't resolve itself properly to a full-fledge path, Eclipse won't start.Initially raised in this SO question, if you experience this, you need to redefine the keystore file to an explicit path (no more user.home to resolve at the start)
Add in your
eclipse.ini
:This has been tracked by bug 300577, it has been solve in this other SO question.
Debug mode
Wait, there's more than one setting file in Eclipse.
if you add to your
eclipse.ini
the option:, you enable the debug mode and Eclipse will look for another setting file: a
.options
file where you can specify some OSGI options.And that is great when you are adding new plugins through the dropins folder.
Add in your .options file the following settings, as described in this blog post "Dropins diagnosis":
That comes from Bug 264924 - [reconciler] No diagnosis of dropins problems, which finally solves the following issue like:
Manifest Classpath
See this blog post:
That means some of your projects might no longer compile in Helios.
If you want to revert to Galileo behavior, add:
See bug 305037, bug 313965 and bug 313890 for references.
IPV4 stack
This SO question mentions a potential fix when not accessing to plugin update sites:
Mentioned here just in case it could help in your configuration.
JVM1.7x64 potential optimizations
This article reports:
Here's my own setting for my Eclipse running on i7 2630M 16GB RAM laptop, this setting has been using for a week, without a single crashing, and Eclipse 3.7 is running smoothly.
Calculations: For Win 7 x64