针对 Eclipse PDT 或 PyDev 进行优化时,哪个更有用 - launcher.XXMaxPermSize 或 Xms,Xmx?
我将 Eclipse 与 PDT 结合使用。大多数优化解决方案都提到增加 Xms
和 Xmx
值以使 Eclipse 能够处理更多 Java 对象。我对 XXMaxPermSize 很好奇。增加其值会增加 java 进程使用的内存。
对于非 Java IDE 使用,应该增加这三个(或全部三个)中的哪一个?我的 eclipse.ini 文件内容如下:
-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
更新:以下是我正在使用的更新后的 eclipse.ini。
-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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 PDT 或其他非 Java 开发,只要 Eclipse 本身运行良好(也许不管这一点),这些变量的大小应该在很大程度上无关紧要。
来自 ini 文档页面:
这篇 博客文章 也很有帮助,特别提到 Xms Xmx 与 PermGen 空间是分开的,语法要求 args 必须位于单独的行上(如上面所示),并且:
最后,此页面提到了如果设置太低:
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:
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:
Finally, this page mentions which errors might be seen if the settings are too low: