This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Our current setting is -Xms24m -Xmx160 and no perm size with a hope to decrease mx to 128m. It means that during the start with two small projects and 3 files opened in editor there are 3 full GC taking and perm area is resized to 18176kB. Total time spent in GC is >2.5s, most of it is in FCG (1.3s). - When I set only perm size (-J-Xms24m -J-Xmx160m -J-XX:PermSize=32m) it eliminates two FCG cycles so IDE spents 1.6-1.7s in GC (0.4-0.5 in one FGC). - When I increase heap size (-J-Xms36m -J-Xmx160m) it eliminates one FCG cycles so IDE spents ~1.9s in GC (0.8-0.9 in one FGC). - With -J-Xms36m -J-Xmx160m -J-XX:PermSize=24m I see no FGC and 1-1.1s in GC. - More agresive -J-Xms40m -J-Xmx160m -J-XX:PermSize=32m gives again 0 FGC but time spent in GC is a bit higher 1.2-1.3s. I guess that this is because each GC is more expensive on larger heap. So every full GC takes roughly 0.4s and we have two caused by perm area resizing and one because ms24m is not sufficient now. IMO we should increase -Xms. We've rejected -XX:PermSize in the past as there can be problems on different JVMs than from Sun (I shared this opinion). But according to http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html#invocation_api_functions we can ask JVM to ignore unrecognized options in our Windows launcher. Apple's JVM runs with this option (at least on Milos' machine, don't know if it has any effect). IBM VM and JRockit will refuse to start on Linux. Blackdown accepts the option. All the measurements are from my dell laptop, dev build from Aug 3, JDK1.5.0b61, linux fedora core 2.
Either we can add -XX:PermSize into netbeans.conf or put it into windows launcher only.
I measured the effect of this tuning on complex startup. * Dell Precision 220, PIII 800MHz, 512MB RAM * W2K, jdk 1.4.2_04 * trunk build 200408041800 * jEdit project open and 5 java files open in editor 1) -J-Xms24m -J-Xmx128m -J-Xverify:none 23.7s, 23.7s, 23.5s 2) -J-Xms36m -J-Xmx128m -J-XX:PermSize=24m -J-Xverify:none 21.5s, 21.5s, 21.3s
So, I vote for it...
> We've rejected -XX:PermSize in the past as there can be problems > on different JVMs than from Sun (I shared this opinion). But > according to ... we can ask JVM to ignore unrecognized options in > our Windows launcher. Not doable for Beta 2 I guess. Only increasing Xms for beta 2 (see issue 48918). But for FCS can we push it to the windows launcher?
-Xms32m is commited to trunk (not beta2) Another possibility is to use adaptive sizing of heap with -XX:+UseAdaptiveSizePolicy (optionaly with -XX:MaxGCPauseMillis=nnn and -XX:GCTimeRatio=nnn)
> -Xms32m is commited to trunk (not beta2) In Beta 2 as well (see issue 48918)
Adjusted to -Xms32m -Xmx128m Neither permsize nor the ergonomics are user.