锁定老帖子 主题:优化JVM参数提高eclipse运行速度
该帖已经被评为精华帖
|
|
---|---|
作者 | 正文 |
发表时间:2010-09-07
LZ真是个人才, 很用心的人, 向你学习
|
|
返回顶楼 | |
发表时间:2010-09-07
很不错的分析,学习了.看来有空还是要研究下jvm.
|
|
返回顶楼 | |
发表时间:2010-09-07
感谢楼主分享
我现在的配置 ubuntu10.04 64bit, Intel core2 P8400, 4G mem,eclipse galileo -vmargs -Dosgi.requiredJavaVersion=1.5 -Xmn196m -Xms512m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=256m -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -verbose:gc -Xloggc:gc.log 配置后,启动速度差不多,不过里面点东西的时候,eclipse响应的速度超快 好像Xmn参数不起作用,gc.log输出 8.078: [GC [PSYoungGen: 150528K->25058K(175616K)] 150528K->30747K(499200K), 0.1307120 secs] [Times: user=0.09 sys=0.03, real=0.13 secs] 13.100: [GC [PSYoungGen: 175586K->25057K(175616K)] 181275K->43679K(499200K), 0.2308440 secs] [Times: user=0.17 sys=0.05, real=0.23 secs] 138.857: [GC [PSYoungGen: 175585K->25076K(175616K)] 194207K->65302K(499200K), 0.1117250 secs] [Times: user=0.18 sys=0.01, real=0.12 secs] 有一个疑问,如果楼主方便可以帮助我分析分析?感谢您 ![]() 如果加上参数:-XX:+DisableExplicitGC,MyEclipse会弹出来一个东西:就是那个内存不够的,需要配置的东西 Heap PSYoungGen total 175616K, used 95224K [0x00007f0eb4ba0000, 0x00007f0ec0fa0000, 0x00007f0ec0fa0000) eden space 150528K, 46% used [0x00007f0eb4ba0000,0x00007f0eb9021078,0x00007f0ebdea0000) from space 25088K, 99% used [0x00007f0ebdea0000,0x00007f0ebf71d0f0,0x00007f0ebf720000) to space 25088K, 0% used [0x00007f0ebf720000,0x00007f0ebf720000,0x00007f0ec0fa0000) PSOldGen total 323584K, used 40226K [0x00007f0e60fa0000, 0x00007f0e74ba0000, 0x00007f0eb4ba0000) object space 323584K, 12% used [0x00007f0e60fa0000,0x00007f0e636e8a08,0x00007f0e74ba0000) PSPermGen total 262144K, used 65602K [0x00007f0e50fa0000, 0x00007f0e60fa0000, 0x00007f0e60fa0000) object space 262144K, 25% used [0x00007f0e50fa0000,0x00007f0e54fb0bd8,0x00007f0e60fa0000) 目前我都是去掉此参数-XX:+DisableExplicitGC,后台的GC输出都是下面的东西: 407.541: [Full GC (System) [PSYoungGen: 64K->0K(149248K)] [PSOldGen: 85741K->85742K(323584K)] 85805K->85742K(472832K) [PSPermGen: 96914K->96914K(262144K)], 0.5234640 secs] [Times: user=0.51 sys=0.00, real=0.53 secs] |
|
返回顶楼 | |
发表时间:2010-09-07
确实很棒!
|
|
返回顶楼 | |
发表时间:2010-09-07
很好 很强大
|
|
返回顶楼 | |
发表时间:2010-09-07
不错哦! 很强大,
|
|
返回顶楼 | |
发表时间:2010-09-07
很强大,多谢分享
|
|
返回顶楼 | |
发表时间:2010-09-07
授人以鱼不如授人以渔
楼主,能介绍下学习调优,需要一些什么基础知识吗?能介绍一些相关的经典书籍吗? 谢谢了 |
|
返回顶楼 | |
发表时间:2010-09-07
感谢楼主了.我也对自己的eclipse调整了下.我还装了VE插件,巴别插件.
只调整 -Xms512m -Xmx512m 启动速度加快,但是打开项目Full GC了4次,打开文件Full GC了两次.还没试用VE编辑文件. 然后加上 -XX:PermSize=96m -XX:MaxPermSize=96m -Xmn168m -XX:+DisableExplicitGC 启动速度加快,没有出现Full GC,用VE编辑文件也没有Full GC. 感谢楼主分享. |
|
返回顶楼 | |
发表时间:2010-09-07
根据楼主的改了该 速度果然提高很多啊!
-startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms512m -Xmx512m -Xmn168m -XX:+DisableExplicitGC |
|
返回顶楼 | |