针对多个 CPU 和大量内存的 Eclipse 性能调整?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5006130/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse performance tuning for multiple CPUs and lots of memory?
提问by Greg
I have a dual quad core machine with 12 Gigs of memory on which I run eclipse, does anyone know what JVM Options will give the most responsive / performant experience?
我有一台带有 12 Gigs 内存的双四核机器,我在上面运行 eclipse,有谁知道什么 JVM 选项将提供最灵敏/高性能的体验?
I am currently running:
我目前正在运行:
-Xms256m -Xmx2048m -Xss2m -XX:PermSize=128m -XX:MaxPermSize=384m
-Xms256m -Xmx2048m -Xss2m -XX:PermSize=128m -XX:MaxPermSize=384m
Would changing -Xmx to 4096 give better performance? Or is there some point when more memory will deteriorate performance?
将 -Xmx 更改为 4096 会提供更好的性能吗?或者在某些时候更多的内存会降低性能?
Also can I have a garbage collector running on a separate core to stop lags in the UI during GC?
我也可以在单独的核心上运行垃圾收集器以在 GC 期间停止 UI 中的延迟吗?
回答by Konstantin Komissarchik
The most important thing to make sure is that you are running 64-bit version of Eclipse on 64-bit version of JVM. Your are already allocating more memory than I have ever seen allocated to Eclipse. Unless you have ginormous code base loaded in Eclipse, chances are that you will not come close to hitting that limit. You can keep an eye on Eclipse memory consumption in your OS process monitor. If you see it approaching the limit, then you know that you can give it more memory.
最重要的是要确保您在 64 位版本的 JVM 上运行 64 位版本的 Eclipse。您分配的内存已经超过我所见过的分配给 Eclipse 的内存。除非您在 Eclipse 中加载了大量代码库,否则您可能不会接近达到该限制。您可以在 OS 进程监视器中密切关注 Eclipse 内存消耗。如果你看到它接近极限,那么你就知道你可以给它更多的内存。
JVM will automatically use all available cores. Eclipse is highly multi-threaded. There are no facilities to pin Java threads or the GC to specific cores.
JVM 将自动使用所有可用的内核。Eclipse 是高度多线程的。没有将 Java 线程或 GC 固定到特定内核的工具。
If you are seeing UI lag on a modern JVM, it is not due to GC unless you ran out of memory and GC must pause the process.
如果您在现代 JVM 上看到 UI 延迟,这不是由于 GC,除非您的内存不足并且 GC 必须暂停进程。